This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Not able to find libraries if sysroot= tooldir


On 18.01.2019 03:39, Alan Modra wrote:
On Thu, Jan 17, 2019 at 10:12:48AM +0100, Christer Solskogen wrote:
/opt/cross/x86_64-blug-linux-gnu/bin/ld: cannot find crti.o: No such file or
directory

This one isn't anything to do with ld.  gcc isn't finding crti.o and
thus isn't passing the full path to ld.


Which is weird. Is gcc to blame?

builder@centos6-builder:/tmp$ x86_64-blug-linux-gnu-gcc -print-sysroot
/opt/cross/x86_64-blug-linux-gnu
builder@centos6-builder:/tmp$ x86_64-blug-linux-gnu-ld -print-sysroot
/opt/cross/bin/../x86_64-blug-linux-gnu

Both of them point to the same sysroot.

/opt/cross/x86_64-blug-linux-gnu/bin/ld: cannot find -lc

If your libc.so is a script as it usually is on linux, do you have the
paths correct in the script?  They shouldn't include the sysroot
prefix..


As I've said: If sysroot it set to /opt/cross/x86_64-blug-linux-gnu/sysroot or /opt/cross/x86_64-blug-linux-gnu.sysroot - the error does not occur.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]