# Error building ROOT 6.26/10 on Win11 with VS17

**URL:** <https://root-forum.cern.ch/t/error-building-root-6-26-10-on-win11-with-vs17/52941>\
**Category:** ROOT\
**Tags:** build, root\
**Created:** [December 30, 2022, 7:08pm UTC](https://root-forum.cern.ch/t/error-building-root-6-26-10-on-win11-with-vs17/52941 "2022-12-30T19:08:54Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dor\_Miron](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dor_miron/32/31996_2.png) [@Dor\_Miron](https://root-forum.cern.ch/u/Dor_Miron)\
**Post date:** [December 30, 2022, 7:08pm UTC](https://root-forum.cern.ch/t/error-building-root-6-26-10-on-win11-with-vs17/52941/1 "2022-12-30T19:08:55Z")

</div>

_ROOT Version:_ 6.26/10  
_Platform:_ Windows 11  
_Compiler:_ Visual Studio 17.4.3

* * *

Hello,  
I want to build ROOT for python 3.10 so I’m following the “Building ROOT from source” instructions.

I have also installed and don’t know if relevant:  
Build tools with Windows 10 SDK and Windows 11 SDK  
Desktop development with C++ (C++ core desktop features)  
CMake 3.25.1

While performing the build stage,

> cmake --build . -j 3 --config Release --target install

after ~30 minutes I got an error (which was too long to copy paste here). So I tried to run the build again and here is the full output:

```auto
MSBuild version 17.4.1+9a89d02ff for .NET Framework
  GLEW.vcxproj -> C:\Users\dor00\ROOT\root_build\lib\libGLEW.lib
  ZLIB.vcxproj -> C:\Users\dor00\ROOT\root_build\lib\ZLIB.lib
  xxhash.vcxproj -> C:\Users\dor00\ROOT\root_build\lib\xxhash.lib
  lz4.vcxproj -> C:\Users\dor00\ROOT\root_build\lib\lz4.lib
  zstd.vcxproj -> C:\Users\dor00\ROOT\root_build\lib\zstd.lib
  Base.vcxproj -> C:\Users\dor00\ROOT\root_build\core\base\Base.dir\Release\Base.lib
  BaseTROOT.vcxproj -> C:\Users\dor00\ROOT\root_build\core\BaseTROOT.dir\Release\BaseTROOT.lib
  Clib.vcxproj -> C:\Users\dor00\ROOT\root_build\core\clib\Clib.dir\Release\Clib.lib
  obj.clang-tblgen.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\tools\clang\utils\TableGen\obj.clang-tblgen.dir\Release\obj.clang-tblgen.lib
  LLVMDemangle.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMDemangle.lib
  LLVMSupport.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMSupport.lib
  LLVMTableGen.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMTableGen.lib
  clang-tblgen.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\bin\clang-tblgen.exe
  obj.llvm-tblgen.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\utils\TableGen\obj.llvm-tblgen.dir\Release\obj.llvm-tblgen.lib
  llvm-tblgen.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\bin\llvm-tblgen.exe
  obj.clangSema.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\tools\clang\lib\Sema\obj.clangSema.dir\Release\obj.clangSema.lib
  clangSema.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\clangSema.lib
  obj.clingInterpreter.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\cling\lib\Interpreter\obj.clingInterpreter.dir\Release\obj.clingInterpreter.lib
  clingInterpreter.vcxproj -> C:\Users\dor00\ROOT\root_build\lib\clingInterpreter.lib
  obj.clingMetaProcessor.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\cling\lib\MetaProcessor\obj.clingMetaProcessor.dir\Release\obj.clingMetaProcessor.lib
  clingMetaProcessor.vcxproj -> C:\Users\dor00\ROOT\root_build\lib\clingMetaProcessor.lib
  obj.clingUtils.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\cling\lib\Utils\obj.clingUtils.dir\Release\obj.clingUtils.lib
  clingUtils.vcxproj -> C:\Users\dor00\ROOT\root_build\lib\clingUtils.lib
  ClingUtils.vcxproj -> C:\Users\dor00\ROOT\root_build\core\clingutils\ClingUtils.dir\Release\ClingUtils.lib
  Cont.vcxproj -> C:\Users\dor00\ROOT\root_build\core\cont\Cont.dir\Release\Cont.lib
  Dictgen.vcxproj -> C:\Users\dor00\ROOT\root_build\core\dictgen\Dictgen.dir\Release\Dictgen.lib
  Foundation.vcxproj -> C:\Users\dor00\ROOT\root_build\core\foundation\Foundation.dir\Release\Foundation.lib
  Foundation_Stage1.vcxproj -> C:\Users\dor00\ROOT\root_build\core\foundation\Foundation_Stage1.dir\Release\Foundation_Stage1.lib
  LLVMAggressiveInstCombine.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMAggressiveInstCombine.lib
  LLVMAnalysis.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMAnalysis.lib
  LLVMAsmParser.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMAsmParser.lib
  LLVMAsmPrinter.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMAsmPrinter.lib
  LLVMBinaryFormat.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMBinaryFormat.lib
  LLVMBitReader.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMBitReader.lib
  LLVMBitWriter.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMBitWriter.lib
  LLVMBitstreamReader.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMBitstreamReader.lib
  LLVMCodeGen.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMCodeGen.lib
  LLVMCore.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMCore.lib
  LLVMCoroutines.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMCoroutines.lib
  LLVMCoverage.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMCoverage.lib
  LLVMDebugInfoCodeView.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMDebugInfoCodeView.lib
  LLVMDebugInfoDWARF.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMDebugInfoDWARF.lib
  LLVMDebugInfoMSF.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMDebugInfoMSF.lib
  LLVMExecutionEngine.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMExecutionEngine.lib
  LLVMGlobalISel.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMGlobalISel.lib
  LLVMIRReader.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMIRReader.lib
  LLVMInstCombine.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMInstCombine.lib
  LLVMInstrumentation.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMInstrumentation.lib
  LLVMJITLink.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMJITLink.lib
  LLVMLTO.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMLTO.lib
  LLVMLinker.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMLinker.lib
  LLVMMC.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMMC.lib
  LLVMMCDisassembler.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMMCDisassembler.lib
  LLVMMCParser.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMMCParser.lib
  LLVMNVPTXCodeGen.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMNVPTXCodeGen.lib
  LLVMNVPTXDesc.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMNVPTXDesc.lib
  LLVMNVPTXInfo.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMNVPTXInfo.lib
  LLVMObjCARCOpts.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMObjCARCOpts.lib
  LLVMObject.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMObject.lib
  LLVMOption.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMOption.lib
  LLVMPasses.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMPasses.lib
  LLVMProfileData.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMProfileData.lib
  LLVMRemarks.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMRemarks.lib
  LLVMScalarOpts.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMScalarOpts.lib
  LLVMTarget.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMTarget.lib
  LLVMTransformUtils.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMTransformUtils.lib
  LLVMVectorize.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMVectorize.lib
  LLVMipo.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMipo.lib
  LLVMOrcJIT.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMOrcJIT.lib
  LLVMRuntimeDyld.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMRuntimeDyld.lib
  LLVMSelectionDAG.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMSelectionDAG.lib
  LLVMX86AsmParser.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMX86AsmParser.lib
  LLVMX86CodeGen.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMX86CodeGen.lib
  LLVMX86Desc.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMX86Desc.lib
  LLVMX86Disassembler.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMX86Disassembler.lib
  LLVMX86Info.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMX86Info.lib
  LLVMX86Utils.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\LLVMX86Utils.lib
  obj.clangAST.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\tools\clang\lib\AST\obj.clangAST.dir\Release\obj.clangAST.lib
  clangAST.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\clangAST.lib
  obj.clangASTMatchers.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\tools\clang\lib\ASTMatchers\obj.clangASTMatchers.dir\Release\obj.clangASTMatchers.lib
  clangASTMatchers.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\clangASTMatchers.lib
  obj.clangAnalysis.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\tools\clang\lib\Analysis\obj.clangAnalysis.dir\Release\obj.clangAnalysis.lib
  clangAnalysis.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\clangAnalysis.lib
  obj.clangBasic.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\tools\clang\lib\Basic\obj.clangBasic.dir\Release\obj.clangBasic.lib
  clangBasic.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\clangBasic.lib
  obj.clangCodeGen.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\tools\clang\lib\CodeGen\obj.clangCodeGen.dir\Release\obj.clangCodeGen.lib
  clangCodeGen.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\clangCodeGen.lib
  obj.clangDriver.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\tools\clang\lib\Driver\obj.clangDriver.dir\Release\obj.clangDriver.lib
  clangDriver.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\clangDriver.lib
  obj.clangEdit.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\tools\clang\lib\Edit\obj.clangEdit.dir\Release\obj.clangEdit.lib
  clangEdit.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\clangEdit.lib
  obj.clangFrontend.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\tools\clang\lib\Frontend\obj.clangFrontend.dir\Release\obj.clangFrontend.lib
  clangFrontend.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\clangFrontend.lib
  obj.clangLex.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\tools\clang\lib\Lex\obj.clangLex.dir\Release\obj.clangLex.lib
  clangLex.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\clangLex.lib
  obj.clangParse.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\tools\clang\lib\Parse\obj.clangParse.dir\Release\obj.clangParse.lib
  clangParse.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\clangParse.lib
  obj.clangRewrite.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\tools\clang\lib\Rewrite\obj.clangRewrite.dir\Release\obj.clangRewrite.lib
  clangRewrite.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\clangRewrite.lib
  obj.clangRewriteFrontend.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\tools\clang\lib\Frontend\Rewrite\obj.clangRewriteFrontend.dir\Release\obj.clangRewriteFrontend.lib
  clangRewriteFrontend.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\clangRewriteFrontend.lib
  obj.clangSerialization.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\tools\clang\lib\Serialization\obj.clangSerialization.dir\Release\obj.clangSerialization.lib
  clangSerialization.vcxproj -> C:\Users\dor00\ROOT\root_build\interpreter\llvm\src\Release\lib\clangSerialization.lib
  rootcling_stage1.vcxproj -> C:\Users\dor00\ROOT\root_build\bin\rootcling_stage1.exe
  Generating G__Core.cxx, ../bin/libCore.rootmap
  In file included from input_line_3:2:
  In file included from C:/Users/dor00/ROOT/root_build/include\Rtypes.h:191:
  In file included from C:/Users/dor00/ROOT/root_build/include/TGenericClassInfo.h:21:
  In file included from C:/Users/dor00/ROOT/root_build/include/TSchemaHelper.h:17:
  In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\string:11:
  In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\xstring:14:
  In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\xmemory:16:
  In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\xutility:12:
  In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\__msvc_iter_core.hpp:11:
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\utility(151,9): error G0CCF13F0: expected member name or ';' after declaration specifiers [C:\Users\dor00\ROOT\root_build\core\G__Core.vcxproj]
          !conjunction_v<_Is_implicitly_default_constructible<_Uty1>, _Is_implicitly_default_constructible<_Uty2>>)
          ^
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\utility(151,9): error G65037BDE: expected ')' [C:\Users\dor00\ROOT\root_build\core\G__Core.vcxproj]
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\utility:150:23: note: to match this '('
      constexpr explicit(
                        ^
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\utility(190,24): error G0CCF13F0: expected member name or ';' after declaration specifiers [C:\Users\dor00\ROOT\root_build\core\G__Core.vcxproj]
      constexpr explicit(!conjunction_v<is_convertible<const _Other1&, _Ty1>, is_convertible<const _Other2&, _Ty2>>)
      ~~~~~~~~~~~~~~~~~~ ^
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\utility(190,24): error G65037BDE: expected ')' [C:\Users\dor00\ROOT\root_build\core\G__Core.vcxproj]
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\utility:190:23: note: to match this '('
      constexpr explicit(!conjunction_v<is_convertible<const _Other1&, _Ty1>, is_convertible<const _Other2&, _Ty2>>)
                        ^
  In file included from input_line_3:2:
  In file included from C:/Users/dor00/ROOT/root_build/include\Rtypes.h:191:
  In file included from C:/Users/dor00/ROOT/root_build/include/TGenericClassInfo.h:21:
  In file included from C:/Users/dor00/ROOT/root_build/include/TSchemaHelper.h:17:
  In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\string:11:
  In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\xstring:17:
  In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\xpolymorphic_allocator.h:11:
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\tuple(268,9): error G0CCF13F0: expected member name or ';' after declaration specifiers [C:\Users\dor00\ROOT\root_build\core\G__Core.vcxproj]
          !conjunction_v<_Is_implicitly_default_constructible<_This2>, _Is_implicitly_default_constructible<_Rest>...>)
          ^
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\tuple(268,9): error G65037BDE: expected ')' [C:\Users\dor00\ROOT\root_build\core\G__Core.vcxproj]
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\tuple:267:23: note: to match this '('
      constexpr explicit(
                        ^
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\tuple(302,5): error G65F5AB49: non-static data member cannot be constexpr; did you intend to make it const? [C:\Users\dor00\ROOT\root_build\core\
G__Core.vcxproj]
      constexpr explicit(_Tuple_conditional_explicit_v<tuple, const _Other&...>)
      ^
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\tuple(302,24): error G417914D0: member '_Tuple_conditional_explicit_v' declared as a template [C:\Users\dor00\ROOT\root_build\core\G__Core.vcxpro
j]
      constexpr explicit(_Tuple_conditional_explicit_v<tuple, const _Other&...>)
                         ^
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\tuple(302,79): error G65037BDE: expected ';' at end of declaration list [C:\Users\dor00\ROOT\root_build\core\G__Core.vcxproj]
      constexpr explicit(_Tuple_conditional_explicit_v<tuple, const _Other&...>)
                                                                                ^
CUSTOMBUILD : error : Error loading the default rootcling header files. [C:\Users\dor00\ROOT\root_build\core\G__Core.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(247,5): error MSB8066: Custom build for 'C:\Users\dor00\ROOT\root_build\CMakeFiles\aa89f3a5004a047134a1cf453905fe41\G__Core.cx
x.rule' exited with code 1. [C:\Users\dor00\ROOT\root_build\core\G__Core.vcxproj]
  GuiCore.vcxproj -> C:\Users\dor00\ROOT\root_build\core\gui\GuiCore.dir\Release\GuiCore.lib
  Lz4.vcxproj -> C:\Users\dor00\ROOT\root_build\core\lz4\Lz4.dir\Release\Lz4.lib
  Lzma.vcxproj -> C:\Users\dor00\ROOT\root_build\core\lzma\Lzma.dir\Release\Lzma.lib
  Meta.vcxproj -> C:\Users\dor00\ROOT\root_build\core\meta\Meta.dir\Release\Meta.lib
  TextInput.vcxproj -> C:\Users\dor00\ROOT\root_build\core\textinput\TextInput.dir\Release\TextInput.lib
  Winnt.vcxproj -> C:\Users\dor00\ROOT\root_build\core\winnt\Winnt.dir\Release\Winnt.lib
  Zip.vcxproj -> C:\Users\dor00\ROOT\root_build\core\zip\Zip.dir\Release\Zip.lib
  Zstd.vcxproj -> C:\Users\dor00\ROOT\root_build\core\zstd\Zstd.dir\Release\Zstd.lib
  MetaCling.vcxproj -> C:\Users\dor00\ROOT\root_build\core\metacling\src\MetaCling.dir\Release\MetaCling.lib
  RootPcmObjs.vcxproj -> C:\Users\dor00\ROOT\root_build\io\rootpcm\RootPcmObjs.dir\Release\RootPcmObjs.lib

```

Thanks for any help.

---

<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:** [December 30, 2022, 8:18pm UTC](https://root-forum.cern.ch/t/error-building-root-6-26-10-on-win11-with-vs17/52941/2 "2022-12-30T20:18:22Z")

</div>

Welcome to the ROOT Forum!  
See:

> [@Install ROOT v6.26 from source on Windows 11 does not populate install dir](https://root-forum.cern.ch/t/install-root-v6-26-from-source-on-windows-11-does-not-populate-install-dir/52784/5):
>
> OK, now I see what the issue is.This is an incompatibility between Visual Studio v17.4 and LLVM 9.0. To solve this, you have to either build the master branch (from github, see [Building ROOT from source - ROOT](https://root.cern/install/build_from_source/)) or wait for ROOT v6.28/00, which will come early next year. And note you can also take a [pre-built binary](https://root.cern/download/nightly/?C=M;O=D)

---

<div class="post-metadata">

**Author:** ![Dor\_Miron](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dor_miron/32/31996_2.png) [@Dor\_Miron](https://root-forum.cern.ch/u/Dor_Miron)\
**Post date:** [December 30, 2022, 8:58pm UTC](https://root-forum.cern.ch/t/error-building-root-6-26-10-on-win11-with-vs17/52941/3 "2022-12-30T20:58:32Z")

</div>

bellenot, Thank you for your answer.  
To avoid bugs and unexpected behavior in a pre-release version (master branch) perhaps it would be better if I install a VS version compatible to LLVM.

1. Do you happen to know what version can I use?
2. Is my concern legitimate?

Thank you.

---

<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:** [December 30, 2022, 9:03pm UTC](https://root-forum.cern.ch/t/error-building-root-6-26-10-on-win11-with-vs17/52941/4 "2022-12-30T21:03:59Z")

</div>

For versions of ROOT before v6.28/00, any version of Visual Studio anterior to v17.4  
And for clarity, please reply to the original topic (I moved it) 😉

---

<div class="post-metadata">

**Author:** ![Dor\_Miron](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dor_miron/32/31996_2.png) [@Dor\_Miron](https://root-forum.cern.ch/u/Dor_Miron)\
**Post date:** [December 31, 2022, 8:58am UTC](https://root-forum.cern.ch/t/error-building-root-6-26-10-on-win11-with-vs17/52941/5 "2022-12-31T08:58:17Z")

</div>

So I did a checkout to branch master, deleted everything in the last build directory and tried to redo the steps described in “Building ROOT from source”

> cmake -G"Visual Studio 17 2022" -A x64 -Thost=x64 -DPython3\_ROOT\_DIR=C:/Users/dor00/AppData/Local/Programs/Python/Python310 -DCMAKE\_INSTALL\_PREFIX=…/root\_install …/root\_src

And then:

> cmake --build . -j=3 --config Release --target install

I now get a different error and the build took longer until the error showed up, so it seems like the last problem was solved.

Note that I am trying to install a 64 bit version and I’m not sure why the folder “Program Files (x86)” is shown for windows kits.  
Also, I am using windows 11 and the windows kits folder shows something about windows 10.

This is my new error:

```auto
  mathtext.vcxproj -> C:\Users\dor00\ROOT\root_build\lib\mathtext.lib
  Auto build dll exports
  ROOTBrowsable.vcxproj -> C:\Users\dor00\ROOT\root_build\bin\libROOTBrowsable.dll
  Auto build dll exports
  Graf.vcxproj -> C:\Users\dor00\ROOT\root_build\bin\libGraf.dll
  G __ASImage.vcxproj -> C:\Users\dor00\ROOT\root_build\graf2d\asimage\G__ ASImage.dir\Release\G__ASImage.lib
  G __Postscript.vcxproj -> C:\Users\dor00\ROOT\root_build\graf2d\postscript\G__ Postscript.dir\Release\G__Postscript.lib
  G __Html.vcxproj -> C:\Users\dor00\ROOT\root_build\html\G__ Html.dir\Release\G__Html.lib
  G __Minuit.vcxproj -> C:\Users\dor00\ROOT\root_build\math\minuit\G__ Minuit.dir\Release\G__Minuit.lib
  Auto build dll exports
  Minuit.vcxproj -> C:\Users\dor00\ROOT\root_build\bin\libMinuit.dll
  In file included from input_line_9:3:
  In file included from C:/Users/dor00/ROOT/root_build/include\TMySQLResult.h:17:
  In file included from C:/Program Files/MySQL/MySQL Server 8.0/include\mysql.h:58:
  In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\windows.h:208:
  In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\winscard.h:30:
  In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\shared\wtypes.h:22:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\shared/rpcndr.h(192,9): error G523BCDD8: reference to 'byte' is ambiguous [C:\Users\dor00\ROOT\root_build\sql\mysql\G__RMySQL.vcxproj]
  typedef byte cs_byte;
          ^
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\shared/rpcndr.h:191:23: note: candidate found by name lookup is 'byte'
  typedef unsigned char byte;
                        ^
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\cstddef:28:12: note: candidate found by name lookup is 'std::byte'
  enum class byte : unsigned char {};
             ^
  In file included from input_line_9:3:
  In file included from C:/Users/dor00/ROOT/root_build/include\TMySQLResult.h:17:
  In file included from C:/Program Files/MySQL/MySQL Server 8.0/include\mysql.h:58:
  In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\windows.h:208:
  In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\winscard.h:30:
  In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\shared\wtypes.h:22:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\shared/rpcndr.h(962,6): error G523BCDD8: reference to 'byte' is ambiguous [C:\Users\dor00\ROOT\root_build\sql\mysql\G__RMySQL.vcxproj]
       byte * pNetworkData,
       ^
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\shared/rpcndr.h:191:23: note: candidate found by name lookup is 'byte'
  typedef unsigned char byte;
                        ^
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\cstddef:28:12: note: candidate found by name lookup is 'std::byte'
  enum class byte : unsigned char {};
             ^
  In file included from input_line_9:3:
  In file included from C:/Users/dor00/ROOT/root_build/include\TMySQLResult.h:17:
  In file included from C:/Program Files/MySQL/MySQL Server 8.0/include\mysql.h:58:
  In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\windows.h:208:
  In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\winscard.h:30:
  In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\shared\wtypes.h:22:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\shared/rpcndr.h(970,6): error G523BCDD8: reference to 'byte' is ambiguous [C:\Users\dor00\ROOT\root_build\sql\mysql\G__RMySQL.vcxproj]
       byte * pNetworkData,
       ^
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\shared/rpcndr.h:191:23: note: candidate found by name lookup is 'byte'
  typedef unsigned char byte;
                        ^
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\cstddef:28:12: note: candidate found by name lookup is 'std::byte'
  enum class byte : unsigned char {};
             ^
  In file included from input_line_9:3:
  In file included from C:/Users/dor00/ROOT/root_build/include\TMySQLResult.h:17:
  In file included from C:/Program Files/MySQL/MySQL Server 8.0/include\mysql.h:58:
  In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\windows.h:208:
  In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\winscard.h:30:
  In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\shared\wtypes.h:47:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\shared/wtypesbase.h(447,21): error G523BCDD8: reference to 'byte' is ambiguous [C:\Users\dor00\ROOT\root_build\sql\mysql\G__RMySQL.vcxproj]
      /* [size_is] */ byte abData[1];
                      ^
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\shared/rpcndr.h:191:23: note: candidate found by name lookup is 'byte'
  typedef unsigned char byte;
                        ^
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\cstddef:28:12: note: candidate found by name lookup is 'std::byte'
  enum class byte : unsigned char {};
             ^
  In file included from input_line_9:3:
  In file included from C:/Users/dor00/ROOT/root_build/include\TMySQLResult.h:17:
  In file included from C:/Program Files/MySQL/MySQL Server 8.0/include\mysql.h:58:
  In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\windows.h:208:
  In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\winscard.h:30:
  In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\shared\wtypes.h:47:

```

I cut the output a bit from before and after the first error, but it just keep going like this for a dozen similar errors.

---

<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:** [December 31, 2022, 9:31am UTC](https://root-forum.cern.ch/t/error-building-root-6-26-10-on-win11-with-vs17/52941/6 "2022-12-31T09:31:35Z")

</div>

I’ll have to try after the Holidays break. Note that I can’t try on Windows 11…

---

<div class="post-metadata">

**Author:** ![Dor\_Miron](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dor_miron/32/31996_2.png) [@Dor\_Miron](https://root-forum.cern.ch/u/Dor_Miron)\
**Post date:** [January 2, 2023, 3:43pm UTC](https://root-forum.cern.ch/t/error-building-root-6-26-10-on-win11-with-vs17/52941/7 "2023-01-02T15:43:47Z")

</div>

Sharing my problem with ChatGPT gave the following result:

```auto
It looks like the error you are seeing is related to a conflict between two definitions of the type `byte`.
The first definition is provided by the Windows header files and is an alias for the type `unsigned char`,
while the second definition is provided by the C++ Standard Library header `cstddef` and is an
enumeration type with a single enumerator called `byte`.

One possible solution to this issue is to include the C++ Standard Library header `cstddef` before any
of the Windows header files in the source file where you are seeing the error. This will ensure that the
`std::byte` type is defined before the Windows header files are included, and should resolve the
ambiguity between the two definitions of `byte`.

Alternatively, you could try to modify the build settings for the project to include the C++ Standard
Library header `cstddef` before any of the Windows header files. This can often be done by setting the
appropriate preprocessor defines or include paths in the project settings.

```

Hope I’m not too naive and that it might help 😃

---

<div class="post-metadata">

**Author:** ![Dor\_Miron](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dor_miron/32/31996_2.png) [@Dor\_Miron](https://root-forum.cern.ch/u/Dor_Miron)\
**Post date:** [January 7, 2023, 3:19pm UTC](https://root-forum.cern.ch/t/error-building-root-6-26-10-on-win11-with-vs17/52941/8 "2023-01-07T15:19:41Z")

</div>

Is there possibly any suggestion as to what I should do?

---

<div class="post-metadata">

**Author:** ![Dor\_Miron](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dor_miron/32/31996_2.png) [@Dor\_Miron](https://root-forum.cern.ch/u/Dor_Miron)\
**Post date:** [January 8, 2023, 12:01pm UTC](https://root-forum.cern.ch/t/error-building-root-6-26-10-on-win11-with-vs17/52941/9 "2023-01-08T12:01:58Z")

</div>

Update:  
Tried to use Windows 11 SDK 10.0.22621.0 instead of 10.0.22000.0.  
Got the same result, several errors with “reference to  
‘byte’ is ambiguous”.

---

<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:** [January 9, 2023, 9:30am UTC](https://root-forum.cern.ch/t/error-building-root-6-26-10-on-win11-with-vs17/52941/10 "2023-01-09T09:30:57Z")

</div>

Hi, sorry for the delay, I will investigate this week and will come back to you

---

<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:** [January 11, 2023, 8:12pm UTC](https://root-forum.cern.ch/t/error-building-root-6-26-10-on-win11-with-vs17/52941/11 "2023-01-11T20:12:24Z")

</div>

So FYI, I managed to build ROOT master with VS 2022 v17.4.4 and Windows 11 SDK version 10.0.22000.0 without any problem.  
And as I can see in the errors you got:

```auto
  In file included from C:/Users/dor00/ROOT/root_build/include\TMySQLResult.h:17:
  In file included from C:/Program Files/MySQL/MySQL Server 8.0/include\mysql.h:58:
  In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\windows.h:208:
  In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\um\winscard.h:30:
  In file included from C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\shared\wtypes.h:22:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\shared/rpcndr.h(192,9): error G523BCDD8: reference to 'byte' is ambiguous [C:\Users\dor00\ROOT\root_build\sql\mysql\G__RMySQL.vcxproj]
  typedef byte cs_byte;
          ^
  C:\Program Files (x86)\Windows Kits\10\Include\10.0.22000.0\shared/rpcndr.h:191:23: note: candidate found by name lookup is 'byte'
  typedef unsigned char byte;
                        ^
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\\include\cstddef:28:12: note: candidate found by name lookup is 'std::byte'
  enum class byte : unsigned char {};
             ^

```

They are coming from MySQL (`mysql.h`), so please disable mysql (`-Dmysql=OFF`) which has not been tested on Windows, and build again.

---

<div class="post-metadata">

**Author:** ![Dor\_Miron](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dor_miron/32/31996_2.png) [@Dor\_Miron](https://root-forum.cern.ch/u/Dor_Miron)\
**Post date:** [January 12, 2023, 9:34am UTC](https://root-forum.cern.ch/t/error-building-root-6-26-10-on-win11-with-vs17/52941/12 "2023-01-12T09:34:46Z")

</div>

bellenot you king It worked!  
Now I get my install directory filled up until a new error comes up ☹

```auto
  -- Up-to-date: C:/Users/dor00/ROOT/root_install/include/RooStats/HistFactory/PreprocessFunction.h
  -- Up-to-date: C:/Users/dor00/ROOT/root_install/include/RooStats/HistFactory/RooBarlowBeestonLL.h
  -- Up-to-date: C:/Users/dor00/ROOT/root_install/include/RooStats/HistFactory/Sample.h
  -- Up-to-date: C:/Users/dor00/ROOT/root_install/include/RooStats/HistFactory/Systematics.h

  CMake Error at roofit/histfactory/cmake_install.cmake:77 (file):
    file INSTALL cannot find
    "C:/Users/dor00/ROOT/root_build_sdk22000/bin/prepareHistFactory": No error.
  Call Stack (most recent call first):
    roofit/cmake_install.cmake:62 (include)
    cmake_install.cmake:193 (include)

C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): e
rror MSB3073: The command "setlocal [C:\Users\dor00\ROOT\root_build_sdk22000\install.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): e
rror MSB3073: "C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=Release -P cmake_install.cmake [C:\Users\dor00\ROOT\r
oot_build_sdk22000\install.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): e
rror MSB3073: if %errorlevel% neq 0 goto :cmEnd [C:\Users\dor00\ROOT\root_build_sdk22000\install.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): e
rror MSB3073: :cmEnd [C:\Users\dor00\ROOT\root_build_sdk22000\install.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): e
rror MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone [C:\Users\dor00\ROOT\root_build_sdk22000\instal
l.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): e
rror MSB3073: :cmErrorLevel [C:\Users\dor00\ROOT\root_build_sdk22000\install.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): e
rror MSB3073: exit /b %1 [C:\Users\dor00\ROOT\root_build_sdk22000\install.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): e
rror MSB3073: :cmDone [C:\Users\dor00\ROOT\root_build_sdk22000\install.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): e
rror MSB3073: if %errorlevel% neq 0 goto :VCEnd [C:\Users\dor00\ROOT\root_build_sdk22000\install.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(159,5): e
rror MSB3073: :VCEnd" exited with code 1. [C:\Users\dor00\ROOT\root_build_sdk22000\install.vcxproj]

```

I have installed:

- CMake 3.25.1 (with the GUI app)
- C++ CMake tools for windows as an individual component in VS17.4.3 community 2022.
- Visual studio build tools…

It seems like I do have the file mentioned in the error:

> C:/Users/dor00/ROOT/root\_build\_sdk22000/bin/prepareHistFactory.bat

And a strange thing is that all files were seemed to be last modified during the build, except this file which was last modified 13 days ago when I published my last question. I’m pretty sure I deleted the entire directory before the build today so I can only assume it is copied from the master branch?

Thank you again for your help!

---

<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:** [January 12, 2023, 9:46am UTC](https://root-forum.cern.ch/t/error-building-root-6-26-10-on-win11-with-vs17/52941/13 "2023-01-12T09:46:33Z")

</div>

Oh you’re right! I’ll fix this. Thanks for reporting it!  
And you’re very welcome!

---

<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:** [January 12, 2023, 1:00pm UTC](https://root-forum.cern.ch/t/error-building-root-6-26-10-on-win11-with-vs17/52941/14 "2023-01-12T13:00:55Z")

</div>

This is now fixed in master by the [commit #71854014](https://github.com/root-project/root/commit/71854014f21be40072fa1a583d41b1b5e19d2e5a). Thanks for reporting the issue!

---

<div class="post-metadata">

**Author:** ![Dor\_Miron](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dor_miron/32/31996_2.png) [@Dor\_Miron](https://root-forum.cern.ch/u/Dor_Miron)\
**Post date:** [January 14, 2023, 12:51pm UTC](https://root-forum.cern.ch/t/error-building-root-6-26-10-on-win11-with-vs17/52941/15 "2023-01-14T12:51:05Z")

</div>

Amazing! the new build has finished, the install directory has filled and I can finally run ROOT from the VS command prompt.  
My new problem (and hopefully the final one 😃) is that I can’t run pyroot.  
I added my \bin to the PYTHONPATH and can:

> import ROOT

But I get the following error:

```auto
input_line_1:1:10: fatal error: 'new' file not found
#include <new>
         ^ ~~~~
Assertion failed: OldBuilder->DeferredDeclsToEmit.empty() && "Should have emitted all decls deferred to emit.",
file C:\Users\dor00\ROOT\root_src\interpreter\llvm\src\tools\clang\lib\CodeGen\ModuleBuilder.cpp, line 155

```

Which is identical to the error I get trying to run root from **cmd** , so perhaps solving this will solve my pyroot problem as well…?  
From what I understand the only difference from VS command prompt and cmd is environment variables? Any idea as to what could be the problem?

A bit more information:

- Trying to install ROOT from the binary gave me the same error, which is one of the reasons I tried to build ROOT from source in the first place seeing [this](https://root-forum.cern.ch/t/run-root-6-19-02-on-windows-10/38529).
- To rule out different SDK versions, I can say that the only SDK version installed is 10.0.22000.0

---

<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:** [January 15, 2023, 11:57am UTC](https://root-forum.cern.ch/t/error-building-root-6-26-10-on-win11-with-vs17/52941/16 "2023-01-15T11:57:15Z")

</div>

Did you start Python from the regular command prompt? You must also start Python from a VS command prompt, or call `"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"` (for 64 bit) or `"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars32.bat"` (for 32 bit) before starting Python

---

<div class="post-metadata">

**Author:** ![Dor\_Miron](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dor_miron/32/31996_2.png) [@Dor\_Miron](https://root-forum.cern.ch/u/Dor_Miron)\
**Post date:** [January 15, 2023, 1:27pm UTC](https://root-forum.cern.ch/t/error-building-root-6-26-10-on-win11-with-vs17/52941/17 "2023-01-15T13:27:32Z")

</div>

So root isn’t supposed to work from regular cmd?  
I am using PyCharm, do I need to figure out a way for PyCharm’s default shell to be the VS one?

---

<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:** [January 15, 2023, 4:06pm UTC](https://root-forum.cern.ch/t/error-building-root-6-26-10-on-win11-with-vs17/52941/18 "2023-01-15T16:06:29Z")

</div>

> [@Dor\_Miron](#):
>
> So root isn’t supposed to work from regular cmd?

Yes, if you call `"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"` (for 64 bit) or `"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars32.bat"` (for 32 bit) to properly set the environment variables before calling root or Python or whatever is using ROOT

---

<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:** [January 29, 2023, 4:07pm UTC](https://root-forum.cern.ch/t/error-building-root-6-26-10-on-win11-with-vs17/52941/19 "2023-01-29T16:07:24Z")

</div>

Closed on January 29, 2023, 4:07pm UTC

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