Migrating from ROOT 5 to ROOT 6 in Windows 10

I cannot reproduce the error when compiling a macro with gInterpreter->LoadMacro. Can you try with another macro (e.g. one from the tutorials) to see if the error is always there?

I tried with the FFT.C macro from the tutorials/fft folder and the issue persists. I guess this is a setup issue and not a root 5 to root 6 specific issue. Is there a way to back trace if there was an issue with the build?
Thanks,
Vagelis

Well, you can try to set the gDebug variable to something greater than zero to see if you have some useful printout, but I don’t think it will be useful if the issue is coming from your environment… Do you run from a x86 Native Tools Command Prompt for VS 2017?

Yes I do, i tried the gDebug method and this is a printout for the FFT macro:

root [0] gDebug=1
(int) 1
root [1] .L C:/root/tutorials/fft/FFT.c+
Info in TWinNTSystem::ACLiC: creating shared library C:/root/tutorials/fft/FFT_c.dll
Info in TWinNTSystem::Load: loaded library C:\root\bin\libHist.dll, status 0
Info in TWinNTSystem::Load: loaded library C:\root\bin\libGpad.dll, status 0
FFT_c_ACLiC_dict.cxx
Création de la bibliothèque C:/root/tutorials/fft\FFT_c.lib et de l’objet C:/root/tutorials/fft\FFT_c.exp
C:\WINDOWS\System32\KERNEL32.DLL : fatal error LNK1107: fichier non valide ou endommagé : impossible de lire à 0x2E0
Error in : Compilation failed!
Info in TPluginManager::LoadHandlerMacros: C:\root\etc\plugins\TVirtualPad
Info in TPluginManager::FindHandler: found plugin for TPad
Info in TPluginManager::LoadHandlerMacros: C:\root\etc\plugins\TVirtualX
Info in TPluginManager::FindHandler: found plugin for TGWin32
Info in TWinNTSystem::Load: loaded library C:\root\bin\libWin32gdk.dll, status 0
Info in TInterpreter::TCling::AutoLoad: loaded library libWin32gdk.dll for TGWin32
Info in TPluginManager::LoadHandlerMacros: C:\root\etc\plugins\TGuiFactory
Info in TPluginManager::FindHandler: found plugin for TRootGuiFactory
Info in TWinNTSystem::Load: loaded library C:\root\bin\libGui.dll, status 0
Info in TInterpreter::TCling::AutoLoad: loaded library libGui.dll for TRootGuiFactory

It does not seem to show where things go wring…

OK, trying to figure out where this could be coming from… Can you check the value of MAKESHAREDLIB in the %ROOTSYS%\include\compiledata.h header?

#define MAKESHAREDLIB “cl $Opt -nologo -TP -c -nologo -IC:/root/Source/v6.14.06/build/win -FIw32pragma.h -FIsehmap.h -MD -GR -EHsc- -W3 -wd4141 -wd4291 -wd4244 -wd4049 -D_WIN32 -D_XKEYCHECK_H -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -DNOMINMAX -D_CRT_SECURE_NO_WARNINGS -std=c++14 $IncludePath $SourceFiles -Fo$ObjectFiles && bindexplib $LibName $ObjectFiles > $BuildDir\$LibName.def && lib -nologo -MACHINE:IX86 -out:$BuildDir\$LibName.lib $ObjectFiles -def:$BuildDir\$LibName.def && link -nologo $ObjectFiles -DLL -out:$BuildDir\$LibName.dll $BuildDir\$LibName.exp -LIBPATH:%ROOTSYS%\lib $LinkedLibs libCore.lib kernel32.lib advapi32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib && if EXIST “$BuildDir\$LibName.dll.manifest” ( mt -nologo -manifest “$BuildDir\$LibName.dll.manifest” “-outputresource:$BuildDir\$LibName.dll;2” && del “$BuildDir\$LibName.dll.manifest” )”

OK, this looks OK, there is no KERNEL32.DLL in the list. So I have no idea where this could come from…

The only reference of a kernel32.dll in root source files is at TWinNTSystem.cxx line 1512, if this is of any help…
Ah, there is also a reference at RWMutex.inc at \interpreter\llvm\src\lib\Support\Windows\ line 50, and this is only in root 6, none of the previous version i checked…

Well, there are several, but AFAICS they are not related to ACLiC…

OK just some later news after a bit of hassling around…
I re-compiled root 6 from scratch with the latest CMake distribution and VS 2017 but the same problem remains. Then I uninstalled everything and tried one of the compiled binaries for windows from the webpage, and I still experience the same issue.
Then i reinstalled root 5 (with VS2017 I might add) which works without any problem!
This is specific to root 6, so there is an issue somewhere and is probably not related to my system. The only reason i need root 6 is because i need fftw and root 5 will not compile from source with my configuration correctly no matter how many different versions of cmake and vs studio i try.

FYI, ROOT 5 only compiles with at most VS 2013. Any more recent version is not supported.

BTW, you can also compile your code in the command line…

Command line? What exactly do you mean?
I will try later in the day to compile root 5 with FFTW and vs2013.

Open a Visual Studio command prompt, and compile your code with something like:

cl -nologo /MD /GR /EHsc /I%ROOTSYS%\include /FIw32pragma.h your_source.cxx /link /dll /LIBPATH:%ROOTSYS%\lib libCore.lib libRIO.lib /out:your_dll.dll

I know you prbably have asressed this before, but I am trying to build root 5 with CMAKE 3.7.2 and VS2013 12.0.4 upgrade 5 and i get an error at the cmake configuration:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ZLIB_LIBRARY

My cmake command is :

cmake -Dall=ON -Droofit=ON -Dmathmore=OFF -Dbuiltin_zlib=ON -Dfftw3=ON -DFFTW_INCLUDE_DIR=C:/root/fftw-3.3.5-dll32 -DFFTW_LIBRARY=C:/root/fftw-3.3.5-dll32/libfftw3-3.lib C:\root\Source

so ZLIB_Library should be built by default right? Why is it still searching for it?

Thanks

I don’t know, it works for me… which version of ROOT are you trying to build?

Release 5.34/36 - 2016-04-05, I downloaded and installed zlib directly from source (WinGNU) force now and edited the cmake properties trough the GUI.
It started compiling…
I actually had the same problem on all versions 5 I tried, one of the reasons I wanted version 6.

You should not do that…

Well, it compiled without any warnings or errors but when I try to compile my code with Aclic i get:

Error: class,struct,union or type __w64 not defined C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\sys/types.h(40)
Error: class,struct,union or type __int64 not defined C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\sys/types.h(45)

And the FFTW seems to be included, it recognizes the TVirtualFFT identifier.
Forgot to mention that I had manually included sys/types.h (I was doing some conversion and memory operations but that part of the code changed). I might be able to remove it and get around the error though…

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.