This problem appears when the Host binutils version and arch matches that of the version we are building. To reproduce this with the bernard (binutils_2.21.bb) and OpenSuSe 11.4 which binutils-2.21-13.1.x86_64. The problem is when the sysinfo (host tool) is built within bintuils-2.21/build.blah/binutils directory, it gets an LD_LIBRARY_PATH that includes locally built libraries that are not compatible with the host system libraries. This command will reproduce the problem directly (clearly you need to modify the directories on for your system). LD_LIBRARY_PATH=/srv/home/swold/bernard/build/tmp/work/x86_64-poky-linux/binutils-2.21-r0/binutils-2.21/build.x86_64-poky-linux.x86_64-poky-linux/./bfd/.libs:/srv/home/swold/bernard/build/tmp/work/x86_64-poky-linux/binutils-2.21-r0/binutils-2.21/build.x86_64-poky-linux.x86_64-poky-linux/./prev-bfd/.libs:/srv/home/swold/bernard/build/tmp/work/x86_64-poky-linux/binutils-2.21-r0/binutils-2.21/build.x86_64-poky-linux.x86_64-poky-linux/./opcodes/.libs:/srv/home/swold/bernard/build/tmp/work/x86_64-poky-linux/binutils-2.21-r0/binutils-2.21/build.x86_64-poky-linux.x86_64-poky-linux/./prev-opcodes/.libs:/srv/home/swold/bernard/build/tmp/sysroots/x86_64-linux/usr/bin/../lib/pseudo/lib:/srv/home/swold/bernard/build/tmp/sysroots/x86_64-linux/usr/bin/../lib/pseudo/lib strace -s 8192 -f -o as_fail.out /usr/bin/as -Qy --64 -o sysinfo.o sysinfo.s The libbfd-2.21.so and libopcodes-2.21.so are opened from the bfd/.libs and opcodes/.libs local build. The build.blah/Makefile (which is generated from Makefile.in) has settings for a HOST_LIB_PATH which may not be correct, that a starting point for this bug.
Saul, Josh, I wonder why it does not hit non-suse x86-64 hosts. If you know any insight let me know. Thanks, Nitin
I guess it is coming from the matching binutils version on the host. Nitin
Correct, on other hosts, the binutils is either an older version or is installed using a different version or extension for example on ubuntu 2.21.53.20110810-0ubuntu5 had a date in the version string and therefore is not a match.
more findings: the problem is wrong LD_LIBRARIES_PATH while running distro gcc. poky sets : CC_FOR_BUILD = gcc which is correct, a distro gcc for compiling buildtime tools. And we have setup LD_LIBRARIES_PATH including build sysroots for do_compile, The solution is to not pass our LD_LIBRARIES_PATH while executing distro binaries. This commit for fixing this issue is mailed to yocto mailing list: http://git.yoctoproject.org/cgit.cgi/poky-contrib/commit/?h=nitin/bugfix&id=6bd4afcd3f351bb92e2573d487b135c965fce0aa
sent a commit to fix this issue to mailing list
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=ad73b121e57cbb67e8d638f6299d1ceb9a75a94f