compling spring on windows using cygwin with mingw
Moderator: Moderators
-
- Posts: 823
- Joined: 21 Oct 2008, 02:54
compling spring on windows using cygwin with mingw
I did some modification to the cmake file in the spring folder so that it includes the mingw32 libraries when compiling with cygwin.
Here some things to note: FIND_PACKAGE works differently for cygwin (doesn't seemed to find the zib for instance even though I manged to hook the mingwlib files, it's looking at the default unix locaiton, even though I'm using the mingw32 libaries). I can't use the default compiler as it the binary requires the dll that comes with cygwin in order to run it properly( it thinks that it doesn't have c11 support, due to missing flags, but it does nevertheless), so I have to use the mingw that comes with it,(The 64mingw package comes with the 32 version btw).
So the question is, that should I edit other cmake files to use the mingwlib when using cygwin or I doing this the hard way?
Edit: Clarification
Here some things to note: FIND_PACKAGE works differently for cygwin (doesn't seemed to find the zib for instance even though I manged to hook the mingwlib files, it's looking at the default unix locaiton, even though I'm using the mingw32 libaries). I can't use the default compiler as it the binary requires the dll that comes with cygwin in order to run it properly( it thinks that it doesn't have c11 support, due to missing flags, but it does nevertheless), so I have to use the mingw that comes with it,(The 64mingw package comes with the 32 version btw).
So the question is, that should I edit other cmake files to use the mingwlib when using cygwin or I doing this the hard way?
Edit: Clarification
- Attachments
-
- CMakeLists.txt
- (18.69 KiB) Downloaded 4 times
Re: compling spring on windows using cygwin with mingw
afaik there are differences when using cygwin with the vars WIN32/MINGW32/UNIX in comparison when using windows command shell / cmake / ... and because of that some cmake scripts don't work / detect wrong paths. afaik there are some bug reports related to cmake / cygwin, see the bugtracker of cmake.org.
why do you want to use cygwin?
the attached file doesn't claryfy anything, you should show a diff...
why do you want to use cygwin?
the attached file doesn't claryfy anything, you should show a diff...
-
- Posts: 823
- Joined: 21 Oct 2008, 02:54
Re: compling spring on windows using cygwin with mingw
I want use cygwin, because it comes with the mingw64 tool chain as one of it's packages and the fact that ninja uses them for configuring. I notice that you include the ninja.exe file in one of your projects, is it any different to the one that I'm using (pre-build exe that has used msvc for compiling)?abma wrote:afaik there are differences when using cygwin with the vars WIN32/MINGW32/UNIX in comparison when using windows command shell / cmake / ... and because of that some cmake scripts don't work / detect wrong paths. afaik there are some bug reports related to cmake / cygwin, see the bugtracker of cmake.org.
why do you want to use cygwin?
the attached file doesn't claryfy anything, you should show a diff...
I replace
Code: Select all
(UNIX AND NOT MINGW)
Code: Select all
(UNIX AND NOT MINGW AND NOT CYGWIN)
-
- Posts: 823
- Joined: 21 Oct 2008, 02:54
Re: compling spring on windows using cygwin with mingw
I even try to configure with msvc 12 edition and even then it couldn't find the zib and glew libraries as well, even though I had the msvc libaires in the folder. I'm using cmake 3.10 edition.
This is just pure weird.
This is just pure weird.
Re: compling spring on windows using cygwin with mingw
its "zlib". you should use https://github.com/spring/mingwlibs
can you provide full output of "cmake ." please?
cmake 3.1.0 is untested, maybe a "downgrade" solves it.
can you provide full output of "cmake ." please?
cmake 3.1.0 is untested, maybe a "downgrade" solves it.
-
- Posts: 823
- Joined: 21 Oct 2008, 02:54
Re: compling spring on windows using cygwin with mingw
Here's the thing, I am using it, it doesn't seemed to find it somehow.abma wrote:its "zlib". you should use https://github.com/spring/mingwlibs
Donecan you provide full output of "cmake ." please?
- Attachments
-
- CMakeOutput.log
- (33.28 KiB) Downloaded 8 times
Re: compling spring on windows using cygwin with mingw
hmm, thats not what i meant. full output of cmake when run in the spring source dir: i.e. the command you used to configure to create the ninja build file.
Re: compling spring on windows using cygwin with mingw
latest commit in the release branch contains a fix for cmake 3.1.0:
https://github.com/spring/spring/commit ... 1782c1bb9c
https://github.com/spring/spring/commit ... 1782c1bb9c
-
- Posts: 823
- Joined: 21 Oct 2008, 02:54
Re: compling spring on windows using cygwin with mingw
Still got the same error
Edit: this is plan ridiculous, I am not going to download linux just to configure spring dev with cmake, just so that I can start messing around with it. The fact that I can't even configure with visual studio shows how badly tested it is on the platform.
Code: Select all
CMake Error at C:/cmake/share/cmake-3.1/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
Could NOT find ZLIB (missing: ZLIB_LIBRARY) (found version "1.2.7")
Call Stack (most recent call first):
C:/cmake/share/cmake-3.1/Modules/FindPackageHandleStandardArgs.cmake:374 (_FPHSA_FAILURE_MESSAGE)
C:/cmake/share/cmake-3.1/Modules/FindZLIB.cmake:110 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
rts/lib/minizip/CMakeLists.txt:20 (FIND_PACKAGE)
Edit: this is plan ridiculous, I am not going to download linux just to configure spring dev with cmake, just so that I can start messing around with it. The fact that I can't even configure with visual studio shows how badly tested it is on the platform.
Re: compling spring on windows using cygwin with mingw
I don't know about windows but on linux/osx i'm able to provide additional flags for cmake, like
Code: Select all
cmake . -DGLEW_INCLUDE_DIR=/some/dir -DZLIB_LIBRARY=/some/zlib/
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: compling spring on windows using cygwin with mingw
If you want to compile Spring on windows, you'll need to put in some serious work to use VS/MSVC, and even if you eventually managed to compile, it probably won't sync.
Much easier is to get the mingw compiler specified on the wiki, use it with codeblocks, then use cmake to generate a codeblocks project file. That way you have a reasonable IDE to edit/compile in and your compilation is identical to doing it "by hand" a la wiki. (And afaik this will also work on linux.)
Much easier is to get the mingw compiler specified on the wiki, use it with codeblocks, then use cmake to generate a codeblocks project file. That way you have a reasonable IDE to edit/compile in and your compilation is identical to doing it "by hand" a la wiki. (And afaik this will also work on linux.)
Re: compling spring on windows using cygwin with mingw
do we know why this is?Silentwings wrote:it probably won't sync.
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: compling spring on windows using cygwin with mingw
I don't know in detail, but that's what I've always heard. I would guess that streflop can only guarantee syncing floating point when the same compiler is used.
-
- Posts: 823
- Joined: 21 Oct 2008, 02:54
Re: compling spring on windows using cygwin with mingw
Yes, I have already compile with mingw64 64 bit version with some edits to the cmake file. (Passing the -m32 flag with -fpremmsive btw)
Edit: btw abma if you guys planing to start creating new mingw libraries for the 64 bit version, I want in.
Edit: btw abma if you guys planing to start creating new mingw libraries for the 64 bit version, I want in.