Trouble with --with-sysroot

Alex wailingoctopus@gmail.com
Thu Sep 5 15:31:00 GMT 2019


Thank you for the help!

Looking at my configure options I don't set the libdir for glibc.

.../glibc/configure --build=x86_64-unknown-linux-gnu --host=$target
--target=$target --prefix=/home/alex/sysroot/usr
--with-headers=/home/alex/sysroot/usr/include

Glibc configure's --help does not mention a libdir setting.

I would guess that setting --with-headers to a subdirectory of --prefix
would cause no issues.

Nor do I change the libdir in gcc and binutils at any point.

On Wed, Sep 4, 2019 at 6:15 PM Jim Wilson <jimw@sifive.com> wrote:

> On Wed, Sep 4, 2019 at 12:46 PM Alex <wailingoctopus@gmail.com> wrote:
> > .../$TARGET-ld cannot find /home/alex/sysroot/usr/lib/libc.so.6 inside
> > /home/alex/sysroot
>
> This usually indicates a glibc configure error.  When you configured
> glibc, target paths are relative to the sysroot, but you probably did
> something like set libdir to $(sysroot)/usr/lib when it should have
> been just /usr/lib instead, so now the linker is looking for a file
> $(sysroot)/usr/lib/X inside $(sysroot), when it should have been
> looking for the file /usr/lib/X inside $(sysroot).
>
> Jim
>



More information about the Gcc-help mailing list