Install directory is empty after building from source on Windows 11

Hi all,

As in the title, after following the instructions on building from source on Windows, the target install directory is empty.

I am compiling from source so that I can compile a Geant4 project (using v11.0 which uses C++17) that has ROOT dependencies in order to write output to ROOT file. When using the precompiled binary, I was receiving an error that the C++ standards did not match with ROOT.

I am using the Visual Studio 2022 Developer Command Prompt v17.4.4, where I run the following cmake commands from the build directory:

 cmake -G"Visual Studio 17 2022" -A x64 -Thost=x64 -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=../install C:\Users\naido\Downloads\root-6.28.00

This prints what appears to be appropriate output at the end of execution:

System          Windows-10.0.22621
Processor       14 core 2688 MHz GenuineIntel Pentium III (0.18 micron) With 1 Or 2 MB On-Die L2 Cache  (AMD64)
Build type
Install path    C:/Users/naido/Documents/Software/root_v6-28-00/install
Compiler        MSVC 19.34.31937.0
Compiler flags:
C               -nologo -IC:/Users/naido/Downloads/root-6.28.00/build/win -FIw32pragma.h -FIsehmap.h -MD -EHsc- -W3 -D_WIN32 -wd4267 -D_WIN64 -DNOMINMAX
C++             -nologo -IC:/Users/naido/Downloads/root-6.28.00/build/win -FIw32pragma.h -FIsehmap.h -Zc:__cplusplus -std:c++17 -MD -GR -EHsc- -W3 -wd4141 -wd4291 -wd4244 -wd4049 -wd4146 -D_WIN32 -wd4267 -D_WIN64 -D_XKEYCHECK_H -DNOMINMAX -D_CRT_SECURE_NO_WARNINGS -D_SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING -D_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
Linker flags:
Executable      /machine:x64
Module          /machine:x64 -ignore:4049,4206,4217,4221 -incremental:no
Shared          /machine:x64 -ignore:4049,4206,4217,4221 -incremental:no

-- Enabled support for:  asimage builtin_afterimage builtin_clang builtin_cling builtin_freetype builtin_ftgl builtin_gl2ps builtin_glew builtin_gtest builtin_llvm builtin_lz4 builtin_lzma builtin_nlohmannjson builtin_openui5 builtin_pcre builtin_tbb builtin_xxhash builtin_zstd clad dataframe exceptions gdml http imt mlp minuit2 opengl pyroot roofit webgui root7 shared tmva tmva-pymva spectrum
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/naido/Documents/Software/root_v6-28-00/build

I then run:

cmake --build . --config Release --target install -j18

The end output of this is:

  Building Custom Rule C:/Users/naido/Downloads/root-6.28.00/interpreter/cling/lib/Utils/CMakeLists.txt
  clingUtils.vcxproj -> C:\Users\naido\Documents\Software\root_v6-28-00\build\lib\clingUtils.lib
  Building Custom Rule C:/Users/naido/Downloads/root-6.28.00/interpreter/cling/lib/Interpreter/CMakeLists.txt
  clingInterpreter.vcxproj -> C:\Users\naido\Documents\Software\root_v6-28-00\build\lib\clingInterpreter.lib
  Building Custom Rule C:/Users/naido/Downloads/root-6.28.00/interpreter/cling/lib/MetaProcessor/CMakeLists.txt
  clingMetaProcessor.vcxproj -> C:\Users\naido\Documents\Software\root_v6-28-00\build\lib\clingMetaProcessor.lib
  Building Custom Rule C:/Users/naido/Downloads/root-6.28.00/interpreter/CMakeLists.txt
  Copying LLVM resource and header files
  Building Custom Rule C:/Users/naido/Downloads/root-6.28.00/core/clingutils/CMakeLists.txt

It is unclear to me whether there are any errors here, but the installation directory is empty. Any advice would be deeply appreciated!

ROOT Version: 6.28.00
Platform: Windows 11
Compiler: Visual Studio 2022 Developer Command Prompt v17.4.4

In case it is relevant:

cmake --version
cmake version 3.25.2

Try to rebuild with -DVERBOSE_CMAKE_MAKEFILE and check if there is an error

BTW, why don’t you use a binary distribution?

I have been trying to compile a Geant4 project which writes output to a .root file.
When I used the precompiled binary of ROOT, I was getting errors that things had been compiled with a different standard and the build failed, so I was trying to build with this explicitly set.

I have been advised on the Geant4 forum that Geant4 v11.1.0 is compiled with c++17. What is used in the precompiled binary for ROOT?

I will give this a go, thank you!

In the end, I found that an installation of MYSYS2 was causing clashes and interfering with the install stage. Uninstalling this fixed it.

Marking solved, thank you!

1 Like

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