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: Unknown — using the version preinstalled inside the EIC Shell Docker image (eicweb/eic_xl:nightly). The standard environment script (geant4.sh) does not exist, so I cannot confirm the exact Geant4 version.
Operating System: macOS (running Docker) — container OS is Ubuntu 22.04 (inside the EIC Shell image)
Compiler/Version: GCC inside the container (default from the EIC Shell image)
CMake Version: The version included in eicweb/eic_xl:nightly (reported as part of the environment)
I am trying to build and run the B1 example inside the EIC Shell Docker container, but I am encountering problems:
-
Missing Geant4 environment script
Running:source /opt/Geant4/geant4.shresults in:
bash: /opt/Geant4/geant4.sh: No such file or directoryIt appears that Geant4 may not be fully installed in the container or that the setup script is located elsewhere.
-
B1 example builds but produces no executable
After running:cd ~/geant4-src/examples/basic/B1/build cmake .. make -jCMake and compilation finish without any errors, but no executable (e.g.,
exampleB1) is generated.The build directory contains many CMake files and Geant4 config files (e.g.,
Geant4Config.cmake) but no compiled binary. -
Possible mismatch between headers and libraries
Because the EIC image is providing Geant4 in a modular/partial way, I suspect that the examples may not be intended to build in this environment, or that some required Geant4 components are missing. -
Command Logs
Here are the exact terminal outputs:
Build directory contents after
make:root@bfc14ba81cad:~/geant4-src/examples/basic/B1/build# ls BuildProducts LICENSE.txt CMakeCPackOptions.cmake Makefile CMakeCache.txt Modules CMakeFiles README.txt CPackConfig.cmake UseGeant4.cmake CPackSourceConfig.cmake _source_extras G4EXPATShim.cmake cmake_install.cmake G4FreetypeShim.cmake cmake_uninstall.cmake G4HDF5Shim.cmake cmake_uninstall.cmake.in G4ModuleAdjacencyList.txt cxx_filesystem G4ModuleInterfaceMap.csv geant4-config G4MotifShim.cmake geant4_module_check.py G4X11Shim.cmake geant4_validate_sources.cmake Geant4Config.cmake geant4make.csh Geant4ConfigVersion.cmake geant4make.sh Geant4LibraryDepends.cmake source Geant4PackageCache.cmake source_package_extras.cmake InstallTreeFilesAttempting to run the executable:
./exampleB1 bash: ./exampleB1: No such file or directoryChecking Geant4 environment setup:
source /opt/Geant4/geant4.sh bash: /opt/Geant4/geant4.sh: No such file or directoryLocation of the example:
pwd /root/geant4-src/examples/basic/B1/build
Questions
-
Does the EIC Shell image include a complete and compilable Geant4 installation?
-
If so, where is the correct environment setup script located?
-
If not, is it expected that Geant4 examples (like B1) cannot be built inside this container?
-
What is the recommended approach for running Geant4 examples in the EIC software environment?