This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Not able to find libraries if sysroot= tooldir
- From: Christer Solskogen <christer dot solskogen at gmail dot com>
- To: binutils at sourceware dot org
- Date: Fri, 18 Jan 2019 08:10:03 +0100
- Subject: Re: Not able to find libraries if sysroot= tooldir
- References: <q1pgqa$fi0$1@blaine.gmane.org> <20190118023942.GC29797@bubble.grove.modra.org>
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.