[Clfs-support] LDD shows local dependenciesw

William Harrington kb0iic at berzerkula.org
Tue Jul 8 12:58:22 PDT 2014

On Tue, July 8, 2014 19:05, Kasindorf, Barry (Consultant) wrote:
> Hi,
> I am building CLFS for x86-unknown using the first few chapters of the
> V3.0 book from GIT. I was told this is stable enough now to use. Can't get
> v2.1 to work correctly
> What I am confused by is that when we try to run the GCC cross-compiler on
> a different host system than the one it was built on it fails. It tries to
> load the wrong (local) glibc from the /lib64 directory.
> LDD on the x86_64-unk.....-gcc in the cross-tools/bin directory shows
> dependencies on local libc.so.6 and is trying to load the wrong version of
> glibc. I assumed an ldd on the cross gcc should only try to reference
> libraries installed in /cross-tools. The libc.so only seems to be
> installed in /tools not /crosstools and LD_PATH is not loading that one
> (LD_PATH is empty).
> There is a gcc-4.8.3 but it doesn't seem to be used by the cross-tools
> when I try to build things using it.
> Any ideas?
> Thanks
> -Barry

Use readelf from cross-tools instead of using LDD from the host.

"readelf -e" and look at the interpreter.
"readelf -d" and look at the NEEDED libraries.

> CONFIDENTIALITY NOTICE: The information contained in this email message is
> intended only for use of the intended recipient. If the reader of this
> message is not the intended recipient, you are hereby notified that any
> dissemination, distribution or copying of this communication is strictly
> prohibited. If you have received this communication in error, please
> immediately delete it from your system and notify the sender by replying
> to this email.  Thank you.

This is to a public mailing list. I don't think the notice applies.


William Harrington

More information about the Clfs-support mailing list