# \[43597\] ROOT 6.36 from Source on Windows Server 2016: Headers Copy Issue

**URL:** <https://root-forum.cern.ch/t/43597-root-6-36-from-source-on-windows-server-2016-headers-copy-issue/63506>\
**Category:** Newbie\
**Tags:** root\
**Created:** [May 6, 2025, 2:38pm UTC](https://root-forum.cern.ch/t/43597-root-6-36-from-source-on-windows-server-2016-headers-copy-issue/63506 "2025-05-06T14:38:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Salomon](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/salomon/32/18000_2.png) [@Salomon](https://root-forum.cern.ch/u/Salomon)\
**Post date:** [May 6, 2025, 2:38pm UTC](https://root-forum.cern.ch/t/43597-root-6-36-from-source-on-windows-server-2016-headers-copy-issue/63506/1 "2025-05-06T14:38:33Z")

</div>

* * *

_ROOT Version:_ [v6-36-00-rc1](https://github.com/root-project/root/releases/tag/v6-36-00-rc1)  
_Platform:_ Windows Server 2016 Version 1607  
_Compiler:_ Visual Studio 2022 v17.3.6

* * *

Hello,

I tried to build ROOT 6.36 on Windows Server 2016 for my clients. However I face a header copy issue.

### Windows Server 2016: Configuration

Here are the CMake configuration option:

```auto
-DCMAKE_CXX_STANDARD=17 -DCMAKE_CONFIGURATION_TYPES=Release [...] Dgminimal=ON -Droofit=ON

```

and an excerpt of the console:

```powershell
-- ROOT Configuration 
System: Windows-10.0.14393
ROOT Platform: win32
ROOT Architecture: win64
Processor: 24 core 2992 MHz GenuineIntel Pentium II (0.25 micron) (AMD64)
Build type:        
Install path: D:/[...]/outputs/root
Compiler: MSVC 19.33.31630.0
C++ standard: 17
Compiler flags:
-- 
 - C: -nologo -ID:/[...]/root/cmake/win -FIw32pragma.h -FIsehmap.h -GR -MD -EHsc -W3 -wd4267 -DNOMINMAX 
 - C (build type specific):
     Debug: -MD -Od -Ob0 -Z7
     Release: -MD -O2 -Ob2 -DNDEBUG
     MinSizeRel: -MD -O1 -Ob1 -DNDEBUG
     RelWithDebInfo: -MD -O2 -Ob2 -Z7 -DNDEBUG
 - C++: -nologo -ID:/[...]/root/cmake/win -Zc:__cplusplus -std:c++17 -GR -FIw32pragma.h -FIsehmap.h -MD -EHsc -W3 -wd4141 -wd4291 -wd4244 -wd4049 -wd4146 -wd4250 -wd4624 -wd4267 -D_XKEYCHECK_H -DNOMINMAX -D_CRT_SECURE_NO_WARNINGS -D_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING -D_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING 
 - C++ (build type specific):
     Debug: -MD -Od -Ob0 -Z7
     Release: -MD -O2 -Ob2 -DNDEBUG
     MinSizeRel: -MD -O1 -Ob1 -DNDEBUG
     RelWithDebInfo: -MD -O2 -Ob2 -Z7 -DNDEBUG
-- Linker flags:
 - Executable: /machine:x64 -ignore:4049,4206,4217,4221 -incremental:no
 - Module: /machine:x64 -ignore:4049,4206,4217,4221 -incremental:no
 - Shared: /machine:x64 -ignore:4049,4206,4217,4221 -incremental:no
-- Enabled support for: builtin_clang builtin_cling builtin_freetype builtin_llvm builtin_lz4 builtin_lzma builtin_nlohmannjson builtin_pcre builtin_xxhash builtin_zlib builtin_zstd roofit shared

```

### Windows Server 2016: Build

`move_headers` target was chosen to speed up the build.  
After few minutes, here is the error message I got:

```powershell
[...]
  Copy headers for D:/[...]/root/my_build/include/ 300
  Copy headers for D:/[...]/root/my_build/include/ 1000
  Copy headers for D:/[...]/root/my_build/include/ 800
  Error copying file (if different) from "D:/[...]/rootroofit/roofitcore/inc/RooCategory.h" to "D:/[...]/root/my_build/include/".
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(247,5): error MSB8066: Custom build for 'D:\[...]\root\my_build\CMakeFiles\d2e1239b1919d3968746a8ccba33e47b\TTreeProxyGenerator.h.rule;D:\[...]\root\my_build\CMakeFiles\d2e1239b1919d3968746a8ccba33e47b\Bswapcpy.h.rule;D:\[...]\root\my_build\CMakeFiles\d2e1239b1919d3968746a8ccba33e47b\TVirtualRefProxy.h.rule;D:\[...]\root\my_build\CMakeFiles\d2e1239b1919d3968746a8ccba33e47b\X3DBuffer.h.rule;D:\[...]\root\my_build\CMakeFiles\d2e1239b1919d3968746a8ccba33e47b\TVirtualRWMutex.h.rule;D:\[...]\root\my_build\CMakeFiles\0ef558f0a75a8622f830fac79b5b8d50\BasicFCN.h.rule;D:\[...]\root\my_build\CMakeFiles\d2e1239b1919d3968746a8ccba33e47b\TMinuit2TraceObject.h.rule;D:\[...]\root\my_build\CMakeFiles\d2e1239b1919d3968746a8ccba33e47b\RooRecursiveFraction.h.rule;D:\[...]\root\my_build\CMakeFiles\d2e1239b1919d3968746a8ccba33e47b\TAttMarkerEditor.h.rule;D:\[...]\root\my_build\CMakeFiles\d2e1239b1919d3968746a8ccba33e47b\TKDE.h.rule;D:\[...]\root\my_build\CMakeFiles\7497e5215a106393b4d7743f80e52515\AdaptiveIntegratorMultiDim.h.rule;D:\[...]\root\my_build\CMakeFiles\7497e5215a106393b4d7743f80e52515\BoostZ.h.rule;D:\[...]\root\my_build\CMakeFiles\7a62a2faf0eb8c102acd7e3e125baa7c\3DConversions.h.rule;D:\[...]\root\my_build\CMakeFiles\d4401aaca4400e6c05015003719f7e47\AnalyticalGradientCalculator.h.rule;D:\[...]\root\my_build\CMakeFiles\9bd86ca81bcd9965b2b5447f4b8aa36f\EExecutionPolicy.hxx.rule;D:\[...]\root\my_build\CMakeFiles\33a44d741eb9778f36ec1b778c4b6045\RFieldFundamental.hxx.rule;D:\[...]\root\my_build\CMakeFiles\cfcbf6535a725e08f4191c957760709f\daos.h.rule;D:\[...]\root\my_build\CMakeFiles\d2e1239b1919d3968746a8ccba33e47b\RooClassFactory.h.rule;D:\[...]\root\my_build\CMakeFiles\6f5adf3f796e04f9cd9a1c9d3324e0bc\CodegenImpl.h.rule;D:\[...]\root\my_build\CMakeFiles\e73730d8fe6814293c85e2e539674c7a\MathFuncs.h.rule;D:\[...]\root\my_build\CMakeFiles\b5fe3d5787a3cc856610e0e54916b88d\LikelihoodGradientWrapper.h.rule;D:\[...]\root\my_build\CMakeFiles\d1587263dae00c4bdea16cb26d521dc7\JSONIO.h.rule;D:\[...]\root\my_build\CMakeFiles\e4a3c3f9f85505633818a623c5f8a24e\RooCatTypeLegacy.h.rule;D:\[...]\root\my_build\CMakeFiles\1f3441fb5606201852c959abf9cb5592\AsymptoticCalculator.h.rule;D:\[...]\root\my_build\CMakeFiles\ab6b69869bfa764f297cf7c809cd8f1b\Asimov.h.rule;D:\[...]\root\my_build\CMakeFiles\6129a60a34ef11d76c83cb623b2fcb34\HistFactoryImpl.h.rule;D:\[...]\root\my_build\CMakeFiles\d2e1239b1919d3968746a8ccba33e47b\TAttCanvas.h.rule;D:\[...]\root\my_build\CMakeFiles\5d77929a8b6c2565bc01de18885d2fc6\TF1Data.h.rule;D:\[...]\root\my_build\CMakeFiles\42de86a55f5c29ecd325dbb2e791083b\move_headers.rule;D:\[...]\root\CMakeLists.txt' exited with code 1. [D:\[...]\root\my_build\move_headers.vcxproj]
[...]

```

### Windows Server 2016: Headers List

Here is an excerpt of the list of the copied headers:

```powershell
    Directory: D:\[...]\root\my_build\include
Mode LastWriteTime Length Name                                                                  
---- ------------- ------ ----                                                                  
d----- 4/30/2025 4:58 PM Fit                                                                   
d----- 4/30/2025 4:58 PM Math                                                                  
d----- 4/30/2025 4:58 PM Minuit2                                                               
[...]                                                      
-a---- 4/30/2025 4:59 PM 2354 RooCachedPdf.h                                                        
-a---- 4/30/2025 4:59 PM 3251 RooCachedReal.h                                                       
-a---- 4/30/2025 4:59 PM 12129 RooCacheManager.h                                                     
-a---- 4/30/2025 4:59 PM 1585 RooCategoryProxy.h                                                    
-a---- 4/30/2025 4:59 PM 2788 RooCBShape.h                                                          
-a---- 4/30/2025 4:59 PM 10896 RooCFunction1Binding.h  

```

`RooCategory.h` seems to be missing.

### Windows 10: Success: Build & Headers Lists

On another machine (Windows 10), `move_headers` seems to have been successfully built. Here are the equivalent outputs:

```powershell
[...]
  Copy headers for C:/[...]/root/my_build/include/ 300
  Copy headers for C:/[...]/root/my_build/include/ 1000
  Copy headers for C:/[...]/root/my_build/include/ 800
  Copy headers for C:/[...]/root/my_build/include/ 400
  Copy headers for C:/[...]/root/my_build/include/Math/ 0
  Copy headers for C:/[...]/root/my_build/include/Math/ 100
[...]

```

```auto
    Répertoire : C:\[...]\my_build\include
Mode LastWriteTime Length Name                                                                 
---- ------------- ------ ----                                                                 
d----- 30/04/2025 16:59 Fit                                                                  
d----- 30/04/2025 16:59 Math                                                                 
d----- 30/04/2025 16:59 Minuit2                                                              
[...]                                                        
-a---- 30/04/2025 16:59 2354 RooCachedPdf.h                                                       
-a---- 30/04/2025 16:59 3251 RooCachedReal.h                                                      
-a---- 30/04/2025 16:59 12129 RooCacheManager.h                                                    
-a---- 30/04/2025 16:59 6139 RooCategory.h                                                        
-a---- 30/04/2025 16:59 1585 RooCategoryProxy.h                                                   
-a---- 30/04/2025 16:59 2788 RooCBShape.h                                                         
-a---- 30/04/2025 16:59 10896 RooCFunction1Binding.h     

```

Do you know where the issue may come from on Windows Server 2016 & how to solve it?

Best Regards,

---

<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:** [May 6, 2025, 2:45pm UTC](https://root-forum.cern.ch/t/43597-root-6-36-from-source-on-windows-server-2016-headers-copy-issue/63506/2 "2025-05-06T14:45:39Z")

</div>

Hi, we (at CERN) always build from Windows 10 & 11. We have no experience with Windows Server. One thing I can think of is maybe the PATH being too long (i.e. the full PATH of `D:/[...]/root/my_build/include/`)…

---

<div class="post-metadata">

**Author:** ![ferhue](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/ferhue/32/29462_2.png) [@ferhue](https://root-forum.cern.ch/u/ferhue)\
**Post date:** [May 6, 2025, 6:34pm UTC](https://root-forum.cern.ch/t/43597-root-6-36-from-source-on-windows-server-2016-headers-copy-issue/63506/3 "2025-05-06T18:34:40Z")

</div>

Other trick could be to reduce the number of headers copied at once, from 1000 to 100 or something like that.

---

<div class="post-metadata">

**Author:** ![Salomon](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/salomon/32/18000_2.png) [@Salomon](https://root-forum.cern.ch/u/Salomon)\
**Post date:** [May 7, 2025, 7:50am UTC](https://root-forum.cern.ch/t/43597-root-6-36-from-source-on-windows-server-2016-headers-copy-issue/63506/4 "2025-05-07T07:50:05Z")

</div>

Hello,

I changed the build directory from:

```powershell
-- Build files have been written to: D:/Users/[...]/prerequisites/root/my_build

```

to:

```powershell
-- Build files have been written to: D:/uranie-ci/prerequisites/root/my_build

```

And ROOT 6.36 was successfully built on Windows Server 2016:

```powershell
[...]
  -- Installing: D:/uranie-ci/builds/[...]/root/cmake/modules/FindVdt.cmake
  -- Installing: D:/uranie-ci/builds/[...]/root/etc/notebook/jupyter_notebook_config.py
  -- Installing: D:/uranie-ci/builds/[...]/root/etc/notebook/kernels/root/kernel.json

```

I feel a bit ashamed 😅

Thank you very much!
