[oe] libgcrypt tries to link with host libc

Mike Turquette mturquette at gmail.com
Mon Nov 17 05:18:49 UTC 2008


Hi all,

I'm attempting to write an external-csl-toolchain_2007q3-51 recipe for
Poky.  This uses Poky's POKYMODE mechanism which is why I've copied
the poky list on this email, however I think my error isn't
necessarily Poky-specific as it has wider applications for anyone
using an external toolchain.

When building libgcrypt-1.2.4-r5 I get the following error,
| arm-none-linux-gnueabi-libtool: link: arm-none-linux-gnueabi-gcc
-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -shared
.libs/libgcrypt_la-misc.o .libs/libgcrypt_la-global.o
.libs/libgcrypt_la-sexp.o .libs/libgcrypt_la-stdmem.o
.libs/libgcrypt_la-secmem.o .libs/libgcrypt_la-missing-string.o
.libs/libgcrypt_la-module.o .libs/libgcrypt_la-ath.o
-Wl,--whole-archive ../cipher/.libs/libcipher.a ../mpi/.libs/libmpi.a
-Wl,--no-whole-archive  -Wl,-rpath
-Wl,/home/mturquette/src/ext/build/tmp/staging/armv7a-none-linux-gnueabi/usr/lib
-L/usr/local/csl/arm-2007q3/arm-none-linux-gnueabi/lib
-L/home/mturquette/src/ext/build/tmp/staging/armv7a-none-linux-gnueabi/usr/lib
/home/mturquette/src/ext/build/tmp/staging/armv7a-none-linux-gnueabi/usr/lib/libgpg-error.so
-lnsl  -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
-Wl,--version-script=./libgcrypt.vers -Wl,-rpath-link
-Wl,/usr/local/csl/arm-2007q3/arm-none-linux-gnueabi/lib   -Wl,-soname
-Wl,libgcrypt.so.11 -o .libs/libgcrypt.so.11.2.3
| /home/mturquette/data/toolchains/arm-2007q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.1/../../../../arm-none-linux-gnueabi/bin/ld:
skipping incompatible /lib/libc.so.6 when searching for /lib/libc.so.6
| /home/mturquette/data/toolchains/arm-2007q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.1/../../../../arm-none-linux-gnueabi/bin/ld:
cannot find /lib/libc.so.6
| collect2: ld returned 1 exit status
| make[2]: *** [libgcrypt.la] Error 1

Attached is external-csl-toolchain_2007q3-51.bb.  It is basically a
clone of Poky's external-csl-toolchain_2006q3-27.bb except that
do_stage adds more stuff.  ${STAGING_DIR_TARGET}${base_libdir} does
have libc.so.6 in it but libtool doesn't seem to be picking it up and
instead tries (and fails) to link against my host /lib/libc.so.6,
which seems like a Very Bad Thing to me.

Why can't libtool find and use the libc I have in staging?  What do
the normal compiled toolchains provide that I am not?  Also, does
binconfig.bbclass know the difference between *-native packages and
cross-compiled ones?  I know prebuilt toolchains aren't all the rage
with OE devs, but some customers refuse to use toolchains built from
source :(

Thanks much,
Mike

p.s: sorry if this is a resend.  I subscribed to the list AFTER
sending it the firs time.  The original mail did not bounce, but it
also did not show up in the archives so I'm resending after my
subscription.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: external-csl-toolchain_2007q3-51.bb
Type: application/octet-stream
Size: 10211 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20081116/7966974e/attachment-0002.obj>


More information about the Openembedded-devel mailing list