I’m trying to compile ROOT (the latest svn version) using Visual Studio 2008 on a 64-bit machine running Vista and I’m having a few problems. The first problem is with the following compile command:
cl -O2 -nologo -FIw32pragma.h -MD -GR -EHsc- -W3 -wd4244 -Iinclude -DR__HAVE_CONFIG -Fobuild/win/bindexplib/bindexplib.o -c build/win/bindexplib/bindexplib.cxx
This generates the error:
build/win/bindexplib/bindexplib.cxx(58) : fatal error C1083: Cannot open include file: ‘windows.h’: No such file or directory
I found windows.h in $ROOTSYS/cint/cint/include (it was not in ./include). If I include this path (or copy the file to $ROOTSYS/include), I get the following:
cl -O2 -nologo -FIw32pragma.h -MD -GR -EHsc- -W3 -wd4244 -Iinclude -Icint/cint/include -DR__HAVE_CONFIG -Fobuild/win/bindexplib/bindexplib.o -c build/win/bindexplib/bindexplib.cxx
cint/cint/include\windows.h(19) : warning C4068: unknown pragma
cint/cint/include\windows.h(23) : warning C4068: unknown pragma
cint/cint/include\windows.h(24) : fatal error C1189: #error : win32api.dll is not ready. Run ‘setup.bat’ in %CINTSYSDIR%\lib\win32api directory if you use WinNT/95.
The second problem is as follows:
cl -O2 -nologo -Ibuild/win -FIw32pragma.h -FIsehmap.h -MD -EHsc- -W3 -Iinclude -DR__HAVE_CONFIG -DG__HAVE_CONFIG -DG__NOMAKEINFO -DG__CINTBODY -Icint/cint/inc -Icint/cint/src -Icint/cint/src/dict -I. -Focint/cint/src/g__cfunc.o -c cint/cint/src/g__cfunc.c
cint/cint/src/g__cfunc.c : fatal error C1083: Cannot open include file: ‘sehmap.h’: No such file or directory
make: *** [cint/cint/src/g__cfunc.o] Error 2
If I remove -FIsehmap.h the compile command works. But will this cause a problem later?
Looks like the Visual C++ environment variables are not properly set… Please execute:
before trying to compile root.
You can also add this line in cygwin.bat:
Right after “@echo off”
And please don’t move any file, or change compiler options. The build system supports MSVC++ 7.1, 8.0, and 9.0 without any problem.
Thanks Bertrand! I am now able to compile the root source tree.
However, I’m now having a problem with installation (probably another configuration problem on my end). When I try to install, I get:
Installing Emacs Lisp library in /home/glen/root-executable//share/emacs/site-lisp
Installing GDML conversion scripts in /home/glen/root-executable//lib/root
make: *** [install] Error 2
I ran configure with --prefix=/home/glen/root-executable --etcdir=/home/glen/root-executable/etc
If I try make install a second time, I get a many permission denied errors:
cp: cannot create regular file
/home/glen/root-executable/etc/vmc/.svn/text-base/Makefile.linuxia64gcc.svn-base': Permission denied cp: cannot create regular file/home/glen/root-executable/etc/vmc/.svn/text-base/Makefile.linuxicc.svn-base’: Permission denied
cp: cannot create regular file `/home/glen/root-executable/etc/vmc/.svn/text-base/Makefile.linuxx8664gcc.svn-base’: Permission denied
Even though I get the above error, it looks like everything was built and installed. However, when I try running root (e.g., root -b), the welcome text appears, but I never get the command prompt. Do you have any suggestions?
Thanks for the help!
Well, I don’t know, I never use “make install” and “configure --with-prefix” on Windows (I’m not even sure it is supported)… I will try and let you know.
It turns out the problem (i.e., the ROOT prompt never appears) only exists when I try to run ROOT from a xterm window in cygwin. If I start ROOT in a cygwin command shell it works fine! Do you have any idea why it would not work in the xterm window? I compiled the ROOT source tree in the xterm window.
ROOT compiled with MSVC++ is meant to be run in a command prompt (it is a Win32 binary) nothing to do with a xterm. If you want a X11/Xterm compatibe version, you have to compile it with cygwin gcc (note I would not advise to do so)
I know that this is the general bias that the Root team has, but I think there are many advantages to the cygwin/g++ version of Root (as opposed to VC++). I agree that there are speed differences, but the similarities in the environment (as compared to linux) usually more than make up for them.