Error during geant4_10_07_p01 installation on Windows

Hi Gean4 users,

I would like to update my Geant4 10.6 so I tried to install Geant4 10.7 on my Windows 10 machine and I got an issue. I followed the procedure on the installation guide.

Dowloaded from : geant4.web.cern.ch the ZIP format (48.9Mb, 51279540 bytes) for windows and unzip the files in: C:\Geant4\geant4_10_07_p01

Created manually two folders:

  • C:\Geant4\geant4_10_07_p01-build
  • C:\Geant4\geant4_10_07_p01-install

Ran cmake and set following options:

  • CMAKE_INSTALL_PREFIX = C:\Geant4\geant4_10_07_p01-install
  • GEANT4_BUILD_MULTITHREADED = ON
  • GEANT4_USE_OPENGL_WIN32= ON

!
Capture1_3

After configure and generate, I opened Geant4.sln with visual studio Microsoft 2019 (Version 16.8.2) and run “INSTALL” then when the installation were almost finished I got 20 errors messages:

In my installation folder (C:\Geant4\geant4_10_07_p01-install), compare to Geant4 10.6, a lot of files are missing especially “.lib” files.
C:\Geant4\geant4_10_07_p01-install\lib:
Capture3

Moreover in “geant4_10_07_p01-install\lib\Geant4-10.7.1” no Modules folder and no “.cmake” files
are present, except a PTL folder.

If I have a look at the weight of each install folder I got:
• geant4_10_07_p01-install = 40.6 Mo (42 581 575 octets)
• geant4_10_06_p02-install = 248 Mo (261 067 222 octets)

I would like to add that I keep Geant4 10.6 installed next to 10.7. Meaning that I got in the same repository :
• C:\Geant4\geant4_10_06_p02
• C:\Geant4\geant4_10_06_p02-build
• C:\Geant4\geant4_10_06_p02-install

• C:\Geant4\geant4_10_07_p01
• C:\Geant4\geant4_10_07_p01-build
• C:\Geant4\geant4_10_07_p01-install

I tried to install in another machine with the same procedure with visual studio Microsoft 2019 (Version 16.6.5). In that case the installation finished but same result on VS:

Blockquote
38>-- Installing: C:/Geant4/geant4_10_07_p01-install/lib/G4analysis.lib
38>-- Installing: C:/Geant4/geant4_10_07_p01-install/bin/G4analysis.dll
38>-- Installing: C:/Geant4/geant4_10_07_p01-install/lib/G4digits_hits.lib
38>-- Installing: C:/Geant4/geant4_10_07_p01-install/bin/G4digits_hits.dll
38>CMake Error at source/cmake_install.cmake:207 (file):
38> file INSTALL cannot find
38> “C:/Geant4/geant4_10_07_p01-build/BuildProducts/Debug/bin/G4error_propagation.dll”:
38> File exists.
38>Call Stack (most recent call first):
38> cmake_install.cmake:37 (include)
38>
38>
38>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: La commande “setlocal
38>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: “C:\Program Files\CMake\bin\cmake.exe” -DBUILD_TYPE=Debug -P cmake_install.cmake
38>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd
38>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: :cmEnd
38>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
38>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: :cmErrorLevel
38>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: exit /b %1
38>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: :cmDone
38>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd
38>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(149,5): error MSB3073: :VCEnd” s’est arrêtée avec le code 1.
38>Génération du projet “INSTALL.vcxproj” terminée – ÉCHEC.
========== Génération : 17 a réussi, 21 a échoué, 0 mis à jour, 0 a été ignoré ==========

Did I miss something during the cmake configuration?
Thank you for your help

I reply to this post because maybe someone could use the solution to this problem. It works if Release mode is selected in VS for the installation.