Microyz Cmake and make

Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!

Geant4 Version:11.3.2
Operating System: Mac OS
Compiler/Version:
CMake Version:


In the module (microyz), if I want to modify the file plot.c. Should I change in build folder of microyz or in the source file? If I modify in build file, should I do cmake and make OR not?

Thanks

You should change in the source folder. The CMake/make step will copy the plot.C file from the source folder to the build folder and overwrite the plot.C file in your build directory.

1 Like

I try to again build geant4.11.3.2. I got this during cmake.

‘‘‘

Checking C++ feature CXXSTDLIB_FILESYSTEM_NATIVE - Success
CMake Error at cmake/Modules/G4OptionalComponents.cmake:42 (find_package):
Could not find a package configuration file provided by “CLHEP” (requested
version 2.4.6.0) with any of the following names:

 CLHEPConfig.cmake
 clhep-config.cmake

Add the installation prefix of “CLHEP” to CMAKE_PREFIX_PATH or set
“CLHEP_DIR” to a directory containing one of the above files. If “CLHEP”
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
cmake/Modules/G4CMakeMain.cmake:59 (include)
CMakeLists.txt:49 (include)

Configuring incomplete, errors occurred!

Configure failed with the following output
CMake Version 4.2.1
Press [e] to exit screen

‘‘‘

‘‘‘

CLHEP_DIR CLHEP_DIR-NOTFOUND
CMAKE_BUILD_TYPE TestRelease
CMAKE_INSTALL_PREFIX /opt/geant4/11.3.2
CMAKE_OSX_ARCHITECTURES
CMAKE_OSX_DEPLOYMENT_TARGET
CMAKE_OSX_SYSROOT
GEANT4_BUILD_MULTITHREADED ON
GEANT4_INSTALL_DATADIR
GEANT4_USE_G3TOG4 OFF
GEANT4_USE_GDML OFF
GEANT4_USE_INVENTOR OFF
GEANT4_USE_INVENTOR_QT OFF
GEANT4_USE_OPENGL_X11 ON
GEANT4_USE_RAYTRACER_X11 OFF
GEANT4_USE_SYSTEM_CLHEP ON
GEANT4_USE_SYSTEM_EXPAT ON
GEANT4_USE_SYSTEM_ZLIB OFF

CLHEP_DIR: The directory containing a CMake configuration file for CLHEP.
Keys: [enter] Edit an entry [d] Delete an entry CMake Version 4.2.1
[l] Show log output [c] Configure
[h] Help [q] Quit without generating
[t] Toggle advanced mode (currently off)

‘‘‘

‘‘‘

sarahabdelaziz@Sarahs-MacBook-Pro ~ % ls
Desktop Library Pictures geant4
Documents Movies Public try1.C
Downloads Music data1.txt
sarahabdelaziz@Sarahs-MacBook-Pro ~ % cd geant4
sarahabdelaziz@Sarahs-MacBook-Pro geant4 % ls
build-11.3.2 geant4-v11.3.2
sarahabdelaziz@Sarahs-MacBook-Pro geant4 % cd build-11.3.2
sarahabdelaziz@Sarahs-MacBook-Pro build-11.3.2 % ccmake -DCMAKE_INSTALL_PREFIX=/opt/geant4/11.3.2 -DGEANT4_USE_QT=ON -DGEANT4_USE_QT_QT6=ON -DGEANT4_INSTALL_DATA=ON ../geant4-v11.3.2

sarahabdelaziz@Sarahs-MacBook-Pro build-11.3.2 %

‘‘‘

What should I do? I press ON for clhep during configuration and this is what I get.

Also, should I write anything for the enviroment because due to delete geant4.11.3.0, I do not found ./zshrc file. What should I do, please? Because it is the third time to build this version and failed when I write root for microyz module but it is effected so use brew install root and then write error for mismatch clhep so delete it again.

If I press on Off for clhep , I got

‘‘‘

cmake -DCMAKE_INSTALL_PREFIX=/opt/geant4/11.3.2 -DGEANT4_USE_QT=ON -DGEANT4_USE_QT_QT6=ON -DGEANT4_INSTALL_DATA=ON ../geant4-v11.3.2

– Checking C++ feature CXXSTDLIB_FILESYSTEM_NATIVE - Success
– Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
– Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
– Configuring download of missing dataset G4NDL (4.7.1)
– Configuring download of missing dataset G4EMLOW (8.6.1)
– Configuring download of missing dataset PhotonEvaporation (6.1)
– Configuring download of missing dataset RadioactiveDecay (6.1.2)
– Configuring download of missing dataset G4PARTICLEXS (4.1)
– Configuring download of missing dataset G4PII (1.3)
– Configuring download of missing dataset RealSurface (2.2)
– Configuring download of missing dataset G4SAIDDATA (2.0)
– Configuring download of missing dataset G4ABLA (3.3)
– Configuring download of missing dataset G4INCL (1.2)
– Configuring download of missing dataset G4ENSDFSTATE (3.0)
– Configuring download of missing dataset G4CHANNELING (1.0)
– The following Geant4 features are enabled:
CMAKE_CXX_STANDARD: Compiling against C++ Standard ‘17’
GEANT4_BUILD_MULTITHREADED: Build multithread enabled libraries
GEANT4_BUILD_TLS_MODEL: Building with TLS model ‘initial-exec’
GEANT4_USE_SYSTEM_EXPAT: Using system EXPAT library
GEANT4_USE_OPENGL_X11: Build Geant4 OpenGL driver with X11 support
GEANT4_USE_QT: Build Geant4 with Qt6 support
GEANT4_USE_QT3D: Build Geant4 Qt3D driver

– Configuring done (1.9s)
– Generating done (0.8s)
– Build files have been written to: /Users/sarahabdelaziz/geant4/build-11.3.2
sarahabdelaziz@Sarahs-MacBook-Pro build-11.3.2 %

‘‘‘

Should I press On or Off?

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