# Building root 6.24 from source on windows 10

**URL:** <https://root-forum.cern.ch/t/building-root-6-24-from-source-on-windows-10/44165>\
**Category:** ROOT\
**Tags:** build, cmake, installation, windows\
**Created:** [March 25, 2021, 3:46pm UTC](https://root-forum.cern.ch/t/building-root-6-24-from-source-on-windows-10/44165 "2021-03-25T15:46:17Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![aela](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/b5a626/32.png) [@aela](https://root-forum.cern.ch/u/aela)\
**Post date:** [March 25, 2021, 3:46pm UTC](https://root-forum.cern.ch/t/building-root-6-24-from-source-on-windows-10/44165/1 "2021-03-25T15:46:17Z")

</div>

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](https://root-forum.cern.ch/uploads/short-url/smmP36dZwkxyFBOGrCp9LE8KjcF.txt) (10.6 KB)  
Here is the CMakeCache file [CMakeCache.txt](https://root-forum.cern.ch/uploads/short-url/7nbT0IeQIuRtM21o59wOPOtfeMU.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](https://root-forum.cern.ch/uploads/short-url/nkyLFVkhR6IBHx3DB9lXyIMDPoW.txt) (2.8 MB)

And here are the CMakeFiles/CMakeError.log and CMakeOutput.log files : [CMakeOutput.txt](https://root-forum.cern.ch/uploads/short-url/kmIDJhpHYDnDMBfZTwcMSLZcABp.txt) (42.5 KB) [CMakeError.txt](https://root-forum.cern.ch/uploads/short-url/brH1y3Qem4staCRQYZGX9Tl4RU9.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,

Cheers

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [March 25, 2021, 4:12pm UTC](https://root-forum.cern.ch/t/building-root-6-24-from-source-on-windows-10/44165/2 "2021-03-25T16:12:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![aela](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/b5a626/32.png) [@aela](https://root-forum.cern.ch/u/aela)\
**Post date:** [March 25, 2021, 4:42pm UTC](https://root-forum.cern.ch/t/building-root-6-24-from-source-on-windows-10/44165/3 "2021-03-25T16:42:40Z")

</div>

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,

Aly

---

<div class="post-metadata">

**Author:** ![aela](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/b5a626/32.png) [@aela](https://root-forum.cern.ch/u/aela)\
**Post date:** [March 25, 2021, 5:53pm UTC](https://root-forum.cern.ch/t/building-root-6-24-from-source-on-windows-10/44165/4 "2021-03-25T17:53:12Z")

</div>

@bellenot  
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… 😕

[CMakeOutput.txt](https://root-forum.cern.ch/uploads/short-url/65vhTMIoiQUgdnAcuYpTew4gfEu.txt) (43.3 KB) [CMakeError.txt](https://root-forum.cern.ch/uploads/short-url/jX3PNgCQRSXyZgdO28DgaAb8eW5.txt) (83.7 KB) [build.txt](https://root-forum.cern.ch/uploads/short-url/i1p1WSHE6iLNgIgEpfmifo7CXBY.txt) (2.8 MB) [config.txt](https://root-forum.cern.ch/uploads/short-url/vvF014MRVGyTJuj5umHAzAwbU7U.txt) (10.6 KB) [CMakeCache.txt](https://root-forum.cern.ch/uploads/short-url/cmyzF2MXRkmfUtAXW4UxGb87OdP.txt) (128.0 KB)

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [March 26, 2021, 7:10am UTC](https://root-forum.cern.ch/t/building-root-6-24-from-source-on-windows-10/44165/5 "2021-03-26T07:10:19Z")

</div>

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

```auto
         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

---

<div class="post-metadata">

**Author:** ![aela](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/b5a626/32.png) [@aela](https://root-forum.cern.ch/u/aela)\
**Post date:** [March 26, 2021, 2:31pm UTC](https://root-forum.cern.ch/t/building-root-6-24-from-source-on-windows-10/44165/6 "2021-03-26T14:31:48Z")

</div>

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](https://root-forum.cern.ch/uploads/short-url/w8xxO54tNuNXqqAiVPR0Xemf3rE.txt) (10.7 KB) [build.txt](https://root-forum.cern.ch/uploads/short-url/7jva42XpGdE0dYUQnX6ZCFWRlkU.txt) (2.2 MB) [CMakeOutput.txt](https://root-forum.cern.ch/uploads/short-url/1JPr7gJQef0cLOrveaCfbrxJ82b.txt) (39.0 KB) [CMakeError.txt](https://root-forum.cern.ch/uploads/short-url/w1eC5ob9yajY42NgvzSx9gG08Mg.txt) (83.3 KB) [CMakeCache.txt](https://root-forum.cern.ch/uploads/short-url/pVFGEc3OzyZADqkrUdIZ0PH0tcM.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… 😕

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

Cheers  
Aly

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [March 26, 2021, 2:40pm UTC](https://root-forum.cern.ch/t/building-root-6-24-from-source-on-windows-10/44165/7 "2021-03-26T14:40:37Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![aela](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/b5a626/32.png) [@aela](https://root-forum.cern.ch/u/aela)\
**Post date:** [March 26, 2021, 2:49pm UTC](https://root-forum.cern.ch/t/building-root-6-24-from-source-on-windows-10/44165/8 "2021-03-26T14:49:18Z")

</div>

Here is what I get:

 ![screenshot_root](https://root-forum.cern.ch/uploads/default/original/3X/0/2/023956ef388718be4dde704ff2105f542f661a2b.png)

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.

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [March 26, 2021, 2:54pm UTC](https://root-forum.cern.ch/t/building-root-6-24-from-source-on-windows-10/44165/9 "2021-03-26T14:54:40Z")

</div>

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 😉  
What you can try is to go to the `tutorials` directory and try to run `root -l -b -q hsimple.C`

---

<div class="post-metadata">

**Author:** ![aela](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/b5a626/32.png) [@aela](https://root-forum.cern.ch/u/aela)\
**Post date:** [March 26, 2021, 3:02pm UTC](https://root-forum.cern.ch/t/building-root-6-24-from-source-on-windows-10/44165/10 "2021-03-26T15:02:13Z")

</div>

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

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!`  
> **C:\Users\AE265409\Desktop\ROOT\buildmaster\tutorials\>**

I don’t know how to interpret that…

Did I load the macro on root ? then quit ?

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [March 26, 2021, 3:11pm UTC](https://root-forum.cern.ch/t/building-root-6-24-from-source-on-windows-10/44165/11 "2021-03-26T15:11:13Z")

</div>

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`)

---

<div class="post-metadata">

**Author:** ![aela](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/b5a626/32.png) [@aela](https://root-forum.cern.ch/u/aela)\
**Post date:** [March 26, 2021, 3:27pm UTC](https://root-forum.cern.ch/t/building-root-6-24-from-source-on-windows-10/44165/12 "2021-03-26T15:27:06Z")

</div>

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](https://root-forum.cern.ch/uploads/short-url/eaulQF1TO9M1TPgHXL6yaUNUjnu.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” ?

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [March 26, 2021, 3:32pm UTC](https://root-forum.cern.ch/t/building-root-6-24-from-source-on-windows-10/44165/13 "2021-03-26T15:32:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![aela](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/b5a626/32.png) [@aela](https://root-forum.cern.ch/u/aela)\
**Post date:** [March 26, 2021, 4:14pm UTC](https://root-forum.cern.ch/t/building-root-6-24-from-source-on-windows-10/44165/14 "2021-03-26T16:14:56Z")

</div>

IT WORKED ! 🥳

@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 !  
🥳 🥳 🥳

 ![screenshot_root2](https://root-forum.cern.ch/uploads/default/original/3X/8/5/85bb1d217b6bfcbca66680bd0ab2ab26627ccce1.png)

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [March 26, 2021, 4:16pm UTC](https://root-forum.cern.ch/t/building-root-6-24-from-source-on-windows-10/44165/15 "2021-03-26T16:16:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [April 9, 2021, 4:17pm UTC](https://root-forum.cern.ch/t/building-root-6-24-from-source-on-windows-10/44165/16 "2021-04-09T16:17:13Z")

</div>

Closed on April 9, 2021, 4:17pm UTC

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