Results 1 to 4 of 4
Binutils compiled successfully but when I run the "make bootstrap" command to compile GCC I get an error (after a few minutes):
libgcc/32/unwind-c_s.o -lc && rm -f 32/libgcc_s.so && if ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-14-2006 #1Just Joined!
- Join Date
- Jul 2006
- Posts
- 52
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):
Any ideas?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
- 10-27-2006 #2Just Joined!
- Join Date
- Oct 2006
- Location
- South England
- Posts
- 5
It seems like you're missing a required libraries .
You see where it says
>>/tools/x86_64-unknown-linux-gnu/bin/ld: cannot find -lc
That means it cant find 'libc' . probably something like 'libc.so.6' or 'libc-2.3.6'.
I think you need to install Glibc . If you're doing LFS , you'll probably need to install 'Glibc-2.3.6' , then do GCC .
>>/tools/x86_64-unknown-linux-gnu/bin/ld: cannot find -lc
^If (when you run a configure script for the source you're building) you add 'x86_64-myos-linux-gnu' , you'll have your own custom target .
eg. ./configure --prefix=/usr x86_64-"put-distro-name-here"-linux-gnu
then it wont be targeted at 'x86_64-unknown-linux-gnu' .
(Its a good idea to specify your target for building Gcc+Binutils etc .)
- 03-29-2012 #3Just Joined!
- Join Date
- Mar 2012
- Location
- Luxembourg
- Posts
- 1
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".
- 03-29-2012 #4forum.guy
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,733
this thread is almost 6 years old, so locking...
oz



