ld: cannot find -lc while compiling gcc

Dave Goss dave_goss at yahoo.com
Mon Feb 28 15:52:22 PST 2005

I had the same problem, with the same distrobution,
Mandrake 10.1 (but I used the mini-install where you
download the packages during installation).

genmodes.o errors.o ../libiberty/libiberty.a
/tools/i686-pc-linux-gnu/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make[2]: *** [genmodes] Error 1
make[2]: Leaving directory
make[1]: *** [stage2_build] Error 2
make[1]: Leaving directory
make: *** [bootstrap] Error 2

This is the second time I have built this section of
LFS 6.0.  The first time I used a package from the GCC
website.  It was just gcc-3.4.1, not gcc-core and
gcc-c++ or anything else.  Just a single tarball. 
Using that package seemed to work fine compared to the
one supplied in the LFS packages tarball.  Is there
any logical reason to this?  What could be causing the
error?  Should Mandrake 10.1 users not use the gcc
tarballs suppiled and download them from gcc project's
website instead?

P.S.  I am not subscribed to the mailing list.  My
email address is dave_goss at yahoo.com

>Fri Dec 24 07:41:35 MST 2004
>I'm trying LFS for the first time on mandrake 10.1
>official. While building gcc during pass 1 i get the
>following error:
>/tools/i686-pc-linux-gnu/bin/ld: cannot find -lc
>A more complete error message is the following:
>stage1/xgcc -Bstage1/ -B/tools/i686-pc-linux-gnu/bin/
>-g -O2 -DIN_GCC -W -Wall -Wwrite-strings
>-Wstrict-prototypes -Wmissing-prototypes -pedantic
>-Wno-long-long -Wold-style-definition -DHAVE_CONFIG_H
>-DGENERATOR_FILE -static -o genmodes \
>genmodes.o errors.o ../libiberty/libiberty.a
>/tools/i686-pc-linux-gnu/bin/ld: cannot find -lc
>collect2: ld returned 1 exit status
>make[2]: *** [genmodes] Error 1
>make[2]: Leaving directory
>make[1]: *** [stage2_build] Error 2
>make[1]: Leaving directory
>make: *** [bootstrap] Error 2
>My binutils compiled without any problem. Any ideas?

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the lfs-support mailing list