Home Help Center

Does ice support MinGW?

lionellionel Member LionelOrganization: Fudan UniversityProject: FYT
How to compile ice with MinGW? Thanks!

Comments

  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    Sorry, but what is MiniGW?
  • lionellionel Member LionelOrganization: Fudan UniversityProject: FYT
    MinGW is a windows version of gcc.

    Please visit http://www.mingw.org and http://sourceforge.net/projects/mingw/ to get more detail.

    I wanna write an opensource cross-platform application with ice and wxWidgets.
    So I'd like to use a GPL compiler to compile my application. For the Linux version I use gcc, and windows, I want MinGW.
  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    I see. Sorry, but we do not support MiniGW. However, since it's based on gcc, I suggest that you simply give it a try.
  • lionellionel Member LionelOrganization: Fudan UniversityProject: FYT
    OK, I'll try to write a Makefile for MinGW
  • vvvolvvvol Member VoloshinovOrganization: Institute of System Analysis Rus. Acad. Sci.Project: IARnet
    Did you get success in porting Ice to MInGW

    Dear lionel, a year ago you wrote
    lionel wrote:
    OK, I'll try to write a Makefile for MinGW
    What about results? At least just tell me - is it possible? :)
    We started use Ice (Java) since summer, 2005.
    And a week ago I had asked my student to try to build Ice 3.0 (C++) on MinGW, he reported a lot of problems...
    We do not hate MS Visual C++ at all, but we have to use GNU gcc on Windows due to some reasons.
  • P.H.WangP.H.Wang Member
    can I use makefile to build ice from source in windows?

    I met the same problem when I tried to use Eclipse and Mingw.
    I have verified we can't simply use lib files included in the Ice-3.0.0-VC71.msi.
    So I think if it's possible to build from source code.
    But when I use make. I got this:
    Can anybody tell me what's the message mean?
    process_begin: CreateProcess((null), uname, ...) failed.
    process_begin: CreateProcess((null), uname, ...) failed.
    process_begin: CreateProcess((null), uname, ...) failed.
    process_begin: CreateProcess((null), uname, ...) failed.
    config/Make.rules.:171: config/Make.rules.: No such file or directory
    config/Make.rules.:297: *** You need to define mkshlib in Make.rules.. Stop.
    I noticed that there are Make.rules.xxx under config. But didn't include windows. Is that the possible reason?
    Thank u.
  • mlamanamlamana Member
    Mingw version not working yet...
    lionel wrote:
    OK, I'll try to write a Makefile for MinGW


    I see it has been a while since anyone did anything with this. I am also interested in getting Ice to work with Mingw. I am using the Dev-C++ IDE and have managed to compile everything. In trying to link however I am getting a lot of unresolved labels. I am trying the "hello" demo. Both run() and main() are causing multiple definition errors too. I think the IDE is trying to build one executable with both Client and Server in it.

    If anyone has actually gotten a working configuration going please post the procedure!
  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    Assuming you are using Makefiles, porting Ice to MingW probalby isn't that difficult. You'll need to write a Make.rules.CYGWIN_NT-5.1. You can probalby copy the majority of the details from Make.rules.Linux. I'm not sure if the POSIX library emulation is good enough to run Ice though.

    Assuming you are not doing this port as a hobby and you just want to use Ice, why don't you download the free version of the MS C++ compiler? http://msdn.microsoft.com/vstudio/express/visualc/. Its supported out of the box with Ice 3.0.1.
  • pgquilespgquiles Member Pau Garcia i QuilesOrganization: ArisnovaProject: IPMS
    Encouraging results

    I am trying to build Ice 3.2.1 with mingw32 (g++ 3.4.5). I've already got a Make.rules.MINGW32_NT-5 and built IceUtil with it. I'll post more information and the patches to Ice as I move forward.
  • pgquilespgquiles Member Pau Garcia i QuilesOrganization: ArisnovaProject: IPMS
    Built Ice 3.2.1 with MinGW

    Just for you to know, I have successfully built Ice 3.2.1 with MingGW 5.1.3 (gcc 3.4.5). Some cleaning and verification is still needed.
  • pgquilespgquiles Member Pau Garcia i QuilesOrganization: ArisnovaProject: IPMS
    Exceptions across DLLs failing

    I hit a limitation of MinGW stable (gcc 3.4.5): as it uses sjlj instead of dwarf2, it cannot produce code which propagates user exceptions across DLLs, therefore most unit test fail.

    I am trying to build everything using the MinGW technology preview (gcc 4.2.1) with dwarf2 exceptions.
  • pgquilespgquiles Member Pau Garcia i QuilesOrganization: ArisnovaProject: IPMS
    The MinGW Tech Preview with gcc 4.2.1 generates bad code which was causing random memory corruption.

    The good news is I managed to get ICE 3.2.1 working with MinGW stable (gcc 3.4.5). Only one unit test (test/IceGrid/deployer, and only the step when it reads log4.txt) is failing, I hope I will fix it next Monday.
  • pgquilespgquiles Member Pau Garcia i QuilesOrganization: ArisnovaProject: IPMS
    Here comes the mingw support

    Per popular request and although I have been unable to figure out why test/IceGrid/deployer still fails, here comes mingw_support.patch.

    Download official ICE 3.2.1 sources from zeroc.com, then apply this patch. It builds against MinGW stable with g++ 3.4.5 on Windows XP and 2003. I have not tested it on Windows Vista yet but I assume it will NOT work, as there are some known issues in MinGW stable with Vista.

    The easiest way to build ICE in MinGW is to install MSYS, then run the mingw32-fullbuild.sh script. It will automagically download and build all third-party dependencies and build ICE. The script does not install Python, PyWin32 or run the tests, thought.

    Good luck and remember this is NOT supported by ZeroC. Do not bug them with your requests.
  • pgquilespgquiles Member Pau Garcia i QuilesOrganization: ArisnovaProject: IPMS
    New patch

    My previous patch was missing the install script and the rules file for MingW due to the fact I had forgot to add the -N option when diff'ing the trees. Here comes the proper patch. You do not need to apply both patches but only this one.
  • andreynechandreynech Member Andrey NechypurenkoOrganization: Veterobot.comProject: Robotics vehicle for researchers and makers ✭✭
    pgquiles wrote: »
    My previous patch was missing the install script and the rules file for MingW due to the fact I had forgot to add the -N option when diff'ing the trees. Here comes the proper patch. You do not need to apply both patches but only this one.

    Thank you very much for the patch! I am using Ice with Qt in my project and to my knowledge MinGW is the only way to stay with non-commercial tools on windows (no free Qt for MSVC).

    The patch was very helpful, however there were some problems while compiling ice and 3-rd party libraries. Here is (incomplete) list of problems.

    1. Compilation failed because expat headers and libraries were not moved to the corresponding include and lib directories. I put them there manually.

    2. Compiling openssl was real pain :) . Since windows does not support symlinks, unpacking available .tar.gz file creates headers with 0 size (supposed to be symlinks). I've made the script which copies headers to the place where symlinks are supposed to be created. Then to compile openssl the ms/mingw32.bat file should be copied to the openssl root directory and executed. I think that mingw32-fullbuild.sh is trying to do something different and that is why openssl were not compiled.

    3. mc.exe compiler from MS Platform SDK were not found. I have MSVC8 installed which also include Platform SDK. However the path is different and need to be changed correspondently.

    Anyway, after several hours I've manage to compile everything and quite happy now :) .

    Thank you,
    Andrey.
  • pgquilespgquiles Member Pau Garcia i QuilesOrganization: ArisnovaProject: IPMS
    andreynech wrote: »
    Thank you very much for the patch! I am using Ice with Qt in my project and to my knowledge MinGW is the only way to stay with non-commercial tools on windows (no free Qt for MSVC).

    You are wrong about that. Since 4.3.2, you can use Qt on Windows with Visual C++ 2005 Express.
    The patch was very helpful, however there were some problems while compiling ice and 3-rd party libraries. Here is (incomplete) list of problems.

    1. Compilation failed because expat headers and libraries were not moved to the corresponding include and lib directories. I put them there manually.

    No need for that. The mingw32-fullbuild.sh script downloads and builds expat for you and places all the headers and libraries in a work directory:

    echo "Building Expat"; tar xvfz $EXPAT_PACKAGE; cd $EXPAT_DIR; ./configure; make; cp -f .libs/libexpat-1.dll $WORKDIR/lib/; cp -f .libs/libexpat.dll.a $WORKDIR/lib/expat.a; cp -f lib/expat.h lib/expat_external.h $WORKDIR/include
    2. Compiling openssl was real pain :) . Since windows does not support symlinks, unpacking available .tar.gz file creates headers with 0 size (supposed to be symlinks). I've made the script which copies headers to the place where symlinks are supposed to be created. Then to compile openssl the ms/mingw32.bat file should be copied to the openssl root directory and executed. I think that mingw32-fullbuild.sh is trying to do something different and that is why openssl were not compiled.

    Same thing here, the mingw32-fullbuild.sh patches and builds it for you.
    3. mc.exe compiler from MS Platform SDK were not found. I have MSVC8 installed which also include Platform SDK. However the path is different and need to be changed correspondently.

    You just need to set the WINDOWS_PLATFORM_SDK_DIR variable in the config/Make.rules.MINGW32 file. If you are using a Visual C++-provided SDK instead of the free Platform SDK, you should also set the MESSAGE_COMPILER variable in the same file.

    Are you by any chance trying to do all this in a FAT32 filesystem? It worked flawlessly in a NTFS filesystem for me.
  • andreynechandreynech Member Andrey NechypurenkoOrganization: Veterobot.comProject: Robotics vehicle for researchers and makers ✭✭
    pgquiles wrote: »
    You are wrong about that. Since 4.3.2, you can use Qt on Windows with Visual C++ 2005 Express.
    On this page Qt/Windows Open Source Edition — Trolltech the following is mentioned: " Please note that the Open Source Edition of Qt will support the MinGW compiler. Visual Studio support and integration is provided with the commercial Editions of Qt.".
    There is also only MinGW version and sources available for download. The version which is compiled with MSVC is 30-days trial. Please let me know if I overlooked something here.
    pgquiles wrote: »
    No need for that. The mingw32-fullbuild.sh script downloads and builds expat for you and places all the headers and libraries in a work directory:

    echo "Building Expat"; tar xvfz $EXPAT_PACKAGE; cd $EXPAT_DIR; ./configure; make; cp -f .libs/libexpat-1.dll $WORKDIR/lib/; cp -f .libs/libexpat.dll.a $WORKDIR/lib/expat.a; cp -f lib/expat.h lib/expat_external.h $WORKDIR/include

    Same thing here, the mingw32-fullbuild.sh patches and builds it for you.

    Well, maybe something went wrong by me. It was just my observations. Since there are chances that somebody else will also face similar problms, I decide to mention them here to provoke you for comments ;) .
    pgquiles wrote: »
    You just need to set the WINDOWS_PLATFORM_SDK_DIR variable in the config/Make.rules.MINGW32 file. If you are using a Visual C++-provided SDK instead of the free Platform SDK, you should also set the MESSAGE_COMPILER variable in the same file.

    Right, this is how I solve it.
    pgquiles wrote: »
    Are you by any chance trying to do all this in a FAT32 filesystem? It worked flawlessly in a NTFS filesystem for me.

    No, it was XP with NTFS. Cygwin was able to create and show links properly, but somehow MinGW compiler did not recognize them correctly.

    Thank you very much.
    Andrey.
  • pgquilespgquiles Member Pau Garcia i QuilesOrganization: ArisnovaProject: IPMS
    andreynech wrote: »
    On this page Qt/Windows Open Source Edition — Trolltech the following is mentioned: " Please note that the Open Source Edition of Qt will support the MinGW compiler. Visual Studio support and integration is provided with the commercial Editions of Qt.".
    There is also only MinGW version and sources available for download. The version which is compiled with MSVC is 30-days trial. Please let me know if I overlooked something here.

    "We have decided to support Visual Studio Express with Qt/Windows Open Source - we are dual licensing the MSVC Makefile and project generator (Sorry, no VS Integration for Open Source users). Many thanks to our PM Eivind Thronsen for making this happen. So when will you get this? Well, if you had checked out the 4.3 snapshots, the generators have been available for about a week now. The mkspecs are on their way. We did schedule it for Qt 4.4 but some quick work by Marius and André will see this feature in Qt 4.3.2"

    Trolltech Labs Blogs » Qt/Windows Open Source Edition to support VS Express
  • DeepDiverDeepDiver Member Thomas MuellerOrganization: Freelance Software DeveloperProject: Project depend on Customers ✭✭✭
    Here you can find installation instructions for Qt with MSVC:
    Qt 4.3: Installing Qt/Windows

    Nevertheless:
    This is the Ice forum!
    Please visit: Qt Centre - The Ultimate Qt Community site - Home

    You can find a lot of information on Qt!

    CU There
  • solikhinsolikhin Member solikhin solikhinOrganization: UII YogyakartaProject: Converting inhouse 2 tier to 3 tier architecture
    andreynech wrote: »
    Thank you very much for the patch! I am using Ice with Qt in my project and to my knowledge MinGW is the only way to stay with non-commercial tools on windows (no free Qt for MSVC).

    OOT, but it's posible to compile free QT open source with MSVC :
    Qt4 with Visual Studio - qtnode

    I've been using MSVC+ QT+ICE for 1.5 years. What a nice combination.
  • sanjalsanjal Member Sanjar JalilovOrganization: RWTH AachenProject: Distributed notifications software system
    Ladies and gentlemen:
    has anyone successfully compiled Ice 3.3.0 on mingw (gcc 3.4.5)?
  • recoderrecoder Member Peter GrobarcikOrganization: PersonalProject: Distributed CAD / Geometry CAS
    Ice 3.4.1 MING32 /gcc.exe (tdm-1) 4.5.0

    Hallo!

    I recently compiled Ice 3.4.1 on Windows with the GNU 4.5.0 compiler. I used openssl-1.0.0a, syslog-win32-0.3 and the usual Ice dependencies. I did not have time to test the software, but I expect to find some time soon.

    I compiled on windows XP Professional, in case anybody is interested and / or want to help, I can post patch(es), or when Zeroc is interested we can incorporate the changes (mostly adding defined(__MINGW32__) ) into the official tree.

    Cheers,

    Peter
  • ponimasponimas Member Alexander PonimaskinOrganization: PersonalProject: distributed xml db
    please, post your patches.
    i'm interested in building ice for windows with mingw on my linux box.
  • care for this

    please share your patch:rolleyes:
  • recoderrecoder Member Peter GrobarcikOrganization: PersonalProject: Distributed CAD / Geometry CAS
    MinGW support - alpha 1

    Hi everybody,

    I wanted to dig little bit into it on weekend, but I forgot that it's May the first, anyway, at least here the first gnu-diff patch against a standard 4.3.1. It is for the TDM compiler (4.5.5), but since meanwhile the standard MinGW uses the new compiler as well, so it should work with standard MinGW as well; I will look at it ASAP.

    You will need SSL, there is a small readme as well. I will soon provide better quality docs and patches, if You are in hurry You can start with this.

    Pls. do not hesitate and contact me, I promise, I will react more prompt. And let me (us) know how far you got. I wanted originally to integrate Ice as a package into KDE for windows.

    I needed to rename the .patch postfix into since .patch.txt because of some weird security settings of my company laptop (privately I'am poor Linux ;-) )

    Have Fun , sorry for being late, :rolleyes:

    Cheers

    Peter alias Recoder
  • SystemSystem Member
    Nice! :) I will try in windows.
  • recoderrecoder Member Peter GrobarcikOrganization: PersonalProject: Distributed CAD / Geometry CAS
    Hope It will not cause much trouble.

    As far as I remember the biggest problem was SSH and the missing Windows headers.

    The installation of a new GCC compiler and the #define-s are pretty strait forward.


    Cheers,

    recoder
Sign In or Register to comment.