Page 1 of 1
Problem installing newlib
Posted: Mon Nov 03, 2014 10:46 pm
by Bth8
I am trying to port newlib to my kernel. Everything configures and builds correctly, but when I try to install, it doesn't put anything in $PREFIX/include or $PREFIX/lib. It puts it all into $PREFIX/$TARGET/include and $PREFIX/$TARGET/lib. As a result, gcc and ld can't find the headers or library files.
Re: Problem installing newlib
Posted: Tue Nov 04, 2014 1:55 am
by max
Bth8 wrote:I am trying to port newlib to my kernel. Everything configures and builds correctly, but when I try to install, it doesn't put anything in $PREFIX/include or $PREFIX/lib. It puts it all into $PREFIX/$TARGET/include and $PREFIX/$TARGET/lib. As a result, gcc and ld can't find the headers or library files.
What gcc do you use? Did you follow the
OS Specific Toolchain page?
Re: Problem installing newlib
Posted: Tue Nov 04, 2014 10:15 am
by Bth8
max wrote:Bth8 wrote:I am trying to port newlib to my kernel. Everything configures and builds correctly, but when I try to install, it doesn't put anything in $PREFIX/include or $PREFIX/lib. It puts it all into $PREFIX/$TARGET/include and $PREFIX/$TARGET/lib. As a result, gcc and ld can't find the headers or library files.
What gcc do you use? Did you follow the
OS Specific Toolchain page?
Yes, That's what I'm following. Binutils and the first pass on GCC are done and installed. The path is set correctly. Newlib is using the correct gcc. Everything compiles correctly, but upon install, newlib puts all includes and libs a directory too low. Then gcc can't find the headers and ld can't find the libs, so gcc pass 2 fails. Binutils, GCC, and newlib are all configured with the same target. Newlib's prefix is /usr and it's being installed with DESTDIR set to my sysroot. GCC and Binutils both have the correct sysroot set.