gcc-3.4.1 build error - cannot find -lc

peatches peatches at blueyonder.co.uk
Mon Feb 7 07:18:55 PST 2005


Hi everyone,
I get the error below when I enter <make BOOT_LDFLAGS="-static"
bootstrap> as decribed in Section 5.5.1 of LFS 6.0.

My host system is an AMD Athlon XP2000 running SuSE Linux v9.1 (linux
version 2.6.4-52-default).

The error is still present if I enter <make BOOT_LDFLAGS="-static">
without the bootstrap. This would suggest the problem is on the host
system not the target.

The files /usr/lib/libc.a and /usr/lib/libc.so are present on the host
system as mentioned in FAQ.

I have installed all the packages associated with gcc on the host
system. Is there something I have missed?

Error Message:
./xgcc -B./ -B/tools/i686-pc-linux-gnu/bin/ -isystem
/tools/i686-pc-linux-gnu/include -isystem
/tools/i686-pc-linux-gnu/sys-include
-L/mnt/lfs/gcc-build/gcc-3.4.1/gcc/../ld -O2  -DIN_GCC    -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT
-DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -shared -nodefaultlibs
-Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc/./libgcc.map -o
libgcc_s.so.1   libgcc/./_muldi3.o libgcc/./_negdi2.o
libgcc/./_lshrdi3.o libgcc/./_ashldi3.o libgcc/./_ashrdi3.o
libgcc/./_cmpdi2.o libgcc/./_ucmpdi2.o libgcc/./_floatdidf.o
libgcc/./_floatdisf.o libgcc/./_fixunsdfsi.o libgcc/./_fixunssfsi.o
libgcc/./_fixunsdfdi.o libgcc/./_fixdfdi.o libgcc/./_fixunssfdi.o
libgcc/./_fixsfdi.o libgcc/./_fixxfdi.o libgcc/./_fixunsxfdi.o
libgcc/./_floatdixf.o libgcc/./_fixunsxfsi.o libgcc/./_fixtfdi.o
libgcc/./_fixunstfdi.o libgcc/./_floatditf.o libgcc/./_clear_cache.o
libgcc/./_trampoline.o libgcc/./__main.o libgcc/./_absvsi2.o
libgcc/./_absvdi2.o libgcc/./_addvsi3.o libgcc/./_addvdi3.o
libgcc/./_subvsi3.o libgcc/./_subvdi3.o libgcc/./_mulvsi3.o
libgcc/./_mulvdi3.o libgcc/./_negvsi2.o libgcc/./_negvdi2.o
libgcc/./_ctors.o libgcc/./_ffssi2.o libgcc/./_ffsdi2.o libgcc/./_clz.o
libgcc/./_clzsi2.o libgcc/./_clzdi2.o libgcc/./_ctzsi2.o
libgcc/./_ctzdi2.o libgcc/./_popcount_tab.o libgcc/./_popcountsi2.o
libgcc/./_popcountdi2.o libgcc/./_paritysi2.o libgcc/./_paritydi2.o
libgcc/./_divdi3.o libgcc/./_moddi3.o libgcc/./_udivdi3.o
libgcc/./_umoddi3.o libgcc/./_udiv_w_sdiv.o libgcc/./_udivmoddi4.o
libgcc/./unwind-dw2.o libgcc/./unwind-dw2-fde-glibc.o
libgcc/./unwind-sjlj.o libgcc/./gthr-gnat.o libgcc/./unwind-c.o -lc &&
rm -f libgcc_s.so && ln -s libgcc_s.so.1 libgcc_s.so
/tools/i686-pc-linux-gnu/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make[3]: *** [libgcc_s.so] Error 1
make[3]: Leaving directory `/mnt/lfs/gcc-build/gcc-3.4.1/gcc'
make[2]: *** [libgcc.a] Error 2
make[2]: Leaving directory `/mnt/lfs/gcc-build/gcc-3.4.1/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/mnt/lfs/gcc-build/gcc-3.4.1/gcc'
make: *** [bootstrap] Error 2

Any help would be appreciated.

Peatches




More information about the lfs-support mailing list