[CEA 46921][Windows 10] roottest: execHistArray redefinition error (2)


ROOT Versions: 6.36.02, 6.36.04
Platform: win64 (Windows 10)
Compilers: MSVC 19.33.31630.0, 19.39.33521.0, 19.44.35209.0


Summary

This issue was first discussed in: [CEA 46220][Windows 10] roottest: execHistArray redefinition error

I installed your root_v6.36.04.win64.python311.vc17.zip package on Windows 10
and roottest: execHistArray failed with redefinition of '_CrtEnableIf<true, _Ty>' error.

Hypothesis

Could it be related to Visual Studio 2022 version (MSVC)?

Windows

Here is the OS of the target:

PS C:\Users\...\46921> Get-ComputerInfo OsName, OsVersion

OsName                          OsVersion
------                          ---------
Microsoft Windows 10 Entreprise 10.0.19045

Packages

Here is temporary link to download custom packages described below: FileSender

Your Package: MSVC 19.39 (v17.9)

The compiler of your root_v6.36.04.win64.python311.vc17.zip binary package is:

PS C:\Users\...\46921\downloads> .\root_v6.36.04.win64.python311.vc17\root\bin\root.exe -q -e "gSystem->GetBuildCompiler()"
   ------------------------------------------------------------------
  | Welcome to ROOT 6.36.04                        https://root.cern |
  | (c) 1995-2025, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for win64 on Aug 25 2025, 11:34:55                         |
  | From tags/v6-36-04@v6-36-04                                      |
  | With MSVC 19.39.33521.0                                          |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'  |
   ------------------------------------------------------------------


(const char *) "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe"
PS C:\Users\...\46921\downloads>

Custom Package 1: MSVC 19.33 (v17.3)

The compiler of root_v6.36.04.win64.python310.vc17.3.zip is:

PS C:\Users\...\46921\downloads> .\root_v6.36.04.win64.python310.vc17.3\outputs\root\bin\root.exe -q -e "gSystem->GetBuildCompiler()"
   ------------------------------------------------------------------
  | Welcome to ROOT 6.36.04                        https://root.cern |
  | (c) 1995-2025, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for win64 on Sep 13 2025, 14:28:29                         |
  | From tags/v6-36-04@v6-36-04                                      |
  | With MSVC 19.33.31630.0                                          |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'  |
   ------------------------------------------------------------------


(const char *) "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe"
PS C:\Users\...\46921\downloads>

Custom Package 2: MSVC 19.44 (v17.14)

The compiler of root_v6.36.02.win64.python310.vc17.14.zip is:

PS C:\Users\...\46921\downloads> .\root_v6.36.02.win64.python310.vc17.14\outputs\root\bin\root.exe -q -e "gSystem->GetBuildCompiler()"
   ------------------------------------------------------------------
  | Welcome to ROOT 6.36.02                        https://root.cern |
  | (c) 1995-2025, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for win64 on Jul 24 2025, 09:45:28                         |
  | From tags/v6-36-02@v6-36-02                                      |
  | With MSVC 19.44.35209.0                                          |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'  |
   ------------------------------------------------------------------


(const char *) "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe"
PS C:\Users\...\46921\downloads>

Tests

GitHub - root-project/roottest at v6-36-00-patches was cloned.

Test with your package: MSVC 19.39 (v17.9): KO

Loading:

**********************************************************************
** Visual Studio 2022 Developer PowerShell v17.3.6
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
PS C:\Users\...\repos> sl C:\Users\...\46921\downloads\
PS C:\Users\...\46921\downloads> .\root_v6.36.04.win64.python311.vc17\root\bin\thisroot.ps1

Configure:

PS C:\Users\...\46921\roottest\vc17> cmake ..
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
-- The C compiler identification is MSVC 19.33.31630.0
-- The CXX compiler identification is MSVC 19.33.31630.0
[...]

Test:

PS C:\Users\...\46921\roottest\vc17> ctest -C Release -R execHistArray -V
UpdateCTestConfiguration  from :C:/Users.../46921/roottest/vc17/DartConfiguration.tcl
Parse Config file:C:/Users.../46921/roottest/vc17/DartConfiguration.tcl
 Add coverage exclude regular expressions.
UpdateCTestConfiguration  from :C:/Users.../46921/roottest/vc17/DartConfiguration.tcl
Parse Config file:C:/Users.../46921/roottest/vc17/DartConfiguration.tcl
Test project C:/Users.../46921/roottest/vc17
Constructing a list of tests
Ignore test: roottest-cling-parsing-semicolon
Ignore test: roottest-root-rint-TabCom
Ignore test: roottest-root-rint-BackslashNewline
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 176
    Start 176: roottest-root-collection-execHistArray-auto

176: Test command: "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" "-DCMD=C:/Users.../46921/downloads/root_v6.36.04.win64.python311.vc17/root/bin/root.exe^-e^#define _CRT_SECURE_NO_WARNINGS^-e^#define _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING^-e^#define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING^-e^#define ClingWorkAroundMissingDynamicScope^-e^#define ClingWorkAroundUnnamedInclude^-e^#define ClingWorkAroundMissingSmartInclude^-e^#define ClingWorkAroundNoDotInclude^-e^#define ClingWorkAroundMissingAutoLoadingForTemplates^-e^#define ClingWorkAroundAutoParseUsingNamespace^-e^#define ClingWorkAroundTClassUpdateDouble32^-e^#define ClingWorkAroundAutoParseDeclaration^-e^#define ClingWorkAroundMissingUnloading^-e^#define ClingWorkAroundBrokenUnnamedReturn^-e^#define ClingWorkAroundUnnamedDetection2^-e^gSystem->SetBuildDir("C:/Users.../46921/roottest/vc17/root/collection",true)^-e^gSystem->AddDynamicPath("C:/Users.../46921/roottest/vc17/root/collection")^-e^gROOT->SetMacroPath("C:/Users.../46921/roottest/root/collection")^-e^gInterpreter->AddIncludePath("-IC:/Users.../46921/roottest/vc17/root/collection")^-e^gSystem->AddIncludePath("-IC:/Users.../46921/roottest/vc17/root/collection")^-q^-l^-b^C:/Users.../46921/roottest/root/collection/execHistArray.cxx" "-DOUT=C:/Users.../46921/roottest/vc17/root/collection/roottest-root-collection-execHistArray-auto.log" "-DOUTREF=C:/Users.../46921/roottest/root/collection/execHistArray.ref" "-DCWD=C:/Users.../46921/roottest/vc17/root/collection" "-DDIFFCMD=C:/Users/.../AppData/Local/Programs/Python/Python311/python.exe^C:/Users.../46921/roottest/scripts/custom_diff.py" "-DCHECKOUT=true" "-DCHECKERR=true" "-DSYS=C:/Users.../46921/downloads/root_v6.36.04.win64.python311.vc17/root" "-DENV=ROOTSYS=C:/Users.../46921/downloads/root_v6.36.04.win64.python311.vc17/root#PYTHONPATH=C:/Users.../46921/downloads/root_v6.36.04.win64.python311.vc17/root/bin" "-P" "C:/Users.../46921/downloads/root_v6.36.04.win64.python311.vc17/root/cmake/RootTestDriver.cmake"
176: Environment variables:
176:  ROOT_HIST=0
176: Test timeout computed to be: 300
176: -- TEST COMMAND --
176: cd C:/Users.../46921/roottest/vc17/root/collection
176: C:/Users.../46921/downloads/root_v6.36.04.win64.python311.vc17/root/bin/root.exe -e '#define _CRT_SECURE_NO_WARNINGS' -e '#define _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING' -e '#define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING' -e '#define ClingWorkAroundMissingDynamicScope' -e '#define ClingWorkAroundUnnamedInclude' -e '#define ClingWorkAroundMissingSmartInclude' -e '#define ClingWorkAroundNoDotInclude' -e '#define ClingWorkAroundMissingAutoLoadingForTemplates' -e '#define ClingWorkAroundAutoParseUsingNamespace' -e '#define ClingWorkAroundTClassUpdateDouble32' -e '#define ClingWorkAroundAutoParseDeclaration' -e '#define ClingWorkAroundMissingUnloading' -e '#define ClingWorkAroundBrokenUnnamedReturn' -e '#define ClingWorkAroundUnnamedDetection2' -e 'gSystem->SetBuildDir("C:/Users.../46921/roottest/vc17/root/collection",true)' -e 'gSystem->AddDynamicPath("C:/Users.../46921/roottest/vc17/root/collection")' -e 'gROOT->SetMacroPath("C:/Users.../46921/roottest/root/collection")' -e 'gInterpreter->AddIncludePath("-IC:/Users.../46921/roottest/vc17/root/collection")' -e 'gSystem->AddIncludePath("-IC:/Users.../46921/roottest/vc17/root/collection")' -q -l -b C:/Users.../46921/roottest/root/collection/execHistArray.cxx
176: -- BEGIN TEST OUTPUT --
176:
176: Processing C:/Users.../46921/roottest/root/collection/execHistArray.cxx...
176: In file included from input_line_27:1:
176: In file included from C:\Users\...\46921\roottest\root\collection\execHistArray.cxx:3:
176: In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\include\cassert:9:
176: In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\assert.h:12:
176: C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt.h:260:12: error: redefinition of '_CrtEnableIf<true, _Ty>'
176:     struct _CrtEnableIf<true, _Ty>
176:            ^~~~~~~~~~~~~~~~~~~~~~~
176: C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\corecrt.h:260:12: note: previous definition is here
176:     struct _CrtEnableIf<true, _Ty>
176:            ^
[...]
176: -- END TEST OUTPUT --
176: CMake Error at C:/Users.../46921/downloads/root_v6.36.04.win64.python311.vc17/root/cmake/RootTestDriver.cmake:186 (message):
176:   got exit code 1 but expected 0
176:
176:
1/1 Test #176: roottest-root-collection-execHistArray-auto ...***Failed    0.56 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   1.17 sec

The following tests FAILED:
        176 - roottest-root-collection-execHistArray-auto (Failed)
Errors while running CTest
Output from these tests are in: C:/Users.../46921/roottest/vc17/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
PS C:\Users\...\46921\roottest\vc17>

Test with custom package 1: MSVC 19.33 (v17.3): OK

Loading:

**********************************************************************
** Visual Studio 2022 Developer PowerShell v17.3.6
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
PS C:\Users\...\repos> sl C:\Users\...\46921\downloads\
PS C:\Users\...\46921\downloads> .\root_v6.36.04.win64.python310.vc17.3\outputs\root\bin\thisroot.ps1

Configure:

PS C:\Users\...\46921\roottest\vc17.3> cmake ..
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
-- The C compiler identification is MSVC 19.33.31630.0
-- The CXX compiler identification is MSVC 19.33.31630.0
[...]

Test:

PS C:\Users\...\46921\roottest\vc17.3> ctest -C Release -R execHistArray -V
UpdateCTestConfiguration  from :C:/Users.../46921/roottest/vc17.3/DartConfiguration.tcl
Parse Config file:C:/Users.../46921/roottest/vc17.3/DartConfiguration.tcl
 Add coverage exclude regular expressions.
UpdateCTestConfiguration  from :C:/Users.../46921/roottest/vc17.3/DartConfiguration.tcl
Parse Config file:C:/Users.../46921/roottest/vc17.3/DartConfiguration.tcl
Test project C:/Users.../46921/roottest/vc17.3
Constructing a list of tests
Ignore test: roottest-cling-parsing-semicolon
Ignore test: roottest-root-rint-TabCom
Ignore test: roottest-root-rint-BackslashNewline
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 176
    Start 176: roottest-root-collection-execHistArray-auto

176: Test command: "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" "-DCMD=C:/Users.../46921/downloads/root_v6.36.04.win64.python310.vc17.3/outputs/root/bin/root.exe^-e^#define _CRT_SECURE_NO_WARNINGS^-e^#define _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING^-e^#define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING^-e^#define ClingWorkAroundMissingDynamicScope^-e^#define ClingWorkAroundUnnamedInclude^-e^#define ClingWorkAroundMissingSmartInclude^-e^#define ClingWorkAroundNoDotInclude^-e^#define ClingWorkAroundMissingAutoLoadingForTemplates^-e^#define ClingWorkAroundAutoParseUsingNamespace^-e^#define ClingWorkAroundTClassUpdateDouble32^-e^#define ClingWorkAroundAutoParseDeclaration^-e^#define ClingWorkAroundMissingUnloading^-e^#define ClingWorkAroundBrokenUnnamedReturn^-e^#define ClingWorkAroundUnnamedDetection2^-e^gSystem->SetBuildDir("C:/Users.../46921/roottest/vc17.3/root/collection",true)^-e^gSystem->AddDynamicPath("C:/Users.../46921/roottest/vc17.3/root/collection")^-e^gROOT->SetMacroPath("C:/Users.../46921/roottest/root/collection")^-e^gInterpreter->AddIncludePath("-IC:/Users.../46921/roottest/vc17.3/root/collection")^-e^gSystem->AddIncludePath("-IC:/Users.../46921/roottest/vc17.3/root/collection")^-q^-l^-b^C:/Users.../46921/roottest/root/collection/execHistArray.cxx" "-DOUT=C:/Users.../46921/roottest/vc17.3/root/collection/roottest-root-collection-execHistArray-auto.log" "-DOUTREF=C:/Users.../46921/roottest/root/collection/execHistArray.ref" "-DCWD=C:/Users.../46921/roottest/vc17.3/root/collection" "-DDIFFCMD=C:/Users/.../AppData/Local/Programs/Python/Python311/python.exe^C:/Users.../46921/roottest/scripts/custom_diff.py" "-DCHECKOUT=true" "-DCHECKERR=true" "-DSYS=C:/Users.../46921/downloads/root_v6.36.04.win64.python310.vc17.3/outputs/root" "-DENV=ROOTSYS=C:/Users.../46921/downloads/root_v6.36.04.win64.python310.vc17.3/outputs/root#PYTHONPATH=C:/Users.../46921/downloads/root_v6.36.04.win64.python310.vc17.3/outputs/root/bin" "-P" "C:/Users.../46921/downloads/root_v6.36.04.win64.python310.vc17.3/outputs/root/cmake/RootTestDriver.cmake"
176: Environment variables:
176:  ROOT_HIST=0
176: Test timeout computed to be: 300
176: -- TEST COMMAND --
176: cd C:/Users.../46921/roottest/vc17.3/root/collection
176: C:/Users.../46921/downloads/root_v6.36.04.win64.python310.vc17.3/outputs/root/bin/root.exe -e '#define _CRT_SECURE_NO_WARNINGS' -e '#define _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING' -e '#define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING' -e '#define ClingWorkAroundMissingDynamicScope' -e '#define ClingWorkAroundUnnamedInclude' -e '#define ClingWorkAroundMissingSmartInclude' -e '#define ClingWorkAroundNoDotInclude' -e '#define ClingWorkAroundMissingAutoLoadingForTemplates' -e '#define ClingWorkAroundAutoParseUsingNamespace' -e '#define ClingWorkAroundTClassUpdateDouble32' -e '#define ClingWorkAroundAutoParseDeclaration' -e '#define ClingWorkAroundMissingUnloading' -e '#define ClingWorkAroundBrokenUnnamedReturn' -e '#define ClingWorkAroundUnnamedDetection2' -e 'gSystem->SetBuildDir("C:/Users.../46921/roottest/vc17.3/root/collection",true)' -e 'gSystem->AddDynamicPath("C:/Users.../46921/roottest/vc17.3/root/collection")' -e 'gROOT->SetMacroPath("C:/Users.../46921/roottest/root/collection")' -e 'gInterpreter->AddIncludePath("-IC:/Users.../46921/roottest/vc17.3/root/collection")' -e 'gSystem->AddIncludePath("-IC:/Users.../46921/roottest/vc17.3/root/collection")' -q -l -b C:/Users.../46921/roottest/root/collection/execHistArray.cxx
176: -- BEGIN TEST OUTPUT --
176:
176: Processing C:/Users.../46921/roottest/root/collection/execHistArray.cxx...
176: (int) 0
176:
176: -- END TEST OUTPUT --
1/1 Test #176: roottest-root-collection-execHistArray-auto ...   Passed    3.94 sec

The following tests passed:
        roottest-root-collection-execHistArray-auto

100% tests passed, 0 tests failed out of 1

Total Test time (real) =   4.57 sec
PS C:\Users\...\46921\roottest\vc17.3>

Request

Could you propose a solution to this problem?

Best regards,

Hello @Salomon,

usually, @bellenot should be able to help here, but we will have to wait a few weeks for him to return.