libatasmart_0.13.bb: `No package 'libudev' found` and `./strpool: ./strpool: cannot execute binary file`
Dear OE folks,
I am trying to build libatasmart_0.13.bb.
Using Minimal as distribution do_configure() fails, because package config for libudev is not found.
[…]
| checking for arm-oe-linux-gnueabi-pkg-config... no
| checking for pkg-config... /oe/build-minimal-eglibc/minimal-dev/sysroots/i686-linux/usr/bin/pkg-config | configure: WARNING: using cross tools not prefixed with host triplet
| checking pkg-config is at least version 0.9.0... yes
| checking for LIBUDEV... configure: error: Package requirements (libudev) were not met:
|
| No package 'libudev' found
|
| Consider adjusting the PKG_CONFIG_PATH environment variable if you
| installed software in a non-standard prefix.
|
| Alternatively, you may set the environment variables LIBUDEV_CFLAGS
| and LIBUDEV_LIBS to avoid the need to call pkg-config.
| See the pkg-config man page for more details.
|
| ERROR: Function do_configure failed
NOTE: package libatasmart-0.13-r1: task do_configure: Failed
[…]
find minimal-dev/ -name *libudev* did not return anything useful. Steffen added udev to DEPENDS [1] but that does not seem to help. (Although I do not know if he saw the same error as I do, because it is not mentioned in the commit message.)
Using Ȧngström 2008.1 this error was not met though. But do_compile() fails with ./strpool: cannot execute binary file.
Log data follows:
| NOTE: make
| CC strpool.o
| CCLD strpool
| ./strpool atasmart.c atasmart.strpool.c
| ./strpool: ./strpool: cannot execute binary file | make: *** [atasmart.strpool.c] Error 126
| FATAL: oe_runmake failed
| ERROR: Function do_compile failed
NOTE: package libatasmart-0.13-r1: task do_compile: Failed
But as far as I understand the recipe takes care of that by compiling strpool for the build host [2].
do_compile_prepend() {
rm strpool -f
${BUILD_CC} -o strpool strpool.c
chmod +x strpool
}Thanks,
Paul
[1] http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=f94938ac8022a9ab94cccf1e61eb069a30133ffb
[2] http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/devicekit/libatasmart_0.13.bb?id=67ab615dac83b0460fa1b88dfb11c72d7c93e259
Am 23.09.2010 13:30, schrieb Paul Menzel:
Quoted 25 lines
I am trying to build
libatasmart_0.13.bb.Using Minimal as distribution
do_configure()fails, because package config for libudev is not found.[…]
| checking for arm-oe-linux-gnueabi-pkg-config... no
| checking for pkg-config... /oe/build-minimal-eglibc/minimal-dev/sysroots/i686-linux/usr/bin/pkg-config | configure: WARNING: using cross tools not prefixed with host triplet
| checking pkg-config is at least version 0.9.0... yes
| checking for LIBUDEV... configure: error: Package requirements (libudev) were not met:
|
| No package 'libudev' found
|
| Consider adjusting thePKG_CONFIG_PATHenvironment variable if you
| installed software in a non-standard prefix.
|
| Alternatively, you may set the environment variablesLIBUDEV_CFLAGS
| andLIBUDEV_LIBSto avoid the need to call pkg-config.
| See the pkg-config man page for more details.
|
| ERROR: Functiondo_configurefailed
NOTE: package libatasmart-0.13-r1: taskdo_configure: Failed
[…]
Quoted 4 lines
find minimal-dev/ -name *libudev*did not return anything useful. Steffen addedudevtoDEPENDS[1] but that does not seem to help. (Although I do not know if he saw the same error as I do, because it is not mentioned in the commit message.)
Yes i saw exactly this error.
Steffen
Am 23.09.2010 13:30, schrieb Paul Menzel:
Quoted 17 lines
Using Ȧngström 2008.1 this error was not met though. But
do_compile()fails with./strpool: cannot execute binary file.Log data follows:
| NOTE: make
| CC strpool.o
| CCLD strpool
| ./strpoolatasmart.catasmart.strpool.c
| ./strpool: ./strpool: cannot execute binary file | make: *** [atasmart.strpool.c] Error 126
| FATAL:oe_runmakefailed
| ERROR: Functiondo_compilefailed
NOTE: package libatasmart-0.13-r1: taskdo_compile: FailedBut as far as I understand the recipe takes care of that by compiling
strpoolfor the build host [2].
Quoted 7 lines
do_compile_prepend() {
rm strpool -f
${BUILD_CC} -o strpool strpool.c
chmod +x strpool
}I hit the same problem. But just when building libatasmart for the first time. A second build succeeds.
Steffen
Quoted 26 lines · Steffen Sledz
Am 23.09.2010 13:30, schrieb Paul Menzel:
Quoted 17 lines
Using Ȧngström 2008.1 this error was not met though. But
do_compile()fails with./strpool: cannot execute binary file.Log data follows:
| NOTE: make
| CC strpool.o
| CCLD strpool
| ./strpoolatasmart.catasmart.strpool.c
| ./strpool: ./strpool: cannot execute binary file | make: *** [atasmart.strpool.c] Error 126
| FATAL:oe_runmakefailed
| ERROR: Functiondo_compilefailed
NOTE: package libatasmart-0.13-r1: taskdo_compile: FailedBut as far as I understand the recipe takes care of that by compiling
strpoolfor the build host [2].Quoted 7 lines
do_compile_prepend() { rm strpool -f ${BUILD_CC} -o strpool strpool.c chmod +x strpool }
Quoted 1 line
I hit the same problem. But just when building libatasmart for the first time. A second build succeeds.
I tried the following to find the cause for this.
First i added
pwd
file strpool
to the do_compile_prepend().
Aftre running
bitbake libatasmart -c clean
bitbake libatasmart
i saw
ERROR: log data follows (/home/sledz/work/HydraIP/OE/tmp.6/work/armv5te-angstrom-linux-gnueabi/libatasmart-0.13-r1/temp/log.do_compile.29576) | /home/sledz/work/HydraIP/OE/tmp.6/work/armv5te-angstrom-linux-gnueabi/libatasmart-0.13-r1/git
| strpool: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.4, not stripped
...
Then i called a devshell
bitbake libatasmart -c devshell
Within it
Quoted 1 line
pwd
/home/sledz/work/HydraIP/OE/tmp.6/work/armv5te-angstrom-linux-gnueabi/libatasmart-0.13-r1/git
Quoted 1 line
file strpool
strpool: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped
So the binary has changed in between.
Steffen
Am 23.09.2010 16:13, schrieb Steffen Sledz:
Quoted 54 lines · Steffen Sledz
Quoted 26 lines
Am 23.09.2010 13:30, schrieb Paul Menzel:
Quoted 17 lines
Using Ȧngström 2008.1 this error was not met though. But
do_compile()fails with./strpool: cannot execute binary file.Log data follows:
| NOTE: make
| CC strpool.o
| CCLD strpool
| ./strpoolatasmart.catasmart.strpool.c
| ./strpool: ./strpool: cannot execute binary file | make: *** [atasmart.strpool.c] Error 126
| FATAL:oe_runmakefailed
| ERROR: Functiondo_compilefailed
NOTE: package libatasmart-0.13-r1: taskdo_compile: FailedBut as far as I understand the recipe takes care of that by compiling
strpoolfor the build host [2].Quoted 7 lines
do_compile_prepend() { rm strpool -f ${BUILD_CC} -o strpool strpool.c chmod +x strpool }Quoted 1 line
I hit the same problem. But just when building libatasmart for the first time. A second build succeeds.
I tried the following to find the cause for this.
First i added
pwd
file strpoolto the
do_compile_prepend().Aftre running
bitbake libatasmart -c clean
bitbake libatasmarti saw
ERROR: log data follows (
/home/sledz/work/HydraIP/OE/tmp.6/work/armv5te-angstrom-linux-gnueabi/libatasmart-0.13-r1/temp/log.do_compile.29576) |/home/sledz/work/HydraIP/OE/tmp.6/work/armv5te-angstrom-linux-gnueabi/libatasmart-0.13-r1/git
| strpool: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.4, not stripped
...Then i called a devshell
bitbake libatasmart -c devshell
Quoted 8 lines
Within it
Quoted 1 line
pwd
/home/sledz/work/HydraIP/OE/tmp.6/work/armv5te-angstrom-linux-gnueabi/libatasmart-0.13-r1/gitQuoted 1 line
file strpool
strpool: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped
So the binary has changed in between.
I did some deeper research. The do_compile_prepend code from Koen(?) did not help here.
Makefile.am contains a target "noinst_PROGRAMS = strpool" which is used to create atasmart.strpool.c.
For the creation of this target strpool there are no special rules. Therefor it is build for the target (and overwrites the strpool built from do_compile_prepend) instead of the build host. :(
Is anybody able to write down a rule for strpool fixing this?
Steffen
PATCH 1/1 libatasmart-0.13: resolve cross compile problem
* This patch solves a cross/native compile problem:
| ./strpool atasmart.c atasmart.strpool.c
| ./strpool: ./strpool: cannot execute binary file
--- recipes/devicekit/libatasmart-0.13/strpool.patch | 11 +++++++++++ recipes/devicekit/libatasmart_0.13.bb | 12 +++--------- 2 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 recipes/devicekit/libatasmart-0.13/strpool.patch
recipes/devicekit/libatasmart-0.13/strpool.patch new file +11 -0
@@ -0,0 +1,11 @@ +--- git/Makefile.am.orig 2010-09-24 11:03:40.917602895 +0200 ++++ git/Makefile.am 2010-09-24 11:07:04.145852660 +0200 +@@ -81,5 +81,8 @@ + BUILT_SOURCES = \ + atasmart.strpool.c + ++strpool: $(strpool_SOURCES) ++ $(BUILD_CC) -o $@ $? ++ + atasmart.strpool.c: atasmart.c strpool + $(top_builddir)/strpool $< $@
recipes/devicekit/libatasmart_0.13.bb +3 -9
@@ -2,20 +2,14 @@ DEPENDS = "udev" LICENSE = "LGPL" SRCREV = "a80d7d5c25e88adea7b8e843cdb57143e6cfb46b" -SRC_URI = "git://git.0pointer.de/libatasmart.git;protocol=git" +SRC_URI = "git://git.0pointer.de/libatasmart.git;protocol=git \ + file://strpool.patch" S = "${WORKDIR}/git" -PR = "r1" +PR = "r2" inherit autotools lib_package -do_compile_prepend() { - rm strpool -f - ${BUILD_CC} -o strpool strpool.c - chmod +x strpool -} - do_install_append() { sed -i -e s://:/:g -e s:${base_libdir}/libudev.la:-ludev:g ${D}${libdir}/libatasmart.la } -
Signature · 1 line
1.7.1
Re: [PATCH] libatasmart-0.13: resolve cross compile problem
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 5 lines · Steffen Sledz
* This patch solves a cross/native compile problem:
| ./strpoolatasmart.catasmart.strpool.c
| ./strpool: ./strpool: cannot execute binary fileSigned-off-by Steffen Sledz <[email protected]>
Quoted 41 lines
--- recipes/devicekit/libatasmart-0.13/strpool.patch | 11 +++++++++++ recipes/devicekit/libatasmart_0.13.bb | 12 +++--------- 2 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 recipes/devicekit/libatasmart-0.13/strpool.patchrecipes/devicekit/libatasmart-0.13/strpool.patch new file +11
-0@@ -0,0 +1,11 @@ +--- git/Makefile.am.orig 2010-09-24 11:03:40.917602895 +0200 ++++ git/Makefile.am 2010-09-24 11:07:04.145852660 +0200 +@@ -81,5 +81,8 @@ + BUILT_SOURCES = \ + atasmart.strpool.c + ++strpool: $(strpool_SOURCES) ++ $(BUILD_CC) -o $@ $? ++ + atasmart.strpool.c: atasmart.c strpool + $(top_builddir)/strpool $< $@recipes/devicekit/libatasmart_0.13.bb +3
-2@@ -2,20 +2,14 @@ DEPENDS = "udev" LICENSE = "LGPL" SRCREV = "a80d7d5c25e88adea7b8e843cdb57143e6cfb46b" -SRC_URI = "git://git.0pointer.de/libatasmart.git;protocol=git" +SRC_URI = "git://git.0pointer.de/libatasmart.git;protocol=git \ + file://strpool.patch" S = "${WORKDIR}/git" -PR = "r1" +PR = "r2" inherit autotools lib_package
recipes/devicekit/libatasmart_0.13.bb DEPENDS = "udev" · line 21
Quoted 10 lines
recipes/devicekit/libatasmart_0.13.bb +0
-7-do_compile_prepend() { - rm strpool -f - ${BUILD_CC} -o strpool strpool.c - chmod +x strpool -} - do_install_append() { sed -i -e s://:/:g -e s:${base_libdir}/libudev.la:-ludev:g ${D}${libdir}/libatasmart.la } -
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFMnG91MkyGM64RGpERAlY2AJ9wplA9f6GVaujRIBGDCnAoxS55JgCfZ4Aq 9hQELdWnRM7EXaeK4hxcdSI=
=zbi2
-----END PGP SIGNATURE-----
Paul Menzel
Acked-byRe: [PATCH] libatasmart-0.13: resolve cross compile problem
Am Freitag, den 24.09.2010, 11:29 +0200 schrieb Koen Kooi:
Quoted 8 lines · Steffen Sledz
Quoted 5 lines
* This patch solves a cross/native compile problem:
| ./strpoolatasmart.catasmart.strpool.c
| ./strpool: ./strpool: cannot execute binary fileSigned-off-by Steffen Sledz <[email protected]>Acked-by Koen Kooi <[email protected]>
Build-tested with MACHINE = "beagleboard" and Ȧngström 2008.1.
I will try to get this fixed upstream.
[…]
Thanks,
Paul
Re: [PATCH] libatasmart-0.13: resolve cross compile problem
Pushed.
Signature · 8 lines
Steffen Sledz DResearch Digital Media Systems GmbH Otto-Schmirgal-Str.3, D-10319 Berlin, Germany Tel: +49 (30) 515932237 mailto:[email protected] Fax: +49 (30) 515932299 http://www.DResearch.DE Geschäftsführer: Dr. Michael Weber, Werner Mögle; Amtsgericht Berlin Charlottenburg; HRB 54412; Ust.-IDNr. DE169013825; WEEE Reg.-Nr. DE 85995642