p54 'make -C ld clean' -> no ld directory

Micheal E Cooper mcooper at miyazaki-mic.ac.jp
Thu Nov 3 18:09:04 PST 2005

As an addition and in good faith, the only FAQ entry that looks like my
problem is:
ld: cannot find -lc
    You get a message early in chapter 5 (LFS-4.1) or at the first pass of
gcc (LFS CVS) which ends like this:
    -static -o gengenrtl \ gengenrtl.o ../libiberty/libiberty.a
    ld: cannot find -lc
    collect2: ld returned 1 exit status
    Your host system is probably Mandrake 9 or higher. By default, its
base system does not have a static C library (/usr/lib/libc.a) which
is required for the static compilation of packages.
    You need to install the glibc-static-devel RPM, which is on the third
CD. You can verify the succesfull installation by verifying that
/usr/lib/libc.a exists. If you're using LFS 4.1, check that everything
in $LFS/static/bin is built static by using file $LFS/static/bin/*. If
a package is not statically linked, reinstall it with the instructions
from chapter 5.

However, it is not the same error message, and I am getting errors when I
try to install binutils itself. Also, I am using FC4, not Mandrake.

Do FC4 and Mandrake have the same problem?

> Newly joined the list. Nice to meet you. I very much appreciate LFS, and I
> hope that someday in the not-so-distant future, I will be able to
> contribute to it. However, for the time being, I am still learning.
> Wonderful project this is.
> If I end up violated etiquette, please tell me and I will change my
> behavior.
> Now onto my problem:
> After I went through the bin-utils "configure - make - make install"
> sequence, I tried to execute the commands on page 54:
> make -C ld clean
> But an error tells me that there is no such directory as ld.
> The only thing that I can think would have caused a problem is that, the
> first time I tried to compile and install bin-utils, I did it using the
> time function, with the syntax on LFS page 53. It gave me a time to use
> for my SBU, but nothing was written to /tools. When I then did the
> commands separately, in the order they are written in the book, some
> things were installed in /tools. However, I still get the "no ld
> directory" error when I try to do 'make -C ld clean'.
> Since I did everything in exactly the order in the book as user lfs, I was
> still in my binutils-build directory, when I did the 'make -C ld clean.'
> Thinking that maybe I was in the wrong place, I checked /tools to see if
> there was an ld dir, but there wasn't.
> I have followed the book directions exactly, not customizing anything. I
> am using LFS 6.1, the stable version. My host system is FC4 default
> install. I am using packages copied from the latest LFS Live CD, and I
> confirmed that they are the same versions as the ones in the LFS book I am
> using, so I don't think packages are the problem. The only thing that
> might be relevant is the fact that the copied-over files belong to
> mcooper, not user lfs. Since the perm are 644, I did not think that was
> part of the problem.
> Running config.guess from binutils gave me i686-pc-linux-gnu as the target
> triplet, and upon examination of my /lib directory, I found ld-linux.so.2,
> implying that my host system is pretty much like the vanilla environment
> described in the book.
> Also, I looked at the errata on the LFS site and checked the FAQs, but I
> did not see anything that looked like it might be relevant.
> --
> http://linuxfromscratch.org/mailman/listinfo/lfs-support
> FAQ: http://www.linuxfromscratch.org/lfs/faq.html
> Unsubscribe: See the above information page

More information about the lfs-support mailing list