You were right. It was a glibc configure error. Glibc populates the paths in libc.so with absolute paths into the sysroot rather than relative from the sysroot. I *never* would have guessed it was an issue with glibc. By manually editing the paths in libc.so to /usr/lib/ I am now able to successfully compile. Next is to see if the produced executables actually run. It has taken me over a whole week to get to this point. Glibc configure must be obtaining the path from --prefix. I see no configure option to manually set the sysroot for the sake of cross compilers. Why?! Thank you for the help! It was really neat to get help from someone at SiFive! ~ Alex On Thu, Sep 5, 2019 at 1:42 PM Jim Wilson <jimw@xxxxxxxxxx> wrote: > On Thu, Sep 5, 2019 at 8:30 AM Alex <wailingoctopus@xxxxxxxxx> wrote: > > 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 > > Yes, that looks OK. If it isn't a glibc configure error, then I don't > know what the next most common problem might be. Some glibc libraries > are linker scripts, like $(sysroot)/usr/lib/libc.so. You should check > those to make sure the paths are correct. They should all be sysroot > relative. You can check the default linker script by running the > cross linker with --verbose and no other options. Make sure the paths > in there are OK too, again, they should be sysroot relative. > > Jim >