SDL2 cygwin users, any luck compiling? |
SDL2 cygwin users, any luck compiling? |
mva
Guest
|
Alex Barry:
You might want to give the cmake-based build system a try: http://bugzilla.libsdl.org/show_bug.cgi?id=1597 I did not test it with Cygwin, but chances are good that the generated Makefiles will allow you to build SDL2 cleanly. Let me know, if you run into any issues, so I can fix them. Cheers Marcus _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
SDL2 cygwin users, any luck compiling? |
Sam Lantinga
|
Silly question, when you installed cygwin, did you also install the development tools? I don't think they're selected in the default install...
On Tue, Oct 23, 2012 at 6:08 AM, Alex Barry wrote:
|
|||||||||||||
|
SDL2 cygwin users, any luck compiling? |
MrOzBarry
|
Yeah, that's all installed. The CMake solution worked, but configure did not. I was previously able to build by using autotools (autoconf), but read some things that suggested autoconf in cygwin is slightly broken in some capacity.
One thing I did have to do is comment out lines 147-153, as gcc 4.x no longer supports -mno-cygwin, however, iirc, -mwindow should work like it does using the mingw toolchain, but I'm alright having SDL depend on cygwin inside my cygwin environment. When I deploy my app, i'll have cygwin, msvc, linux/gcc, and mac/xcode/gcc support, and I think it's valid that cygwin has it's own target. On Tue, Oct 23, 2012 at 11:49 AM, Sam Lantinga wrote:
|
|||||||||||||||
|
SDL2 cygwin users, any luck compiling? |
MrOzBarry
|
Rather than commenting that block out, one could also wrap it in
-Alex On Tue, Oct 23, 2012 at 11:55 AM, Alex Barry wrote:
|
|||||||||||||||||||
|
SDL2 cygwin users, any luck compiling? |
Andreas Schiffler
Guest
|
Works for me - installed are: autoconf, automake, libtool, make, gcc, gcc-mingw, mingw-runtime, w32api, mercurial, plus a few development packages. I am starting with a "Bash prompt here" in the SDL folder and then the usual sequence:
./autogen.sh cd build ../configure make make install Note that cygwin uses a libtool version with a bug that prevents it to compile/install from a path with a space in it. So check out the sources to a short non-space path. Hope that helps, --Andreas On 10/23/2012 6:08 AM, Alex Barry wrote:
|
|||||||||||||||
|
SDL2 cygwin users, any luck compiling? |
LM
Guest
|
On Tue, Oct 23, 2012 at 6:08 AM, Alex Barry wrote:
I haven't tried SDL2 on Cygwin yet, but there were quite a few patches including several to the configure script for SDL-1.2.15, so I wouldn't be surprised if some are needed for SDL2. I got most of the patches I'm using for 1.2.15 from the Cygwin site. Had to make a few changes to those because they were building 1.2.14 at the time. _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
SDL2 cygwin users, any luck compiling? |
Ryan C. Gordon
Guest
|
Our buildbot compiles SDL2 and SDL-1.2 with Cygwin, MingW32 and MingW64 on every commit. http://buildbot.libsdl.org/builders/sdl-cygwin-x86 http://buildbot.libsdl.org/builders/sdl-mingw-x86 http://buildbot.libsdl.org/builders/sdl-mingw-amd64 The only thing to note is that we force the "CC" environment variable to "gcc-3" for the Cygwin builds... there's probably a reason for that, but I don't remember what. Send patches if it doesn't work with newer GCCs and I'll incorporate them. --ryan. _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
SDL2 cygwin users, any luck compiling? |
MrOzBarry
|
On Tue, Oct 23, 2012 at 3:15 PM, Ryan C. Gordon wrote:
It's because GCC 4.x ditched the -mno-cygwin flag |
|||||||||||||||
|
SDL2 cygwin users, any luck compiling? |
Marcus von Appen
Guest
|
On, Tue Oct 23, 2012, Alex Barry wrote:
I would rather want to change this to: if(CYGWIN) # We build SDL on cygwin without the UNIX emulation layer include_directories("-I/usr/include/mingw") set(CMAKE_REQUIRED_FLAGS "-mno-cygwin") check_c_source_compiles("int main(int argc, char **argv) {}" HAVE_GCC_NO_CYGWIN) set(CMAKE_REQUIRED_FLAGS) if(HAVE_GCC_NO_CYGWIN) list(APPEND EXTRA_LDFLAGS "-mno-cygwin") list(APPEND SDL_LIBS "-mno-cygwin") endif(HAVE_GCC_NO_CYGWIN) set(SDL_CFLAGS "${SDL_CFLAGS} -I/usr/include/mingw") endif(CYGWIN) This checks for the -mno-cygwin compiler flag and should detect it properly. Do you mind to give the snippet above a try? The includes are due to the fact that the cmake-based build and installation should be as close to the autotools version as possible. Hence it is hardcoded. Ideally, those includes are removed from both and the user passes them using the appropriate CFLAGS environment variable. As long as they are found in configure.in, I would recommend to keep them in CMakeLists.txt to make the transition from the one build system to the other as smooth as possible. Cheers Marcus _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|