Issues Running Geant4 B1 Example Inside EIC Shell Container

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:

  1. Missing Geant4 environment script
    Running:

    source /opt/Geant4/geant4.sh
    
    

    results in:

    bash: /opt/Geant4/geant4.sh: No such file or directory
    
    

    It appears that Geant4 may not be fully installed in the container or that the setup script is located elsewhere.

  2. B1 example builds but produces no executable
    After running:

    cd ~/geant4-src/examples/basic/B1/build
    cmake ..
    make -j
    
    

    CMake 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.

  3. 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.

  4. 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
    InstallTreeFiles
    
    

    Attempting to run the executable:

    ./exampleB1
    bash: ./exampleB1: No such file or directory
    
    

    Checking Geant4 environment setup:

    source /opt/Geant4/geant4.sh
    bash: /opt/Geant4/geant4.sh: No such file or directory
    
    

    Location 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?


I know nothing about the EIC shell, but the script should be in the install directory geant4-install/bin/geant4.sh (check what’s the actual name of your install directory)

Geant4 is not responsible for the build or distribution of this image, so you should contact the EIC developers to answer your questions. What I can say though is that:

Is not a build of an example, but of the toolkit itself.

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