For some reasons I tried to compile root (5.12) on windows with MinGW (the Minimalist GNU for Windows). It seems that I have actually succeeded, but it was a real PAIN in the neck.
There are still some stuffs which are not properly working but at least I can run some macros and get graphical results.
In short I installed cygwin with make, automake, tar, gunzip, … but WITHOUT gcc, then installed Mingw, then compiled regex with that and installed it, then try to compile root by modifying a lot of things… I won’t explain all the details but a few points :
I added of course a new ARCH which is called win32mingw
In a lot of places (typically in Module.mk files) the $PLATFORM variable is used to set special compilation commands. But in fact those are special commands for MSVC and I replaced it by the $ARCH which is more logical I think.
I discovered a lot of tries to delete void pointers in the win32gdk part (doesn’t work with gcc) so at some point it is probably leaking a lot.
Lot of things had to be a little bit modified. For some of them I tried to make a clean fix but for other no …
You can find all the modified files here :
to.infn.it/~gaudiche/root/ro … dFiles.zip
And if you want to test the binaries, they are here :
At some point it would be nice to see ROOT includes nicely the MinGW arch. But of course I really don’t have the time to provide a fully working and synchronized with head thing …
(and don’t tell my boss I did this )
congratulations! Do you happen to have results from test/benchmarks.C? Maybe even comparing with the MSVC binaries of the win32gcc binaries?
I’ll discuss with the dev team whether this can and should be included; good benchmarks would obviously help
WOW! Well done, the binaries just work for me. I ran ROOT’s tutorials/benchmarks.C, which ends up 20% faster than the optimized MSVC8 build I have. Not too surprisingly - as you said you commented many deletes in win32gdk. But it might be competitive even with proper deletes.
Either way we will be very happy to add this platform to ROOT - they seem to be interesting regarding performance, and they’re definitely interesting regaring the setup (gcc to build native windows binaries). Could you prepare diffs (or the set of changed files) vs. the current CVS, please? Without disabling the deletes? I.e. a set of changes we can import into CVS?
I’m pleased to hear that. I could do it if you give me 2 or 3 weeks. Next week I’m away and it could take a lot of time because of the number of files to change. Actually it would maybe be safer to proceed by small steps, making root progressively compatible with MinGW.
There are also some places where an expert is needed to fix the code. I know that at least ACLIC is not working properly and I don’t really know where is the code to fix that.
Concerning the delete in win32gdk, I didn’t comment them, gcc is simply producing a warning saying that deleting a void pointer doesn’t do anything. However I really had to comment the tracing functions because they use one fonction which seems to be a special MSVC one.
two to three weeks is not a problem - we’ve been waiting for a mingw port for a while already
You can also send in small step changes versus the respective current CVS; do it any way you prefer. Don’t worry too much about “details” like ACLiC; we’ll be able to fix these once your patch is in ROOT. If you need help just contact me via Axel.Naumann@cern.ch.
Hoping to hear from you within the coming three weeks!
So here are the first files to be added or updated in ROOT head. They were
taken from the head of the 12th of October. There are actually 3 new
The rest is to be modified. For now it doesn’t compile to the end with
MinGW, but it is a first step which introduce the new ARCH. It would be
good to check that it doesn’t screw up the compilation with MSVC.
Please tell me if you have some problems. And please tell me if you can
possibly commit it to the head.
NewRoot.tar.gz (124 KB)
thanks for your patch! I just wanted to let you know that we’re working on it (testing etc). We’ll let you know when it’s in.
At the end did you learn something from my files ? Did you find bad
problems ? Is the root team still interested in porting root to mingw ?
I’m trying to get this in (i.e. reviewing and testing your changes) - but I can only attribute a minimal amount of time for this, especially before the workshop. I expect to be done by end of April.
But even now I have two questions:
- why do you have in gl/Module.mk a -L…/MinGW/lib? Relative to what? Do you expect users to put their GL libs into $ROOTSYS/…/lib?
- You mention _mingw.h in TWinNTSystem.cxx - where is that file? Do you expect users to set the CPP macro you mention by hand? Or should gcc issue an error if the macro is below a certain value?
It might be more productive if you simply send me an email to Axel.Naumann@cern.ch. I’ll need your email address anyway.
Hello, is there anything new about version of root for mingw? I’m very interested in using it, but for some reasons I have to use mingw. I’m a beginner so I don’t need everything to be functional.
(I’m sorry if it is stupid question, but I haven’t found anything about that. I just need to use root in my c++ application)
Thank you very much for your effort.
Nothing new for the time being, but Axel is actually on vacation… I’ll check with him as soon as he’s back.
Moreover, It would be great to run ROOT with MinGW.
Hi, is Axel still on vacation?
Axel is back, but busy with many other things.
If you want a port with Minw, please contribute to this work, we will include the relevant changes in the source but HAVE NO MANPOWER for the development.