Problem compiling root_v5.24.00 with VC9.0 on Windows Vista

Dear ROOTers,

Although I have installed the root binary on Windows Vista (on my Mac) I want to compile it from source using VC9.0.

Curently I have installed on Windows Vista the following software:

Since it is recommended to modify “Cygwin.bat” and “.bash_profile” I have attached the modified files.
After unzipping root_v5.24.00.source.tar.gz I have started Cygwin and did the following:

cd /cygdrive/c/home/Rabbitus/ROOT/root
export ROOTSYS=/cygdrive/c/home/Rabbitus/ROOT/root
./configure --help
./configure win32
make

Compilation started but stopped with a fatal error, see attached screenshot “CompileRoot.JPG”. Furthermore, I am
attaching the result of “echo $PATH” as screenshot “PATH.JPG”.

Do you have any ideas why compilation resulted in an error?
What is the purpose of the directory “c:\cygwin\home”?
Do I have to compile root in this directory?

Best regards
Christian





Cygwin_bat.txt (125 Bytes)
bash_profile.txt (1.54 KB)

Hi,

the pcre Makefile is picking up the wrong link.exe: not the one from MS Dev Express linking libraries but the cygwin version doing entirely different things.

Simply remove /usr/bin/link.exe.

Cheers, Axel.

Dear Axel,

Thank you, deactivating link.exe did the trick, however after 1hr compilation I got the next error, shown in the attached screenshot.
The German sentences mean:

  • warning C4530: C++ handler used, but unloading semantics is not activated. Use /EHsc
  • error C1083: file (Include) cannot be opened:

Do you know what the errors mean and what the reason is?

Best regads
Christian


Hi Christian,

looks like a problem with the xrootd Makefile. Do you need xrootd? If not you can configure (also) specifying --disable-xrootd. If you need it you might just try to run make again; maybe that helps…

Cheers, Axel.

Dear Christian,

The problem is due to the fact that, in netx/Module.mk, the variable NETXINCEXTRA for some reason does not end up in the CXXFLAGS used for the compilation of TXNetFile.cxx .
Looking at the module makefile, it is not clear why this happens. Unfortunately, Bertrand Bellenot, who takes care of this part of Windows, is on vacation right now.
If you do not need xrootd, the best is to follow Axel’s suggestion. Otherwise we will investigate further and try to find at least a workaround.

Cheers,
Gerri

Dear Axel, dear Gerri,

Thank you for your reply, at the moment I will --disable-rootxd, however, in the long term I want to use the standard configuration.

Especially, I want to try to compile root with option /MT (as Bertrand suggested in another thread), but first I need to get root to compile at all.

BTW, do you know if root can be compiled with option /MT?

If you want to know why am trying to compile root with /MT, please see:
root.cern.ch/phpBB2/viewtopic.ph … 6aa630d5c5

Best regards
Christian

Dear Axel,

After disabling xrootd I could finally compile root w/o problems, however I am not able to start it!

It does not matter if I try to start root from the Windows Console or from the Cygwin bash, whenever I type "root"
the root binary starts which I have installed at “C:\root”.

Although I have changed ROOTSYS in the System settings to “C:\home\Rabbitus\ROOT\root” and both “echo %PATH%” and
"echo $PATH" show the correct path:

C:\Users\Rabbitus>echo %PATH%
C:\Program Files\MiKTeX 2.8\miktex\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;
C:\home\Rabbitus\ROOT\root\bin;C:\Rtools\bin;C:\Rtools\perl\bin;C:\Rtools\MinGW\bin;
C:\Programme\HTML Help Workshop;C:\Programme\R\R-2.9.2\bin;

this does not help.

Even directly calling “C:\home\Rabbitus\ROOT\root\bin\root.exe” from the Console
or “/cygdrive/c/home/Rabbitus/ROOT/root/bin/root.exe” from the bash still opens the root binary file at “C:\root”.

Do you know what I need to do to set the environment to the root version which I have just compiled?
Do I have to use the Cygwin bash or can I use the Windows Console?

Best regads
Christian

Hi,

how do you determine that C:\root\bin\root.exe got started? Do you start it from within a cygwin terminal? What happens if you double-click the “proper” root.exe in the explorer?

Cheers, Axel.

Dear Axel,

It does not matter what I try, even double-clicking on root.exe, I get always the following startup screen:

C:\Users\Rabbitus>root
  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   5.24/00      29 June 2009   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************

ROOT 5.24/00 (trunk@29257, Jun 30 2009, 09:23:51 on win32)

CINT/ROOT C/C++ Interpreter version 5.17.00, Dec 21, 2008
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0]

Well, I just realized that I get the same screen on my Mac, which contains only root compiled from source.
If I remember correctly, earlier root versions contained the compilation date, but I may be wrong.

So my question now is, how do I know which root version I have started?

Best regads
Christian

Dear Axel,

After successfully compiling ROOT on Windows Vista with VC 9.0 (Visual Studio Express Edition 2008)
I have finally tried to compile ROOT with option /MT, i.e. in “Makefile.win32” I changed /MD to /MT.

This time I disabled xrootd:

cd /cygdrive/c/home/Rabbitus/ROOT/root
export ROOTSYS=/cygdrive/c/home/Rabbitus/ROOT/root
./configure win32 --disable-xrootd
make

Initially compilation was ok but stopped after 45min with a fatal error, see attached screenshot “CompileRoot3.JPG”.

Do you have any ideas why compilation resulted this time in an error?

Best regards
Christian


Dear ROOTers,

I would like to compile root with VC9.0 on Vista from the source code alone since I want to use option /MT.
Sadly, this fails since the file “gdk-1.3.dll.manifest” cannot be found, see the attached error message.

It turns out that the source “root_v5.24.00.source.tar.gz” does not solely contain source code but in addition the following pre-compiled libraries:

  • root/graf2d/win32gdk/gdk/dll/glib-1.3.dll
  • root/graf2d/win32gdk/gdk/dll/iconv-1.3.dll
  • root/graf2d/win32gdk/gdk/lib/glib-1.3.lib

Thus I downloaded the glib source from: ftp://ftp.gtk.org/pub/gtk/v1.3/glib-1.3.4.tar.gz
and tried to compile it with “nmake -f makefile.msc”.
Since “makefile.msc” is missing I used the one from: gitorious.org/gsettings-gtk/glib … kefile.msc
However, this resulted in a fatal error: “could not create file config.h.win32”

It would be great if you could tell me how to compile glib with VC9.0, so that I can compile it with option /MT and replace the existing libraries.

Best regads
Christian


Hi Christian,

Bertrand knows everything about libgtk (I don’t…) - but he’s on vacation until mid Oct. I’m sure he’ll let you know what to do when he’s back. sorry for the wait!

Do I understand correctly that your other issues are solved? Sorry I didn’t reply earlier - I’ve been traveling during the last few days.

Cheers, Axel.

Dear Axel,

Sadly, none of my issues are solved but Bertrand told me that he will look at them when he is coming back from his vacation, thus I will wait until he comes back.
(I had hoped to be able to solve my problems before Oct 16, which is the Bioconductor deadline for the new release.)

Best regards
Christian

Hi Christian,

OK, I forgot about these potential issues, this would be more complex than expected to change this compiler flags after all. And there are more external dependencies (e.g. pcre, libAfterImage, …) that would need to be modified too. So I think this is not the right solution. Then I need more time to investigate this issue. Sorry.

Cheers, Bertrand.

Dear Bertrand,

Maybe I do not understand what you mean, but the only prebuilt libraries I have found in the root source code
are glib-1.3.dll and iconv-1.3.dll. Other libraries such as libAfterImage exist as source code within root
so compiling with option /MT should not be a problem, or did I miss something?

Best regads
Christian

Christian,

You’re maybe right… All we have to do is:

  1. to find the source matching the binary version of glib and iconv used by Root
  2. to modify the makefiles for pcre and libAfterImage (at least, I’ll check if there are more)

So feel free to modify the makefiles for pcre and libAfterImage, I’ll see if I can find the source of glib and iconv.

Cheers, Bertrand

Dear Bertrand,

Sorry for the late reply.

I have looked at pcre and libAfterImage which are both included as source code, but it seems that both
do not have a makefile, but only the usual Module.mk files which (as far as I understand) obtain the
settings from the main Makefile.

My strategy was to compile ROOT on Vista first with the default setting /MD to see if I can compile it.
This turned out to be ok. Then I started to change /MD to /MT and waited for errors to pop-up. In this
way I had to change until now the following files:
./root/config/Makefile.win32
./root/graf2d/win32gdk/gdk/src/gdk/makefile.msc

Looking at the results I can say that at least pcre did compile as libpcre-7.8.lib w/o problems.
At the moment compilation stopped since the file “gdk-1.3.dll.manifest” cannot be found. Since the libs
glib-1.3.dll and iconv-1.3.dll are the only binaries included in the root source code, this is the point
where I am currently stuck.

Best regads
Christian

Hi Christian,

OK, then I’ll investigate and keep you in touch.

Cheers, Bertrand.

Dear Bertrand,

Did you already have time to investigate further?

As you can see from my reply to Valeri in my other thread:
root.cern.ch/phpBB2/viewtopic.ph … 6343#39911
I have created a simple R-package containing a primitive C++ class only. Compiling with /MT was ok,
but compiling with /MD resulted in the error message that R is trying to load the wrong CRT.

Thus it seems that the only possibility may be to try to compile root with option /MT :frowning:

Best regads
Christian

Hi Christian,

Not yet, unfortunately… But I’ll keep you in touch anyway.

Cheers, Bertrand.