Link error: host instead of target libc
Hi,
still trying to get nylon/mtx-1 built with the current OE code,
I am getting this error at install of glibc-2.3.3:
| /var/src/OE/tmp/cross/mipsel/lib/gcc-lib/mipsel-oe-linux/3.3.4/../../../../mipsel-oe-linux/bin/ld: skipping incompatible /lib/libc.so.6 when searching for /lib/libc.so.6 | /var/src/OE/tmp/cross/mipsel/lib/gcc-lib/mipsel-oe-linux/3.3.4/../../../../mipsel-oe-linux/bin/ld: cannot find /lib/libc.so.6 | collect2: ld returned 1 exit status | make[2]: *** [/var/src/OE/tmp/work/mipsel-oe-linux/glibc-2.3.3-r16/build-mipsel-oe-linux/math/libm.so] Error 1
Having asked google I found that people had this kind of problem before, but I could not extract any hint on how to solve this there. My checkout of OE dates back to this commit:
| commit 8ff9eac82736ab3adc5ffd223a39d9eafd2409be | Author: Dmitry 'MAD' Artamonow <[email protected]> | Date: Tue Feb 24 21:38:10 2009 -0800
I followed Mickey's proposal and derived my conf/distro/nylon.conf from minimal.conf adding my preferred versions etc.
Having had a longer break from nylon maintainership I seem to have missed a lot of changes in OE; and I am quite clueless now where to start searching for what causes the above error. Any hint?
Cheers,
Martin
Signature · 4 lines
----------- / http://herbert.the-little-red-haired-girl.org / ------------- =+= Man muss das Dreibein hin und wieder loben, dann geht es auch schonmal runter, den Muell wegbringen.
Quoted 7 lines · Martin Dietze
Having asked google I found that people had this kind of problem before, but I could not extract any hint on how to solve this there. My checkout of OE dates back to this commit:
| commit 8ff9eac82736ab3adc5ffd223a39d9eafd2409be | Author: Dmitry 'MAD' Artamonow <[email protected]> | Date: Tue Feb 24 21:38:10 2009 -0800
Correction, that was the wrong one, my last checkout was this:
| commit b4b4c8664e53f15a436e17151c7c8cef33b766cd | Author: woglinde <[email protected]> | Date: Tue Mar 24 12:08:58 2009 +0100
Sorry,
Martin
Signature · 4 lines
----------- / http://herbert.the-little-red-haired-girl.org / ------------- =+= Doch sie, die mich am meisten gequ�lt, ge�rgert, betr�bt, Die hat mich nie gehasset, und hat mich nie geliebt. -- H. Heine
Quoted 9 lines · On Friday 27 March 2009 02:57:51 Martin Dietze wrote:
Hi,
still trying to get nylon/mtx-1 built with the current OE code,
I am getting this error at install of glibc-2.3.3:| /var/src/OE/tmp/cross/mipsel/lib/gcc-lib/mipsel-oe-linux/3.3.4/../../../../mipsel-oe-linux/bin/ld: skipping incompatible /lib/libc.so.6 when searching for /lib/libc.so.6 | /var/src/OE/tmp/cross/mipsel/lib/gcc-lib/mipsel-oe-linux/3.3.4/../../../../mipsel-oe-linux/bin/ld: cannot find /lib/libc.so.6 | collect2: ld returned 1 exit status | make[2]: *** [/var/src/OE/tmp/work/mipsel-oe-linux/glibc-2.3.3-r16/build-mipsel-oe-linux/math/libm.so] Error 1
One reason could be that you linker is not aware of sysroot properly. As a result it does not append correct sysroot path and ends up looking at /lib which ofcourse it your host libc (x86) and hence the error. you might need to backport sysroot related patches to binutils 2.14
We have been able to build mipsel with angstrom-2008 I would suggest that you use those versions of toolchain and kernel headers for nylon to start with. Its gcc 4.2.4 binutils 2.18.x.x.x eglibc-2.9 linux-libc-headers 2.6.23
Quoted 20 lines
Having asked google I found that people had this kind of problem before, but I could not extract any hint on how to solve this there. My checkout of OE dates back to this commit:
| commit 8ff9eac82736ab3adc5ffd223a39d9eafd2409be | Author: Dmitry 'MAD' Artamonow <[email protected]> | Date: Tue Feb 24 21:38:10 2009 -0800I followed Mickey's proposal and derived my
conf/distro/nylon.conffrom minimal.conf adding my preferred versions etc.Having had a longer break from nylon maintainership I seem to have missed a lot of changes in OE; and I am quite clueless now where to start searching for what causes the above error. Any hint?
Cheers,
Martin
Signature · 1 line
Khem Raj
Quoted 4 lines · Khem Raj
One reason could be that you linker is not aware of sysroot properly. As a result it does not append correct sysroot path and ends up looking at /lib which ofcourse it your host libc (x86) and hence the error. you might need to backport sysroot related patches to binutils 2.14
Thank you for this hint, this solved it. There was a distro-specific override of EXTRA_OECONF which broke the EXTRA_OECONF_append defined elsewhere, thus the sysroot property was never applied while configuring binutils.
Cheers,
Martin
Signature · 5 lines
----------- / http://herbert.the-little-red-haired-girl.org / ------------- =+= Amongst our weaponry are such diverse elements as: fear, surprise, ruthless efficiency, an almost fanatical devotion to the Pope, and nice red uniforms - Oh damn!