Building root 6.24 from source on windows 10

Dear forum,

I have been trying to build root 6.24.99 on Windows 10 from source for 10 days hitting several hurdles that I managed to overcome by searching (extensively) the forum. But I have to admit that I am hitting a wall I do not understand and I need your help.

I am building on “Visual Studio 2019 Developer Command Prompt v16.8.4” (x86 Native Tools Command Prompt) with the following command:

cmake -G “Visual Studio 16” -A Win32 -Thost=x64 -DCMAKE_VERBOSE_MAKEFILE=ON -DPYTHON3_EXECUTABLE=“C:/Users/AE265409/Anaconda3/python.exe” -DCMAKE_INSTALL_PREFIX=“C:/Users/AE265409/Desktop/ROOT/root6.24install” …/root6.24source 1> config.txt 2>&1

Here is the std output of the cmake config. config.txt (10.6 KB)
Here is the CMakeCache file CMakeCache.txt (127.7 KB)

Then I build with:

cmake --build . --config Release – /maxcpucount 1> build.txt 2>&1

Here is the std output of the cmake build : build.txt (2.8 MB)

And here are the CMakeFiles/CMakeError.log and CMakeOutput.log files : CMakeOutput.txt (42.5 KB) CMakeError.txt (82.0 KB)

As you can see, the build exits with the following error for hsimple.root.

237>C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(238,5): error MSB8066: la build personnalis‚e de ‘C:\Users\AE265409\Desktop\ROOT\BUILDR\CMakeFiles\878838cc6fd03be61fd5906849e3c9b6\hsimple.root.rule;C:\Users\AE265409\Desktop\ROOT\BUILDR\CMakeFiles\073235653d2176b88ef823a2194ec159\hsimple.rule’ s’est arrˆt‚e. Code -1073741515. [C:\Users\AE265409\Desktop\ROOT\BUILDR\hsimple.vcxproj]

@bellenot I know you are very knowledgeable on root for windows (from different posts in which you always replied), would you by any chance have an idea (and time) ?

Thank you very much for any help you guys can give me,


I don’t see anything obvious from what you posted here. It might be you cloned a buggy version (6.24.99 is not a final release number). Maybe you could try to pull the latest version, or try the master. We build the head of 6-22-00-patches, 6-24-00-patches and master every day without problem with VS 2019 (v16.3.10), and I build the master and run all the tests with the latest version of VS 2019 (v16.9.2). I’ll try 6-24-00-patches and let you know

Dear Bertrand,

Thanks alot for your quick reply.

I will update to v16.9.2 and clone the master branch an try that way and let you know on my end.

Thank you,


I just finished building the master with the latest version of VS2019 (v16.9.2) and I unfortunately get the same error… See the attached files. I am a bit lost… :confused:

CMakeOutput.txt (43.3 KB) CMakeError.txt (83.7 KB) build.txt (2.8 MB) config.txt (10.6 KB) CMakeCache.txt (128.0 KB)

I don’t know what’s going on on your system, but I see plenty of errors of the type:

         pwsh.exe -ExecutionPolicy Bypass -noprofile -File "C:\Users\AE265409\vcpkg\vcpkg\scripts\buildsystems\msbuild\applocal.ps1" "C:\Users\AE265409\Desktop\ROOT\build_master\graf3d\eve\G__Eve.dir\Release\G__Eve.lib" "C:\Users\AE265409\vcpkg\vcpkg\scripts\buildsystems\msbuild\..\..\..\installed\x86-windows\bin" "G__Eve.dir\Release\G__Eve.tlog\G__Eve.write.1u.tlog" "G__Eve.dir\Release\vcpkg.applocal.log"
         'pwsh.exe' n'est pas reconnu en tant que commande interne
         ou externe, un programme ex‚cutable ou un fichier de commandes.
         La commande "pwsh.exe -ExecutionPolicy Bypass -noprofile -File "C:\Users\AE265409\vcpkg\vcpkg\scripts\buildsystems\msbuild\applocal.ps1" "C:\Users\AE265409\Desktop\ROOT\build_master\graf3d\eve\G__Eve.dir\Release\G__Eve.lib" "C:\Users\AE265409\vcpkg\vcpkg\scripts\buildsystems\msbuild\..\..\..\installed\x86-windows\bin" "G__Eve.dir\Release\G__Eve.tlog\G__Eve.write.1u.tlog" "G__Eve.dir\Release\vcpkg.applocal.log"" s'est arrˆt‚e avec le code 9009.

So there is definitively something non-conventional with vcpkg. Can you try to build in a clean environment?
From my side I successfully built the 6-24-00-patches branch

Hi @bellenot,

Thank you for the update.

From my side I uninstalled and cleaned from environment variables everything that is vcpkg/vs related.

I do get rid of the 'pwsh.exe' errors in the build. But I still get an error while building hsimple.
See attached files :
config.txt (10.7 KB) build.txt (2.2 MB) CMakeOutput.txt (39.0 KB) CMakeError.txt (83.3 KB) CMakeCache.txt (128.0 KB)

Well I guess if you are running out of ideas, I am just going to give up as I wasted a lot of time already trying to build it. This is frustrating because I really wanted to succeed on installing root and I looked forward to use pyROOT now that it was windows-compatible. But I am way over my head here… :confused:

Thank you very much for your help (if you still have ideas, I will try them of course ! but otherwise, don’t sweat it…)


Can you try to call C:\Users\AE265409\Desktop\ROOT\buildmaster\bin\thisroot.bat and then start root.exe?
BTW, are you building in your Desktop? That’s weird… I never tried that, it might also be part of the problem…

Here is what I get:

Root starts but I get an error as soon as I want to draw a histogram.

As for building in my Desktop, that is a (bad ?) habit of mine to have all my utilities on Desktop. But If you believe it might be the source of the problem, I can build in another folder.

So it works. And yes, if fails because the build was not over and libWin32Gdk.dll was not build. And BTW, you cannot execute .vcxproj files :wink:
What you can try is to go to the tutorials directory and try to run root -l -b -q hsimple.C

XD I know, it was just my brain unconsciously praying for hsimple to be here :disappointed_relieved:

Here is the output of root -l -b -q hsimple.C :

C:\Users\AE265409\Desktop\ROOT\buildmaster\tutorials> root -l -b -q hsimple.C

Welcome to the ROOT tutorials

Type “.x demos.C” to get a toolbar from which to execute the demos

Type “.x demoshelp.C” to see the help window

==> Many tutorials use the file hsimple.root produced by hsimple.C
==> It is recommended to execute hsimple.C before any other script

Processing hsimple.C…
hsimple : Real Time = 0.27 seconds Cpu Time = 0.28 seconds
(TFile *) 0xac2ed90

Taking a break from ROOT? Hope to see you back!`

I don’t know how to interpret that…

Did I load the macro on root ? then quit ?

So you successfully executed what was supposed to be done by the build system (i.e. generating hsimple.root). Then I don’t know what else to try since everything seems to work on the command line…
And yes, you started ROOT without splash screen (-l) in batch mode (-b), executed the hsimple.C macro, and then quit (-q)

Well, I figured that and I jumped the gun and went forward with the build since hsimple.root was generated. My eyes started to fill with hope when seeing everything build correctly untill I got to this wall of errors related to GSL functions (line 6550 of the redirected std output):

build2.txt (515.4 KB)

Was it a stupid move to carry on with building the project ? Are these errors related to hsimple not being generated “the conventional way” ?

It looks like your GSL has been build in an incompatible way. I would try to disable the mathmore option and try again. Then you can try to fix the GSL errors

IT WORKED ! :partying_face:

@bellenot : thank you very very very much for your help ! It is time for me to dive into root and pyroot !

Again, thank you very much !
:partying_face: :partying_face: :partying_face:

1 Like

Cool, good news! And you’re very welcome!

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