When you use an external toolchain to compile packages you get an error like: "cannot find /lib/libc.so.0" Fix this by changing the paths in toolchain-folder/usr/lib/libc.so : --- libc.so.old 2010-05-10 10:54:45.602118000 +0200 +++ libc.so 2010-05-10 11:05:57.337434000 +0200 @@ -3,4 +3,4 @@ * the static library, so try that secondarily. */ OUTPUT_FORMAT("elf32-avr32", "elf32-avr32", "elf32-avr32") -GROUP ( /lib/libc.so.0 /usr/lib/uclibc_nonshared.a AS_NEEDED ( /lib/ld-uClibc.so.0 ) ) +GROUP ( ../lib/libc.so.0 ../usr/lib/uclibc_nonshared.a AS_NEEDED ( ../lib ld-uClibc.so.0 ) )
Could you precise which external toolchain you're using ? Buildroot has been tested with CodeSourcery toolchains, Crosstool-NG toolchains and Buildroot toolchains only.
Ok, I also have this problem with a Crosstool-NG eglibc toolchain while trying to compile netsnmp. It's due to the fact that libtool removes the --sysroot argument. With which package and configuration do you have this failure ?
(In reply to comment #1) > Could you precise which external toolchain you're using ? Buildroot has been > tested with CodeSourcery toolchains, Crosstool-NG toolchains and Buildroot > toolchains only. I use a external toolchain build with Buildroot (sysroot + locale enabled. uClib). This happens with Buildroot version 2010.02.
Thanks Matthias. But my previous question was: at which step of the compilation does you have this error ? Could you give some details about when the failure occurs and what are the latest parts of the build log ?
Mathias, could you add a little bit more details about how I can reproduce the build issue ? Like a .config file, or the package causing the problem, the full build log, etc.
Hi Thomas, sorry I don't have the .config files any more. the toolchain was build with buildroot in an external directory. I'll try to reproduce the error and if possible will give you some more information, ok.
Hello Thomas, right now I get a different error, maybe it's because I use 2010.05. But after all I think there is a problem, when you build an external toolchain with one buildroot and then try to build another buildroot with this toolchain. In my case I build the atngw100 with toolchain dir to /home/matthias/toolchain. Afterwards I took another buildroot (with same version) and tried to build antgw100 but stating that the external toolchain is at /home/matthias/toolchain. Check this, I'm sure you will find some bugs. Hope that helped a bit. Regards, Matthias
Can you post the .config you used for both builds (i.e the Buildroot that builds the toolchain, and the Buildroot that builds the system using the previously built toolchain) ?
Created attachment 2137 [details] config file to create external toolchain
Created attachment 2143 [details] config file of buildroot using external toolchain
Hi Thomas, I uploaded the two config files. Best regards, Matthias
Created attachment 2155 [details] config file which uses dont-touch toolchain
Created attachment 2161 [details] config file to build the toolchain
Hi, today I had the error once again, but this time I don't even have root privileges to apply the mentioned patch. I've already added the two config files (the both from 2010-07-02)... and here the output: /bin/sh ../libtool --mode=compile /home/hf/projekte/aktuell/Adaptive_Antennen/usr/all/buildroot-2010.05-dont-touch/output/build/staging_dir/usr/bin/avr32-linux-gcc -Os -pipe -Os -msoft-float -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 --sysroot /home/hfprojn1/projekte/aktuell/Adaptive_Antennen/usr/bgg/buildroot-2010.05/output/build/staging_dir/ -c -DLOCALEDIR=\"/usr/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/share/locale\" -DLIBDIR=\"/usr/lib\" -DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -fvisibility=hidden ./intl-compat.c /home/hf/projekte/aktuell/Adaptive_Antennen/usr/all/buildroot-2010.05-dont-touch/output/build/staging_dir/usr/bin/avr32-linux-gcc -Os -pipe -Os -msoft-float -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 --sysroot /home/hfprojn1/projekte/aktuell/Adaptive_Antennen/usr/bgg/buildroot-2010.05/output/build/staging_dir/ -c -DLOCALEDIR=\"/usr/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/share/locale\" -DLIBDIR=\"/usr/lib\" -DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -fvisibility=hidden ./intl-compat.c -fPIC -DPIC -o .libs/intl-compat.o /home/hf/projekte/aktuell/Adaptive_Antennen/usr/all/buildroot-2010.05-dont-touch/output/build/staging_dir/usr/bin/avr32-linux-gcc -Os -pipe -Os -msoft-float -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 --sysroot /home/hfprojn1/projekte/aktuell/Adaptive_Antennen/usr/bgg/buildroot-2010.05/output/build/staging_dir/ -c -DLOCALEDIR=\"/usr/share/locale\" -DLOCALE_ALIAS_PATH=\"/usr/share/locale\" -DLIBDIR=\"/usr/lib\" -DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/usr/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libintl_set_relocation_prefix -Drelocate=libintl_relocate -DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -fvisibility=hidden ./intl-compat.c -o intl-compat.o >/dev/null 2>&1 /bin/sh ../libtool --mode=link \ /home/hf/projekte/aktuell/Adaptive_Antennen/usr/all/buildroot-2010.05-dont-touch/output/build/staging_dir/usr/bin/avr32-linux-gcc -Os -pipe -Os -msoft-float -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 --sysroot /home/hfprojn1/projekte/aktuell/Adaptive_Antennen/usr/bgg/buildroot-2010.05/output/build/staging_dir/ -g -O2 -fvisibility=hidden -o libintl.la \ bindtextdom.lo dcgettext.lo dgettext.lo gettext.lo finddomain.lo hash-string.lo loadmsgcat.lo localealias.lo textdomain.lo l10nflist.lo explodename.lo dcigettext.lo dcngettext.lo dngettext.lo ngettext.lo plural.lo plural-exp.lo localcharset.lo lock.lo relocatable.lo langprefs.lo localename.lo log.lo printf.lo version.lo osdep.lo intl-compat.lo -liconv -lc \ -version-info 8:1:0 \ -rpath /usr/lib \ -no-undefined /home/hf/projekte/aktuell/Adaptive_Antennen/usr/all/buildroot-2010.05-dont-touch/output/build/staging_dir/usr/bin/avr32-linux-gcc -Os -pipe -Os -msoft-float -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 --sysroot /home/hfprojn1/projekte/aktuell/Adaptive_Antennen/usr/bgg/buildroot-2010.05/output/build/staging_dir/ -shared .libs/bindtextdom.o .libs/dcgettext.o .libs/dgettext.o .libs/gettext.o .libs/finddomain.o .libs/hash-string.o .libs/loadmsgcat.o .libs/localealias.o .libs/textdomain.o .libs/l10nflist.o .libs/explodename.o .libs/dcigettext.o .libs/dcngettext.o .libs/dngettext.o .libs/ngettext.o .libs/plural.o .libs/plural-exp.o .libs/localcharset.o .libs/lock.o .libs/relocatable.o .libs/langprefs.o .libs/localename.o .libs/log.o .libs/printf.o .libs/version.o .libs/osdep.o .libs/intl-compat.o -Wl,--rpath -Wl,/home/hf/projekte/aktuell/Adaptive_Antennen/usr/all/buildroot-2010.05-dont-touch/output/build/staging_dir/usr/lib -Wl,--rpath -Wl,/home/hf/projekte/aktuell/Adaptive_Antennen/usr/all/buildroot-2010.05-dont-touch/output/build/staging_dir/usr/lib /home/hf/projekte/aktuell/Adaptive_Antennen/usr/all/buildroot-2010.05-dont-touch/output/build/staging_dir/usr/lib/libiconv.so -L/home/hf/projekte/aktuell/Adaptive_Antennen/usr/all/buildroot-2010.05-dont-touch/output/build/staging_dir/lib -L/home/hf/projekte/aktuell/Adaptive_Antennen/usr/all/buildroot-2010.05-dont-touch/output/build/staging_dir/usr/lib -lc -msoft-float -Wl,-soname -Wl,libintl.so.8 -o .libs/libintl.so.8.0.1 /home/hfprojn1/projekte/aktuell/Adaptive_Antennen/usr/all/buildroot-2010.05-dont-touch/output/build/staging_dir/usr/bin/../lib/gcc/avr32-unknown-linux-uclibc/4.2.2/../../../../avr32-unknown-linux-uclibc/bin/ld: cannot find /lib//libc.so.0 collect2: ld returned 1 exit status make[4]: *** [libintl.la] Fehler 1 make[4]: Leaving directory `/home/hfprojn1/projekte/aktuell/Adaptive_Antennen/usr/bgg/buildroot-2010.05/output/build/gettext-0.16.1/gettext-runtime/intl' make[3]: *** [all-recursive] Fehler 1 make[3]: Leaving directory `/home/hfprojn1/projekte/aktuell/Adaptive_Antennen/usr/bgg/buildroot-2010.05/output/build/gettext-0.16.1/gettext-runtime' make[2]: *** [all] Fehler 2 make[2]: Leaving directory `/home/hfprojn1/projekte/aktuell/Adaptive_Antennen/usr/bgg/buildroot-2010.05/output/build/gettext-0.16.1/gettext-runtime' make[1]: *** [all-recursive] Fehler 1 make[1]: Leaving directory `/home/hfprojn1/projekte/aktuell/Adaptive_Antennen/usr/bgg/buildroot-2010.05/output/build/gettext-0.16.1' make: *** [/home/hfprojn1/projekte/aktuell/Adaptive_Antennen/usr/bgg/buildroot-2010.05/output/build/gettext-0.16.1/gettext-runtime/src/gettext] Fehler 2 cheers, matthias
Ok, I managed to reproduce the issue, and I have a fix currently being tested for it. Should hopefully be merged before 2010.08.
Even though I didn't reproduce the /lib/libc.so.0 failure during the gettext build as our reporter did, http://git.buildroot.net/buildroot/commit/?id=3c77bab2eeace3ee675bd745ca335fa3dd1630bb fixes a similar problem. So I think this bug has been fixed now. If you manage to reproduce the bug with the current Buildroot Git, please reopen this bug.