* needed : building instruction of newlib under window 10 cygwin32 or cygwin64ls
@ 2018-07-27 19:10 Shen, Chang (MSFC-EV43)
2018-07-27 22:29 ` Mark Geisert
0 siblings, 1 reply; 5+ messages in thread
From: Shen, Chang (MSFC-EV43) @ 2018-07-27 19:10 UTC (permalink / raw)
To: cygwin
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
....
---lots of messages print out from configure script. No error.
....
$ make
make[1]: Entering directory `/c/cygwin/home/src/build'
mkdir -p -- ./etc
Configuring in ./etc
configure: creating cache ./config.cache
checking for a BSD-compatible install... /usr/bin/install -c
/usr/bin/sed: -e expression #1, char 1: unknown command: `C'
configure: updating cache ./config.cache
configure: creating ./config.status
/usr/bin/sed: -e expression #1, char 138: unterminated `s' command
config.status: creating Makefile
/usr/bin/sed: -e expression #1, char 1: unknown command: `C'
make[2]: Entering directory `/c/cygwin/home/src/build/etc'
make[2]: *** No rule to make target `@MAINT@', needed by `../../newlib/etc/configure'. Stop.
make[2]: Leaving directory `/c/cygwin/home/src/build/etc'
make[1]: *** [all-etc] Error 2
make[1]: Leaving directory `/c/cygwin/home/src/build'
make: *** [all] Error 2
Thanks and Best Wish
Chang
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: needed : building instruction of newlib under window 10 cygwin32 or cygwin64ls
2018-07-27 19:10 needed : building instruction of newlib under window 10 cygwin32 or cygwin64ls Shen, Chang (MSFC-EV43)
@ 2018-07-27 22:29 ` Mark Geisert
2018-07-27 23:11 ` Mark Geisert
0 siblings, 1 reply; 5+ messages in thread
From: Mark Geisert @ 2018-07-27 22:29 UTC (permalink / raw)
To: cygwin
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: needed : building instruction of newlib under window 10 cygwin32 or cygwin64ls
2018-07-27 22:29 ` Mark Geisert
@ 2018-07-27 23:11 ` Mark Geisert
0 siblings, 0 replies; 5+ messages in thread
From: Mark Geisert @ 2018-07-27 23:11 UTC (permalink / raw)
To: cygwin
Replying to myself to correct things...
Mark Geisert wrote:
> 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 should read better. I see so many "how to build Cygwin" questions I read
yours as another one. You're doing something different. Here's what works:
cd /opt (for example)
mkdir build install
ln -s your-source-directory src
cd build (so you're in /opt/build)
/opt/src/configure --prefix=/opt/install -v
mkdir newlib
cd newlib (so you're in /opt/build/newlib)
/opt/src/newlib/configure --prefix=/opt/install/newlib -v
make
That will create libm.a, libg.a, and libc.a in /opt/build/newlib.
..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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: needed : building instruction of newlib under window 10 cygwin32 or cygwin64ls
2018-07-28 20:44 Shen, Chang (MSFC-EV43)
@ 2018-07-30 1:52 ` Mark Geisert
0 siblings, 0 replies; 5+ messages in thread
From: Mark Geisert @ 2018-07-30 1:52 UTC (permalink / raw)
To: cygwin
Shen, Chang (MSFC-EV43) wrote:
> Hi Mark:
>
> Great!
>
> It works now. Only after I did below to filter out anything from windows path. I guess something was used other than cygwin's tools.
>
> export path=/usr/local/bin:/bin:/usr/bin:
That would certainly explain some of your difficulties :). I'm not sure how you
set up your Cygwin environment. But usually, the setup*.exe program one gets
from the project's home page https://cygwin.com takes care of everything.
> In your replay, you did not run make in cygwin. Instead going to newlib to run make. Is this because we already has cygwin?
> I went up one level to in src folder and run make. It builds. But this step is not needed, right?
It depends on what you want to build :-). You originally said you wanted to
build newlib, so I provided steps for that. If you build in the topmost build
directory, then all of the Cygwin DLL and Cygwin support programs are built.
(Not Cygwin-hosted packages. Those are built separately.) All Cygwin programs
and the Cygwin DLL itself use newlib as their C runtime library, because they
don't use glibc like Linux programs do.
So, for example, if you were developing or debugging something in the Cygwin
DLL, you'd build at the top level. But if you only need newlib, you can build
just that. But that only works if you configure at top build level then
configure at newlib level.
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: needed : building instruction of newlib under window 10 cygwin32 or cygwin64ls
@ 2018-07-28 20:44 Shen, Chang (MSFC-EV43)
2018-07-30 1:52 ` Mark Geisert
0 siblings, 1 reply; 5+ messages in thread
From: Shen, Chang (MSFC-EV43) @ 2018-07-28 20:44 UTC (permalink / raw)
To: cygwin, mark
Hi Mark:
Great!
It works now. Only after I did below to filter out anything from windows path. I guess something was used other than cygwin's tools.
export path=/usr/local/bin:/bin:/usr/bin:
In your replay, you did not run make in cygwin. Instead going to newlib to run make. Is this because we already has cygwin?
I went up one level to in src folder and run make. It builds. But this step is not needed, right?
Thanks
Chang
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-07-27 23:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-27 19:10 needed : building instruction of newlib under window 10 cygwin32 or cygwin64ls Shen, Chang (MSFC-EV43)
2018-07-27 22:29 ` Mark Geisert
2018-07-27 23:11 ` Mark Geisert
2018-07-28 20:44 Shen, Chang (MSFC-EV43)
2018-07-30 1:52 ` Mark Geisert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).