ld cannot find -lc (chap. 5 LFS-6)

Jeremy Utley jeremy at jutley.org
Fri Dec 17 00:36:10 PST 2004

Ron Keller wrote:

> I have run into a problem in Chapter 5 of the LFS-6.0 book.  The book 
> suggests performing  sanity check after adjusting the toolchain. And 
> this is whee I am having a problem.
> Command line:
>  echo 'main(){}' > dummy.c    --- this produces no error
>   cc dummy.c --- this produces the following error::
>   /mnt/lfs/tools/bin ../lib/gcc/i586-pc-linux-gnu/3.4.1 
> ../../../../i586-pc-linux-gnu/bin/ld: cannot find -lc
>   collect 2: ld returned 1 exit status
> My host system is a bootable LFS cd which was created from the file 
> boot-cd-6.0-2004.0912.iso.  I  have bennvery careful to follow the 
> instructions in the book.  Now what?  Help would be appreciated
> rk

This would tell me that your editing of the specs file done just before 
this sanity check didn't occur properly - or your glibc is not installed 

First, check to ensure that /tools/lib/libc.so is present.  Then eyeball 
the GCC specs file that was edited earlier to ensure it looks correct.

That would be my first two suggestions for this particular one - if the 
initial pass 1 compiles went ok.


More information about the lfs-support mailing list