Issues with ld: "bootstrap with --static" rearing its ugly head

Erik Postma epostma at nl.tue.win
Tue Nov 11 12:25:23 PST 2003


Hi all,

Working on LFS 5.0 from SuSE 7.0. I had the following issues:

1) In make check of glibc, something failed. Well, it didn't exactly fail,
it just threw an error, complaining that DT_FLAGS and DF_TEXTREL were
undeclared in check-textrel.c in the functions handle_file32 and
handle_file64. 

I checked it on search.linuxfromscratch.org and found one guy with the
same issue who had seemingly resolved it by disabling the test and
continuing regardless. I did the same and found no other errors; so I
decided I'd continue. See
 http://archives.linuxfromscratch.org/
 mail-archives/lfs-dev/2003-August/036918.html
for the original post (url wrapped!)


2) During make check of binutils pass 2 in chap. 5, one test failed
unexpectedly: 

 ld/testsuite/ld-bootstrap/bootstrap.exp "bootstrap with --static"

Now I wish I had read more carefully the text saying "There should be no
unexpected fails here." Having grown bold by the "solution" to the
previous failure I decided I'd just continue again. I now realise that
was _not_ a wise thing.

3) In chapter 6 section Re-adjusting the toolchain I ran (just like the
book says) make -C ld install in the binutils-build directory, then
removed the binutils-build directory, and subsequently applied the sed
script. Then the 'make a trivial C program, compile it and readelf it'
test. This failed horribly:

# gcc dummy.c
/tools/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/../../../../i686-pc-linux-gnu/
bin/ld: error while loading shared libraries: libbfd-2.14.so: cannot open
shared object file: No such file or directory collect2: ld returned 127
exit status

After some backtracking, ld turned out to be
the problem:

# ldd /tools/bin/ld
        libbfd-2.14.so => not found
        libc.so.6 => /tools/lib/libc.so.6 (0x40017000)
        /tools/lib/ld-linux.so.2 => /tools/lib/ld-linux.so.2 (0x40000000)

Upon receiving this distress call, I again turned to
search.linuxfromscratch.org asking for pages having to do with libbfd and
approximately the fiftieth of those was a message in this thread:
 http://archives.linuxfromscratch.org/
 mail-archives/lfs-support/2003-October/020134.html
(url wrapped again!)
where in the end, a temporary fix is suggested having to do with nls by
Greg (hi!). I am very open to poking around stuff to find a real solution.

Currently thinking about how I could repair the current situation, seeing
that I can't compile anything now. I'd have to do binutils pass 1, then
gcc, lock it in, binutils pass 2 and on from there at the very least, I
guess. But I am more seriously expecting instructions to start over...:(

Thanks for any help!

-- 
Erik Postma (Email: reverse the order of nl, tue and win.)



More information about the lfs-support mailing list