Skip to contentSkip to conversation

libatasmart_0.13.bb: `No package 'libudev' found` and `./strpool: ./strpool: cannot execute binary file`

PATCH In review Paul Menzel 3 participants 9 messages Sep 23, 2010 – Sep 24, 2010

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw

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 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
[…]

Quoted 4 lines

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.)

Yes i saw exactly this error.

Steffen

#2 lore raw
In reply to Paul Menzel

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
| ./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].

Quoted 7 lines
        do_compile_prepend() {
        	rm strpool -f
        	${BUILD_CC} -o strpool strpool.c
        	chmod +x strpool
        }

...
[2] http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/devicekit/libatasmart_0.13.bb?id=67ab615dac83b0460fa1b88dfb11c72d7c93e259

I hit the same problem. But just when building libatasmart for the first time. A second build succeeds.

Steffen

#3 lore raw
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
| ./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].

Quoted 7 lines
        do_compile_prepend() {
        	rm strpool -f
        	${BUILD_CC} -o strpool strpool.c
        	chmod +x strpool
        }

...
[2] http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/devicekit/libatasmart_0.13.bb?id=67ab615dac83b0460fa1b88dfb11c72d7c93e259

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

#4 lore raw

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
| ./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].

Quoted 7 lines
        do_compile_prepend() {
        	rm strpool -f
        	${BUILD_CC} -o strpool strpool.c
        	chmod +x strpool
        }

...
[2] http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/devicekit/libatasmart_0.13.bb?id=67ab615dac83b0460fa1b88dfb11c72d7c93e259

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

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/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.

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

#5 lore raw

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
new file mode 100644
index 0000000..e9f6ab3
@@ -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
index 992ff3e..4a4986e 100644
@@ -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
Acked-by on v1 1/1
#6 lore raw

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:
| ./strpool atasmart.c atasmart.strpool.c
| ./strpool: ./strpool: cannot execute binary file

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.patch
recipes/devicekit/libatasmart-0.13/strpool.patch new file +11 -0
new file mode 100644
index 0000000..e9f6ab3
@@ -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
index 992ff3e..4a4986e 100644
@@ -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-----

author Acked-by
#7 lore raw

Re: [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:
| ./strpool atasmart.c atasmart.strpool.c
| ./strpool: ./strpool: cannot execute binary file

Build-tested with MACHINE = "beagleboard" and Ȧngström 2008.1.

I will try to get this fixed upstream.

[…]

Thanks,

Paul

#8 lore raw

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