From pauli.jokela at didstopia.com Sat Jun 13 06:05:40 2015 From: pauli.jokela at didstopia.com (Pauli Jokela) Date: Sat, 13 Jun 2015 13:05:40 +0300 Subject: [physfs] Compiling with MinGW on Linux Message-ID: I’ve tried for several days/weeks now to compile PhysFS on a Linux box, with MinGW, to product both 32- and 64-bit Windows builds. So far I haven’t succeeded. At all. Could someone either provide me with CMake files for MinGW, or point me in the right direction? Compiling with MinGW under Windows is not an option, as this has to be done on a Linux system. --  Pauli Jokela, Didstopia -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonasthiem at googlemail.com Sat Jun 13 07:16:24 2015 From: jonasthiem at googlemail.com (Jonas Thiem) Date: Sat, 13 Jun 2015 13:16:24 +0200 Subject: [physfs] Compiling with MinGW on Linux In-Reply-To: References: Message-ID: <557C1108.8040904@googlemail.com> Sadly, my experience with cmake is that it's horrible for cross-compiling, which is why I refuse to use it for any of my own projects. I have successfully compiled PhysFS for windows, and I can recommend to just hack your custom Makefile. Add all source files as object files, maybe try to guess or steal the -llinkedlibrary flags from a cmake run from a native linux box, and then just compile it using your own Makefile for things. I had to do the same when cross-compiling Box2D because again, cmake. Gladly, SDL still maintains autoconf.. On 06/13/2015 12:05 PM, Pauli Jokela wrote: > I’ve tried for several days/weeks now to compile PhysFS on a Linux > box, with MinGW, to product both 32- and 64-bit Windows builds. > > So far I haven’t succeeded. At all. > > Could someone either provide me with CMake files for MinGW, or point > me in the right direction? Compiling with MinGW under Windows is not > an option, as this has to be done on a Linux system. > > -- > Pauli Jokela, Didstopia > > > _______________________________________________ > physfs mailing list > physfs at icculus.org > http://icculus.org/mailman/listinfo/physfs -------------- next part -------------- An HTML attachment was scrubbed... URL: From pauli.jokela at didstopia.com Sat Jun 13 09:02:58 2015 From: pauli.jokela at didstopia.com (Pauli Jokela) Date: Sat, 13 Jun 2015 16:02:58 +0300 Subject: [physfs] Compiling with MinGW on Linux In-Reply-To: <557C1108.8040904@googlemail.com> References: <557C1108.8040904@googlemail.com> Message-ID: Thanks Jonas, Although it was painful as heck, I managed to create a working Makefile. Well, I haven’t tested the final build yet, but at least it compiles. --  Pauli Jokela, Didstopia Päällä 13. kesäkuuta 2015 klo 14.48.44, Jonas Thiem (jonasthiem at googlemail.com) kirjoitti: Sadly, my experience with cmake is that it's horrible for cross-compiling, which is why I refuse to use it for any of my own projects. I have successfully compiled PhysFS for windows, and I can recommend to just hack your custom Makefile. Add all source files as object files, maybe try to guess or steal the -llinkedlibrary flags from a cmake run from a native linux box, and then just compile it using your own Makefile for things. I had to do the same when cross-compiling Box2D because again, cmake. Gladly, SDL still maintains autoconf.. On 06/13/2015 12:05 PM, Pauli Jokela wrote: I’ve tried for several days/weeks now to compile PhysFS on a Linux box, with MinGW, to product both 32- and 64-bit Windows builds. So far I haven’t succeeded. At all. Could someone either provide me with CMake files for MinGW, or point me in the right direction? Compiling with MinGW under Windows is not an option, as this has to be done on a Linux system. --  Pauli Jokela, Didstopia _______________________________________________ physfs mailing list physfs at icculus.org http://icculus.org/mailman/listinfo/physfs _______________________________________________ physfs mailing list physfs at icculus.org http://icculus.org/mailman/listinfo/physfs -------------- next part -------------- An HTML attachment was scrubbed... URL: From urkle at outoforder.cc Sat Jun 13 11:19:07 2015 From: urkle at outoforder.cc (Edward Rudd) Date: Sat, 13 Jun 2015 11:19:07 -0400 Subject: [physfs] Compiling with MinGW on Linux In-Reply-To: <557C1108.8040904@googlemail.com> References: <557C1108.8040904@googlemail.com> Message-ID: > On Jun 13, 2015, at 07:16, Jonas Thiem wrote: > > Sadly, my experience with cmake is that it's horrible for cross-compiling, which is why I refuse to use it for any of my own projects. Odd, I've had nothing but success using Cmake for cross-compiling. I use it in a project to tartget Windows (VC++ or MingW), Linux, Mac OS X, iOS, asm.js. Most likely the issue here is that the packaged Cmake files are just plain badly written. (no offense ryan, but people don't use cmake 2.4 anymore:-D). I'll work up some fixed cmake files and get them into physfs so it'll work more reliably. > I have successfully compiled PhysFS for windows, and I can recommend to just hack your custom Makefile. Add all source files as object files, maybe try to guess or steal the -llinkedlibrary flags from a cmake run from a native linux box, and then just compile it using your own Makefile for things. > > I had to do the same when cross-compiling Box2D because again, cmake. Gladly, SDL still maintains autoconf.. > > On 06/13/2015 12:05 PM, Pauli Jokela wrote: >> I’ve tried for several days/weeks now to compile PhysFS on a Linux box, with MinGW, to product both 32- and 64-bit Windows builds. >> >> So far I haven’t succeeded. At all. >> >> Could someone either provide me with CMake files for MinGW, or point me in the right direction? Compiling with MinGW under Windows is not an option, as this has to be done on a Linux system. >> >> -- >> Pauli Jokela, Didstopia >> >> >> _______________________________________________ >> physfs mailing list >> physfs at icculus.org >> http://icculus.org/mailman/listinfo/physfs > > _______________________________________________ > physfs mailing list > physfs at icculus.org > http://icculus.org/mailman/listinfo/physfs -------------- next part -------------- An HTML attachment was scrubbed... URL: From nyocurio at gmail.com Sat Jun 13 11:13:39 2015 From: nyocurio at gmail.com (Jonas Kulla) Date: Sat, 13 Jun 2015 17:13:39 +0200 Subject: [physfs] Compiling with MinGW on Linux In-Reply-To: References: <557C1108.8040904@googlemail.com> Message-ID: Hello Pauli, what distribution are you using? I'm on Fedora, and for me, using the distro provided cmake-mingw32 script worked out of the box when compiling physfs from source (just needed to remove some unused variables since warnings are treated as errors). So it's definitely possible. 2015-06-13 15:02 GMT+02:00 Pauli Jokela : > Thanks Jonas, > > Although it was painful as heck, I managed to create a working Makefile. > Well, I haven’t tested the final build yet, but at least it compiles. > > -- > Pauli Jokela, Didstopia > > Päällä 13. kesäkuuta 2015 klo 14.48.44, Jonas Thiem ( > jonasthiem at googlemail.com) kirjoitti: > > Sadly, my experience with cmake is that it's horrible for cross-compiling, > which is why I refuse to use it for any of my own projects. > > I have successfully compiled PhysFS for windows, and I can recommend to > just hack your custom Makefile. Add all source files as object files, maybe > try to guess or steal the -llinkedlibrary flags from a cmake run from a > native linux box, and then just compile it using your own Makefile for > things. > > I had to do the same when cross-compiling Box2D because again, cmake. > Gladly, SDL still maintains autoconf.. > > On 06/13/2015 12:05 PM, Pauli Jokela wrote: > > I’ve tried for several days/weeks now to compile PhysFS on a Linux box, > with MinGW, to product both 32- and 64-bit Windows builds. > > So far I haven’t succeeded. At all. > > Could someone either provide me with CMake files for MinGW, or point me > in the right direction? Compiling with MinGW under Windows is not an > option, as this has to be done on a Linux system. > > -- > Pauli Jokela, Didstopia > > > _______________________________________________ > physfs mailing listphysfs at icculus.orghttp://icculus.org/mailman/listinfo/physfs > > > _______________________________________________ > physfs mailing list > physfs at icculus.org > http://icculus.org/mailman/listinfo/physfs > > > _______________________________________________ > physfs mailing list > physfs at icculus.org > http://icculus.org/mailman/listinfo/physfs > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pauli.jokela at didstopia.com Sat Jun 13 11:50:32 2015 From: pauli.jokela at didstopia.com (Pauli Jokela) Date: Sat, 13 Jun 2015 18:50:32 +0300 Subject: [physfs] Compiling with MinGW on Linux In-Reply-To: References: <557C1108.8040904@googlemail.com> Message-ID: Ubuntu 12.04. I don’t have issues compiling for the same platform that I’m building on (ie. compiling on Linux, for Linux), only when compiling for Windows, while building from Linux. Either way, I can confirm that the custom Makefile seems to have fixed the issue. --  Pauli Jokela, Didstopia Päällä 13. kesäkuuta 2015 klo 18.48.51, Jonas Kulla (nyocurio at gmail.com) kirjoitti: Hello Pauli, what distribution are you using? I'm on Fedora, and for me, using the distro provided cmake-mingw32 script worked out of the box when compiling physfs from source (just needed to remove some unused variables since warnings are treated as errors). So it's definitely possible. 2015-06-13 15:02 GMT+02:00 Pauli Jokela : Thanks Jonas, Although it was painful as heck, I managed to create a working Makefile. Well, I haven’t tested the final build yet, but at least it compiles. --  Pauli Jokela, Didstopia Päällä 13. kesäkuuta 2015 klo 14.48.44, Jonas Thiem (jonasthiem at googlemail.com) kirjoitti: Sadly, my experience with cmake is that it's horrible for cross-compiling, which is why I refuse to use it for any of my own projects. I have successfully compiled PhysFS for windows, and I can recommend to just hack your custom Makefile. Add all source files as object files, maybe try to guess or steal the -llinkedlibrary flags from a cmake run from a native linux box, and then just compile it using your own Makefile for things. I had to do the same when cross-compiling Box2D because again, cmake. Gladly, SDL still maintains autoconf.. On 06/13/2015 12:05 PM, Pauli Jokela wrote: I’ve tried for several days/weeks now to compile PhysFS on a Linux box, with MinGW, to product both 32- and 64-bit Windows builds. So far I haven’t succeeded. At all. Could someone either provide me with CMake files for MinGW, or point me in the right direction? Compiling with MinGW under Windows is not an option, as this has to be done on a Linux system. --  Pauli Jokela, Didstopia _______________________________________________ physfs mailing list physfs at icculus.org http://icculus.org/mailman/listinfo/physfs _______________________________________________ physfs mailing list physfs at icculus.org http://icculus.org/mailman/listinfo/physfs _______________________________________________ physfs mailing list physfs at icculus.org http://icculus.org/mailman/listinfo/physfs _______________________________________________ physfs mailing list physfs at icculus.org http://icculus.org/mailman/listinfo/physfs -------------- next part -------------- An HTML attachment was scrubbed... URL: From trick at icculus.org Sat Jun 13 17:04:16 2015 From: trick at icculus.org (Gerry JJ) Date: Sat, 13 Jun 2015 23:04:16 +0200 Subject: [physfs] Compiling with MinGW on Linux In-Reply-To: References: Message-ID: <557C9AD0.7020306@icculus.org> Save these lines into a file (eg. Toolchain-mingw32.cmake): set(CMAKE_SYSTEM_NAME Windows) set(CMAKE_C_COMPILER i686-w64-mingw32-gcc) set(CMAKE_CXX_COMPILER i686-w64-mingw32-g++) set(CMAKE_RC_COMPILER i686-w64-mingw32-windres) set(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32 ) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) Replace the names/paths with whatever's right for your distro. The above works for 32-bit mingw-w64 on Ubuntu, replace i686 with x86_64 for 64-bit. You can also add more paths to FIND_ROOT_PATH before the closing paren (useful if you've got a local install dir for this stuff) Whenever you invoke cmake, tell it to use the file you just made: ccmake -DCMAKE_TOOLCHAIN_FILE=/path/to/Toolchain-mingw32.cmake .. Then proceed as normal. That should work in general, but in physfs' case you'll also have to edit CMakeLists.txt and remove -Werror before you run cmake. -g Den 13. juni 2015 12:05, skrev Pauli Jokela: > I’ve tried for several days/weeks now to compile PhysFS on a Linux box, > with MinGW, to product both 32- and 64-bit Windows builds. > > So far I haven’t succeeded. At all. > > Could someone either provide me with CMake files for MinGW, or point me > in the right direction? Compiling with MinGW under Windows is not an > option, as this has to be done on a Linux system. > > -- > Pauli Jokela, Didstopia > > > _______________________________________________ > physfs mailing list > physfs at icculus.org > http://icculus.org/mailman/listinfo/physfs > From sik.the.hedgehog at gmail.com Sun Jun 14 00:51:58 2015 From: sik.the.hedgehog at gmail.com (Sik the hedgehog) Date: Sun, 14 Jun 2015 01:51:58 -0300 Subject: [physfs] Compiling with MinGW on Linux In-Reply-To: References: Message-ID: 2015-06-13 7:05 GMT-03:00, Pauli Jokela : > Could someone either provide me with CMake files for MinGW, or point me in > the right direction? Compiling with MinGW under Windows is not an option, as > this has to be done on a Linux system. What I have right now, using the MinGW-w64 from the Ubuntu repo (using Ubuntu 14.04 here): HOST=i686-w64-mingw32 BUILD=x86_64-linux-gnu PREFIX=/usr/local/cross-tools/${HOST} mkdir winbuild cd winbuild cmake -DCMAKE_TOOLCHAIN_FILE=~/wincmake.cmake -DCMAKE_INSTALL_PREFIX=${PREFIX} -DCMAKE_SHARED_LINKER_FLAGS=-static-libgcc .. make Where ~/wincmake.cmake has this (although some of this may be pointless): SET(CMAKE_SYSTEM_NAME Windows) SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc) SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++) SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres) SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32) SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) Replace i686 with x86_64 for 64-bit builds.