Error while re-adjusting toolchain (6.12)

Dan Nicholson dbn.lists at gmail.com
Wed Jun 21 11:15:20 PDT 2006


On 6/21/06, Michael Limiero <mike5713 at gmail.com> wrote:
> On 6/20/06, Dan Nicholson <dbn.lists at gmail.com> wrote:
> > Could you print back the results from this command?
> >
> > $(cc --print-prog-name=ld) --verbose | grep SEARCH
> >
> > Something seems to be wrong with the binutils linker.
> SEARCH_DIR("/tools/i686-pc-linux-gnu/lib"); SEARCH_DIR("/usr/lib");
> SEARCH_DIR("/lib");
>
> Hmm, shouldn't that be in the opposite order?

No, that's correct.  ld always attaches ${prefix}/${arch}/lib to the
front of the path.  If everything's been done correctly, that
directory should be pretty much empty, though.  The rest of the path
is exactly what you gave in LIB_PATH during binutils-pass2.

OK, so the ld that cc is going to use is looking in /lib, but it's not
finding ld-linux.so.2.  Could you try compiling the dummy program
again, but this time turn on the linker verbosity?  Run this command

cc -Wl,--verbose dummy.c &> dummy.log

This just redirects all the messages to dummy.log.  Now look at the
bottom of this file.  It should show the various places that the
libraries are being found in.  Could you paste the output here?

--
Dan



More information about the lfs-support mailing list