Linux From Scratch GCC Compile Error
Binutils compiled successfully but when I run the "make bootstrap" command to compile GCC I get an error (after a few minutes):
Quote:
libgcc/32/unwind-c_s.o -lc && rm -f 32/libgcc_s.so && if [ -f 32/libgcc_s.so.1 ]; then mv -f 32/libgcc_s.so.1 32/lib gcc_s.so.1.backup; else true; fi && mv 32/libgcc_s.so.1.tmp 32/libgcc_s.so.1 && ln -s libgcc_s.so.1 32/libgcc_s.so
/tools/x86_64-unknown-linux-gnu/bin/ld: skipping incompatible /usr/lib/../lib/li bc.so when searching for -lc
/tools/x86_64-unknown-linux-gnu/bin/ld: skipping incompatible /usr/lib/../lib/li bc.a when searching for -lc
/tools/x86_64-unknown-linux-gnu/bin/ld: skipping incompatible /usr/lib/libc.so w hen searching for -lc
/tools/x86_64-unknown-linux-gnu/bin/ld: skipping incompatible /usr/lib/libc.a wh en searching for -lc
/tools/x86_64-unknown-linux-gnu/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make[3]: *** [32/libgcc_s.so] Error 1
make[3]: Leaving directory `/mnt/lfs/tools/gcc-build/gcc'
make[2]: *** [stmp-multilib] Error 2
make[2]: Leaving directory `/mnt/lfs/tools/gcc-build/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/mnt/lfs/tools/gcc-build/gcc'
make: *** [bootstrap] Error 2
Any ideas?
ld skipping incompatible library
This must be another problem, because if the library could not be found it will say something like "/usr/bin/ld -lc: could not locate library". Your message sounds more then a library which is different then your headers. "/usr/bin/ld -lc: skipping incompatible library" is emitted when you try to link a 32bit program to a 64bit library (in my case it was this problem), and I could solve this with "LD_LIBRARY_PATH=blah:blah/blah". Don't forget that you can also use the option "--build-sysroot=/blah".