# Install directory is empty after building from source on Windows 11

**URL:** <https://root-forum.cern.ch/t/install-directory-is-empty-after-building-from-source-on-windows-11/53567>\
**Category:** ROOT\
**Tags:** build, windows, root\
**Created:** [February 10, 2023, 11:00am UTC](https://root-forum.cern.ch/t/install-directory-is-empty-after-building-from-source-on-windows-11/53567 "2023-02-10T11:00:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pauln](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/p/c0e974/32.png) [@pauln](https://root-forum.cern.ch/u/pauln)\
**Post date:** [February 10, 2023, 11:00am UTC](https://root-forum.cern.ch/t/install-directory-is-empty-after-building-from-source-on-windows-11/53567/1 "2023-02-10T11:00:26Z")

</div>

Hi all,

As in the title, after following the [instructions](https://root.cern/install/build_from_source/) 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:

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

```auto

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:

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

```

The end output of this is:

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

* * *

---

<div class="post-metadata">

**Author:** ![pauln](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/p/c0e974/32.png) [@pauln](https://root-forum.cern.ch/u/pauln)\
**Post date:** [February 10, 2023, 11:10am UTC](https://root-forum.cern.ch/t/install-directory-is-empty-after-building-from-source-on-windows-11/53567/2 "2023-02-10T11:10:21Z")

</div>

In case it is relevant:

```auto
cmake --version
cmake version 3.25.2

```

---

<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:** [February 10, 2023, 12:08pm UTC](https://root-forum.cern.ch/t/install-directory-is-empty-after-building-from-source-on-windows-11/53567/3 "2023-02-10T12:08:30Z")

</div>

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

---

<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:** [February 10, 2023, 12:09pm UTC](https://root-forum.cern.ch/t/install-directory-is-empty-after-building-from-source-on-windows-11/53567/4 "2023-02-10T12:09:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pauln](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/p/c0e974/32.png) [@pauln](https://root-forum.cern.ch/u/pauln)\
**Post date:** [February 10, 2023, 2:01pm UTC](https://root-forum.cern.ch/t/install-directory-is-empty-after-building-from-source-on-windows-11/53567/5 "2023-02-10T14:01:04Z")

</div>

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?

> [@bellenot](#):
>
> Try to rebuild with `-DVERBOSE_CMAKE_MAKEFILE` and check if there is an error

I will give this a go, thank you!

---

<div class="post-metadata">

**Author:** ![pauln](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/p/c0e974/32.png) [@pauln](https://root-forum.cern.ch/u/pauln)\
**Post date:** [February 13, 2023, 10:18am UTC](https://root-forum.cern.ch/t/install-directory-is-empty-after-building-from-source-on-windows-11/53567/6 "2023-02-13T10:18:39Z")

</div>

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!

---

<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:** [February 27, 2023, 10:18am UTC](https://root-forum.cern.ch/t/install-directory-is-empty-after-building-from-source-on-windows-11/53567/7 "2023-02-27T10:18:56Z")

</div>

Closed on February 27, 2023, 10:18am UTC

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