|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
Issues Building on Windows/CygwinI'm having some trouble building on Windows using Cygwin. Two issues I've surmounted, but one baffles me. I'll cover all in case someone who does this a lot can point me to a better way. In Cygwin I have the latest gcc and mingw installed.
Per http://en.wikibooks.org/wiki/Io_Programming/Beginner's_Guide/Getting_Started I created the links, did "unset OS", and I built using plain "make" w/o arguments. 1) I get a parse error on mingw32/include/unistd.h:36. Looks like gcc doesn't like __attribute__((__nothrow__), so I changed _mingw.h:202 to always #define __MINGW_NOTHROW to nothing. 2) iovm/source/IoDirectory.c:49 redefined S_IRWXU, already defined in mingw/sys/stat.h:49, so I wrapped it with an #ifndef. 3) mingw32/include/math.h:534: error: parse error before '/' token This one baffles me. There's no '/' token at or near line 534, and nothing seems to #define to it. Please help! I want to prototype a potential performance improvement. TIA. |
|
|
Re: Issues Building on Windows/CygwinOn Thu, Jul 30, 2009 at 12:42 PM, klr_home<klr_home@...> wrote:
> > I'm having some trouble building on Windows using Cygwin. Are you using the latest Git code? I submitted some patches recently to fix some things. It builds out of the box on cygwin for me using gcc. I build the vm: make vm make install Then build the particular addons I need. Chris. -- http://www.bluishcoder.co.nz |
|
|
Re: Issues Building on Windows/Cygwin--- In iolanguage@..., Chris Double <chris.double@...>
> Are you using the latest Git code? Yes, I cloned git://github.com/stevedekorte/io.git on Tuesday, July 28. |
|
|
Re: Issues Building on Windows/CygwinBTW, here is one of the compile commands, one which fails. Does anything look amiss? Am I missing a -D define maybe?
gcc -mno-cygwin -DINSTALL_PREFIX=\"/usr/local\" -Os -g -Wstrict-prototypes -I. -I./source -I../basekit/_build/headers -I../coroutine/_build/headers -I../garbagecollector/_build/headers -DBUILDING_IOVM_DLL -c source/IoDirectory.c -o _build/objs/IoDirectory.o Incidentally, I noticed that each file gets compiled twice. Once with the above command with the following options after -mno-cygwin: -MM -MT _build/objs/IoDirectory.o -MF _build/objs/IoDirectory.d Everything else is the same, and the compile succeeds! Then it happens again without those options, and it fails (on certain files, with issues previously stated). What's going on here? These options aren't explained in gcc's --help list. |
|
|
Re: Issues Building on Windows/Cygwin--- In iolanguage@..., "klr_home" <klr_home@...> wrote:
> -MM -MT _build/objs/IoDirectory.o -MF _build/objs/IoDirectory.d > What's going on here? These options aren't explained in gcc's --help list. I found the gcc options here: http://www.redhat.com/docs/manuals/enterprise/RHEL-3-Manual/gcc/invoking-gcc.html My other questions are still open, though. |
|
|
Re: Issues Building on Windows/CygwinChris, what's your `uname -s` ?
Mine is CYGWIN_NT-5.1 Thx. |
|
|
Re: Issues Building on Windows/CygwinI was finally able to compile on Windows with some support from Paul Gregory. I didn't resolve the problems with Cygwin+gcc+MingW, but per his recommendation I instead used the MS compiler. Here are the steps.
1) [once] Ensure your VisualStudio has the Windows SDK. Mine didn't. (Somehow it had cl.exe and link.exe in the VC/bin, but practically nothing in VC/include.) I installed VS C++ Express, and all was well after that. 2) Start up a Visual Studio Command Prompt using the start menu link (inside the Visual Studio Tools subfolder), or from a command prompt execute "%PROGRAMFILES%\Microsoft Visual Studio 9.0\VC\vcvarsall.bat". This sets up environment variables needed by the compiler. 3) 'cd' to your Git source root folder for Io. 4) Run "bash" so that Cygwin tools, "make" in particular, are available. 5) [once] Run "which link" and ensure it finds VisualStudio's link, not Cygwin's (/bin/link). If this finds Cygwin's, you need to edit your ~/.bashrc file so that the $PATH will contain /bin after the VS bin folder, then restart from step 2. 6) make SYS=Windows vm Note that "make CC=cl vm" doesn't work. If SYS is unset, it gets set in the makefile as `uname -s`, which is something like CYGWIN_NT-5.1, and all the command line options will be those of gcc, which are inappropriate for compiling with the Microsoft compiler, cl. INSTALL_PREFIX is no longer needed here on Windows; you can move the installation around, and Io will still work. 7) make SYS=Windows addons Builds addons. Some won't build because needed libraries (header files) aren't present. Some others fail to build with errors. Still, some build and are usable. 8) make SYS=Windows INSTALL_PREFIX=C:/Io install Installs Io where specified. Note, use forward slashes here, not backslashes. |
|
|
Re: Re: Issues Building on Windows/CygwinThanks for the tips - would you mind if I included your post in Io's readme file? On 2009-08-02, at 10:12 PM, klr_home wrote: > I was finally able to compile on Windows with some support from Paul > Gregory. I didn't resolve the problems with Cygwin+gcc+MingW, but > per his recommendation I instead used the MS compiler. Here are the > steps. > > 1) [once] Ensure your VisualStudio has the Windows SDK. Mine didn't. > (Somehow it had cl.exe and link.exe in the VC/bin, but practically > nothing in VC/include.) I installed VS C++ Express, and all was well > after that. > > 2) Start up a Visual Studio Command Prompt using the start menu link > (inside the Visual Studio Tools subfolder), or from a command prompt > execute "%PROGRAMFILES%\Microsoft Visual Studio 9.0\VC > \vcvarsall.bat". This sets up environment variables needed by the > compiler. > > 3) 'cd' to your Git source root folder for Io. > > 4) Run "bash" so that Cygwin tools, "make" in particular, are > available. > > 5) [once] Run "which link" and ensure it finds VisualStudio's link, > not Cygwin's (/bin/link). If this finds Cygwin's, you need to edit > your ~/.bashrc file so that the $PATH will contain /bin after the VS > bin folder, then restart from step 2. > > 6) make SYS=Windows vm > Note that "make CC=cl vm" doesn't work. If SYS is unset, it gets set > in the makefile as `uname -s`, which is something like > CYGWIN_NT-5.1, and all the command line options will be those of > gcc, which are inappropriate for compiling with the Microsoft > compiler, cl. INSTALL_PREFIX is no longer needed here on Windows; > you can move the installation around, and Io will still work. > > 7) make SYS=Windows addons > Builds addons. Some won't build because needed libraries (header > files) aren't present. Some others fail to build with errors. Still, > some build and are usable. > > 8) make SYS=Windows INSTALL_PREFIX=C:/Io install > Installs Io where specified. Note, use forward slashes here, not > backslashes. > > > > > ------------------------------------ > > Yahoo! Groups Links > > > > |
|
|
Re: Issues Building on Windows/Cygwin--- In iolanguage@..., Steve Dekorte <steve@...> wrote:
> Thanks for the tips - would you mind if I included your post in Io's > readme file? Be my guest! I'm glad you find it of use. -- Keith |
| Free embeddable forum powered by Nabble | Forum Help |