Shen, Chang (MSFC-EV43) wrote:
Hi All

Can anyone provide me with a step-by-step instruction to build newlib under 
window10 cygwin32 or cygwin64?
Such as tool chain and environment settings.  I googled and could not find it.

I followed the instruction in here:  
https://cygwin.com/faq/faq.html#faq.programming.building-cygwin  section 6.21

I fire up a cygwin shell and I try to build it but got a lot of errors.
Under the folder `/c/cygwin/home/src' there is a folder 'newlib' where I run 
git to get the source of newlib

Those are the command I used:

$git clone git://sourceware.org/git/newlib-cygwin.git newlib

$ gcc --version
gcc (GCC) 7.3.0

$ gcc --version
gcc (GCC) 7.3.0

$ autoconf --version
autoconf (GNU Autoconf) 2.69


$mkdir build
$cd build
$../newlib/configure --prefix=/home/src/install -v

You're on the right track, but didn't follow the FAQ entry exactly. You can't build in the source directory or anywhere under the source directory. The easiest way to set up to build is to have directories laid out like this:
    XXX/build
    XXX/install
    XXX/src
where XXX is whatever you like.  In the FAQ its "/oss" but anything works.

Have XXX/src contain the source tree, as a git clone or symlink elsewhere. Then cd to XXX/build and do configure there, but reference XXX/src/configure.

The FAQ 6.21 really does explain the steps needed, but you must have the directories set up correctly, be in the correct directory, and have all the required packages needed for the platform you're building on.
HTH,

..mark


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply via email to