do_package (arm-poky-linux-gnueabi-objcopy) fails

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

do_package (arm-poky-linux-gnueabi-objcopy) fails

Jump to solution
13,615 Views
lukasschwoebel
Contributor II

Good Morning,

on trying to compile a custom make-file-based package ("libxbee"), I get an error while the do_package routine is running. My board is iMX6 wandboard-quad and I am using the dora-branch.

ERROR: objcopy failed with exit code 256 (cmd was 'arm-poky-linux-gnueabi-objcopy' --add-gnu-debuglink='/..../build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/libxbee/3-r2/package/usr/lib/.debug/libxbee.so.3.0.10' '/..../build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/libxbee/3-r2/package/usr/lib/libxbee.so.3.0.10'):

arm-poky-linux-gnueabi-objcopy:/..../build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/libxbee/3-r2/package/usr/lib/stB6ee1m: cannot create debug link section `/..../build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/libxbee/3-r2/package/usr/lib/.debug/libxbee.so.3.0.10': Invalid operation

ERROR: Function failed: split_and_strip_files

ERROR: Logfile of failure stored in: /..../build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/libxbee/3-r2/temp/log.do_package.3126

ERROR: Task 516 (/..../sources/meta-wvsnp-pkgs/recipes-libxbee/libxbee/libxbee_3.bb, do_package) failed with exit code '1'

I had some troubles to get it compiling, but these steps are running through smoothly now. But I cannot figure out what exactly fails during the packaging-process. To be honest, I can't even tell what the process is doing in detail (other than, you know, "packaging").

If you need it, here is my recipe file for it:

DESCRIPTION = "A C/C++ library to aid the use of Digi XBee radios in API mode."

SECTION = "base"

HOMEPAGE = "http://code.google.com/p/libxbee/"

LICENSE = "GPLv2+"

LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"

SRC_URI = "git://github.com/attie/libxbee3.git;protocol=git"

SRCREV = "aad1fce3864eccc80a003b3b93010e6f56bb87dd"

S = "${WORKDIR}/git/"

PR = "r1"

do_configure() {

  oe_runmake configure

}

do_compile() {

  oe_runmake all

}

do_install () {

    mkdir -p ${D}/usr/share/man/man3

    oe_runmake install SYS_ROOT=${D}

}


Does anyone have an idea?

Thanks,

Lukas.

Labels (3)
1 Solution
5,182 Views
lukasschwoebel
Contributor II

Hi everyone,

Thanks for your help, I got it running finally. I played around with autotools and the EXTRA_OEMAKE variable, but it did not seem to ehlp.

My solution seemed to be to add $libdir to the FILES_{$PN} variable and disable stripping according to Re: [yocto] How to pack non striped valgrind image into squashfs image:

If you want the binaries not to be stripped, try

adding INHIBIT_PACKAGE_STRIP = "1" to valgrind recipe.

This will disable stripping the binaries as you have mentioned.

Here's my running recipe:

DESCRIPTION = "A C/C++ library to aid the use of Digi XBee radios in API mode."

SECTION = "base"

HOMEPAGE = "http://code.google.com/p/libxbee/"

LICENSE = "LGPLv3"

LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"

SRC_URI = "git://github.com/attie/libxbee3.git;protocol=git"

SRCREV = "aad1fce3864eccc80a003b3b93010e6f56bb87dd"

S = "${WORKDIR}/git/"

PR = "r1"

INHIBIT_PACKAGE_STRIP = "1"

FILES_${PN} += "${libdir}/"

do_configure() {

  echo ${libdir}

  oe_runmake configure

}

do_compile() {

  oe_runmake all

}

do_install () {

    mkdir -p ${D}/usr/share/man/man3

    oe_runmake install SYS_ROOT=${D}

}

View solution in original post

5 Replies
5,183 Views
lukasschwoebel
Contributor II

Hi everyone,

Thanks for your help, I got it running finally. I played around with autotools and the EXTRA_OEMAKE variable, but it did not seem to ehlp.

My solution seemed to be to add $libdir to the FILES_{$PN} variable and disable stripping according to Re: [yocto] How to pack non striped valgrind image into squashfs image:

If you want the binaries not to be stripped, try

adding INHIBIT_PACKAGE_STRIP = "1" to valgrind recipe.

This will disable stripping the binaries as you have mentioned.

Here's my running recipe:

DESCRIPTION = "A C/C++ library to aid the use of Digi XBee radios in API mode."

SECTION = "base"

HOMEPAGE = "http://code.google.com/p/libxbee/"

LICENSE = "LGPLv3"

LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"

SRC_URI = "git://github.com/attie/libxbee3.git;protocol=git"

SRCREV = "aad1fce3864eccc80a003b3b93010e6f56bb87dd"

S = "${WORKDIR}/git/"

PR = "r1"

INHIBIT_PACKAGE_STRIP = "1"

FILES_${PN} += "${libdir}/"

do_configure() {

  echo ${libdir}

  oe_runmake configure

}

do_compile() {

  oe_runmake all

}

do_install () {

    mkdir -p ${D}/usr/share/man/man3

    oe_runmake install SYS_ROOT=${D}

}

5,182 Views
attie
Contributor I

Hi Lukas,

Sorry to hear you're having issues.

  1. Are the four dots (....) being passed to objcopy or is this an artifact of your build system? This may be causing the issue.
  2. If you're happy for the debug information to be in the final shared object (instead of separated into a debug file), then please try the following patch: http://pastebin.com/tvGF7QXP

I also noticed that you've put the licence as GPLv2+.

It's actually licensed using LGPLv3 if that's an option in your build system.

I hope this helps,

Attie

0 Kudos
5,182 Views
LeonardoSandova
Specialist I

Hi Lukas,

if you are using autotools for the compilation (alias make), you should inherit the class, so first try your recipe with

DESCRIPTION = "A C/C++ library to aid the use of Digi XBee radios in API mode."

SECTION = "base"

HOMEPAGE = "http://code.google.com/p/libxbee/"

LICENSE = "GPLv2+"

LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"

SRC_URI = "git://github.com/attie/libxbee3.git;protocol=git"

SRCREV = "aad1fce3864eccc80a003b3b93010e6f56bb87dd"

S = "${WORKDIR}/git/"

PR = "r1"


inherit autotools

0 Kudos
5,182 Views
lukasschwoebel
Contributor II

Hi,

autotools won't help in my case, or I cannot utilise it. The installation (do_install) process will fail, if I do not use my custom do_install routine..

ERROR: Function failed: do_install (log file is located at /.../build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/libxbee/3-r2/temp/log.do_install.6196)

ERROR: Logfile of failure stored in: /.../build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/libxbee/3-r2/temp/log.do_install.6196

Log data follows:

| DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common', 'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi', 'common']

| DEBUG: Executing shell function do_install

| NOTE: make -j 4 SYS_ROOT=/.../build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/libxbee/3-r2/image DESTDIR=/.../build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/libxbee/3-r2/image install

| make: *** No rule to make target `/.../build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/libxbee/3-r2/image.dir', needed by `/.../build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/libxbee/3-r2/image/libxbee.so.3.0.10'.  Stop.

| ERROR: oe_runmake failed

| WARNING: exit code 1 from a shell command.

| ERROR: Function failed: do_install (log file is located at /.../build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/libxbee/3-r2/temp/log.do_install.6196)

ERROR: Task 508 (/.../sources/meta-wvsnp-pkgs/recipes-libxbee/libxbee/libxbee_3.bb, do_install) failed with exit code '1'

On leaving the custom do_install but inheriting from autotools, will still produce the same error as in the first posting.

0 Kudos
5,182 Views
LeonardoSandova
Specialist I

You may post this question to the meta-freescale list. Also, there is an example on this section http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#usingpoky-extend-addpkg-autotool...

Leo

0 Kudos