Windows build fails v5-34-02

Hi all,

I am having trouble building v5-34-02 in Windows using ROOT builder. I am using the config:

I added the --enable-builtin-fpgl because the error I am getting is,

1>graf3d/gl/src/TGLFontManager.cxx(28): fatal error C1083: Cannot open include file: 'FTGL/ftgl.h': No such file or directory
1>  make: *** [graf3d/gl/src/TGLFontManager.o] Error 2
1>  make: *** Waiting for unfinished jobs....
1>graf3d/gl/src/TGLText.cxx(26): fatal error C1083: Cannot open include file: 'FTGL/ftgl.h': No such file or directory
1>  make: *** [graf3d/gl/src/TGLText.o] Error 2
1>graf2d/asimage/src/TASPaletteEditor.cxx(49): fatal error C1083: Cannot open include file: 'win32/config.h': No such file or directory
1>  make: *** [graf2d/asimage/src/TASPaletteEditor.o] Error 2

I have built ROOT successfully before, but this is my first time trying v5-34-02. Any advice?

Thanks,
Dan

Hi,

Well, --enable-builtin-ftgl is the default anyway on Windows, so you shouldn’t have any problem…
(and configure should telly you this: INFO: --enable-builtin-ftgl: already enabled by default.)

Cheers, Bertrand.

I don’t understand what you mean when you say I “shouldn’t have any problem”. The build fails with the error I posted above, so I clearly am having some kind of problem. Do you have any suggestion about what the problem could be or what I can do to make this build successfully?

Thanks,
Dan

Obviously something went wrong on your side, since the compiler should not even look for FTGL/ftgl.h in graf3d/gl/src/TGLFontManager.cxx:

[code]#ifndef BUILTIN_FTGL

include <FTGL/ftgl.h>

#else

[/code]
So could you post your complete configure command options, and attach the config.status and config.log files?

Cheers, Bertrand.

Yes, I don’t understand what’s wrong with my setup yet. I have attached the config.log and config.status. The config parameters are the same as in the first post. It must be that -DBUILTIN_FTGL is not being added to the Makefile, but so far I haven’t been able to find out why. I’ll keep looking…

Thanks again,
Dan
brokenWinConfig.zip (5.12 KB)

Well, the configure step seems to be OK (except that it doesn’t find python):

You can see that builtin_ftgl option is there… Do you have a custom MyConfig.mk in $ROOTSYS?

Cheers, Bertrand.

I didn’t make a custom MyConfig.mk. I am using the ROOT Build Builder without any modifications. In case it helps, I have attached the Makefile that was generated although I had to rename it to Makefile.txt so the system would accept the attachment.

Cheers,
Dan
Makefile.txt (51.1 KB)

OK, could you check that your $ROOTSYS/config/Makefile.config contains these lines:

BUILDFTGL := yes FTGLLIBDIR := FTGLLIBS := lib/libFTGL.lib FTGLINCDIR := $(filter-out /usr/include, include) ifeq ($(BUILDFTGL), yes) FTGLCPPFLAGS := -DBUILTIN_FTGL endif
– Bertrand.

Yes, I have those lines in Makefile.config. I have attached the full build log. I’m afraid I haven’t made any real progress on figuring out where this problem is coming from.

[quote=“bellenot”]OK, could you check that your $ROOTSYS/config/Makefile.config contains these lines:

BUILDFTGL := yes FTGLLIBDIR := FTGLLIBS := lib/libFTGL.lib FTGLINCDIR := $(filter-out /usr/include, include) ifeq ($(BUILDFTGL), yes) FTGLCPPFLAGS := -DBUILTIN_FTGL endif
– Bertrand.[/quote]
root_build_project.txt (35.1 KB)

OK, that’s weird, the -DBUILTIN_FTGL compiler flag is missing in your command line. See for example on my PC:./build/win/cl.sh -Z7 -nologo -FIw32pragma.h -MD -GR -EHsc- -W3 -wd4244 -Iinclude -D_WIN32 -Iinclude -I/c/Users/bellenot/root/graf2d/win32gdk/gdk/src -I/c/Users/bellenot/root/graf2d/win32gdk/gdk/src/gdk -I/c/Users/bellenot/root/graf2d/win32gdk/gdk/src/glib -Igraf2d/freetype/src/freetype-2.3.12/include -Iinclude -DBUILTIN_FTGL -Iinclude -DBUILTIN_GLEW -Fograf3d/gl/src/TGLFontManager.o -c /c/Users/bellenot/root/graf3d/gl/src/TGLFontManager.cxx

And this flag is set by the $ROOTSYS/graf3d/gl/Module.mk:

[code]$(call stripsrc,$(GLDIRS)/TGLText.o): $(FREETYPEDEP)
$(call stripsrc,$(GLDIRS)/TGLText.o): CXXFLAGS += $(FREETYPEINC) $(FTGLINCDIR:%=-I%) $(FTGLCPPFLAGS)

$(call stripsrc,$(GLDIRS)/TGLFontManager.o): $(FREETYPEDEP)
$(call stripsrc,$(GLDIRS)/TGLFontManager.o): CXXFLAGS += $(FREETYPEINC) $(FTGLINCDIR:%=-I%) $(FTGLCPPFLAGS)
[/code]
I’ll investigate and let you know.

Cheers, Bertrand.

Hi Dan,

It looks an environment problem… What was the latest version you successfully build with the ROOT builder? Are you sure you have the latest version?
Could you try to simply use configure/make from a bash shell?
Otherwise I’ll set-up an environment to try it, but I will have to use a virtual machine, so it could take some time…

Cheers, Bertrand.

Hi Bertrand,

This is my first time attempting to build ROOT on this machine. I’ll try to do the configure/make in a bash shell and see if I can make any progress that way.

Dan

Hello,
I am still trying to install ROOT (v5.34.03) this time with ROOT Builder for VS2010 and not for VS2012 (see my post Building Building ROOT with CMake and Visual Studio 11.0 : failed). I encountered the same error concerning the fact that the file ftgl.h cannot be opened.
Was their a solution found to this problem?

P.S.1 : I tried also to install it with ./configure and make but it failed with the following error :

rc -DBUILDNUMBER=0 -r -fo gdk.res rc\gdk.rc /usr/bin/rc: bad option: -D NMAKE : fatal error U1077: 'C:\PFiles\cygwin\bin\rc.EXE' : return code '0x1'
P.S.2 : I tried also with CMake and it compiled with VS2010

[code]
========== Rebuild All: 188 succeeded, 0 failed, 2 skipped ==========
[\code]
but when I open ROOT by double cliking the root.exe here is the code I have :

Error cannot open file « iostream » (tmpfile)(2)
***Interpreter error recovered***
Error cannot open file « string » (tmpfile)(2)
***Interpreter error recovered***
Error cannot open file « DllImport.h » (tmpfile)(2)
***Interpreter error recovered***

I do not know if I have to ignore these messages… but when I create a canvas no window opens.

Thanks,
Sam

Hi Sam,

[quote=“SamuelD”]P.S.1 : I tried also to install it with ./configure and make but it failed with the following error :
rc -DBUILDNUMBER=0 -r -fo gdk.res rc\gdk.rc
/usr/bin/rc: bad option: -D
NMAKE : fatal error U1077: ‘C:\PFiles\cygwin\bin\rc.EXE’ : return code ‘0x1’
[/quote]
OK, this is the wrong rc.exe (should be the one from Visual Studio). Could you try to rename the cygwin one and try again?
Note you may have the same kind of problem with link.exe, since both MSVC+++ and cygwin have one.

[quote=“SamuelD”]P.S.2 : I tried also with CMake and it compiled with VS2010
but when I open ROOT by double cliking the root.exe here is the code I have :
Error cannot open file « iostream » (tmpfile)(2)
Interpreter error recovered
Error cannot open file « string » (tmpfile)(2)
Interpreter error recovered
Error cannot open file « DllImport.h » (tmpfile)(2)
Interpreter error recovered
I do not know if I have to ignore these messages… but when I create a canvas no window opens.
[/quote]
Well, you have to define the ROOTSYS environment variable, and add %ROOTSYS%\bin to your %PATH%, or run root\bin\thisroot.bat from the command line, it will do it for you (but only for the actual command line session)

Cheers, Bertrand.

Hi,
it work’s!
I renamed the rc.exe file of cygwin and recompile ROOT. I can run ROOT wihout any problem.
Concerning the ROOT Builder method. I did not find any solution.
Concerning the CMake method. It still remains some errors as mentioned in P.S.2.
Thanks for your support,
Sam

Okay, I have the exact same errors. I have the source code installed into C:\shared-sw\root and through the cmake gui and set the output directory to C:\shared-sw\root-build
In Visual C++ 2010 Express (with SP1 installed) I selected the Release build and built the ROOT.sln solution (by right clicking the top most hierarchy in the tree and selecting Build Solution).
Okay, so it’s built without error and there are lots of files in C:\shared-sw\root-build specifically in C:\shared-sw\root-build\bin\Release and C:\shared-sw\root-build\lib\Release appears to be where a lot of the most needed compiled files are.

I’ve tried running C:\shared-sw\root-build\bin\thisroot.bat from the commandline and adding C:\shared-sw\root-build\bin to my PATH environment variable but I still encounter the above errors. If anyone could provide insight on specifically what I need to do or what root is expecting on the windows platform that would be very informative.

By the way this is with the latest root release version 5-34-04 on 64-bit windows 7.

Thanks!

Woo! I figured it out. After building the project I was using the files in the cmake build directory. The problem is that with Visual Studio C++ 2010 will place these files in configuration subdirectories such as Debug or Release. This isn’t what the root system expects so we need to install the files into the appropriate structure. Within Visual Studio C++ this was easy by right opening the ROOT.sln solution and right clicking on the INSTALL project and building it. It installed back in my source directory (boo) but I believe you can fix this with the -DCMAKE_INSTALL_PREFIX=<…> option.

Now I can run root on windows without cygwin or any other unix based build system!

Thanks for supporting CMake!

A last issue I am having is getting PyROOT to work.

I added my root install bin and lib directories to my sys.path, and after printing sys.path I confirm they are indeed in there.

However,

Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> import ROOT File "C:\shared_sw\root\bin\ROOT.py", line 85, in <module> import libPyROOT as _root ImportError: No module named libPyROOT

I do not see libPyROOT.py(d) anywhere in the build system. There is however a libPyROOT.lib in lib\ though and a libPyROOT.dll in bin.
I’m not sure how to include something that doesnt exist, is there something broken with the build system? I did specify Dpython=ON when I used cmake to build the visual c++ solution. The output of cmake indicated it found my 32bit Python 2.7 version fine.

From another post it seems that libPyROOT.pyd is actually a dll. I tried copying and renaming libPyROOT.dll as libPyROOT.pyd but whenever I display a canvas in python my script hangs and nothing is draw on the canvas. I tested with the provided tutorial scripts with the same result.