Hello,
I am trying to run some examples (for instance B4), but when compiling it it fails giving as error:
/home/fnardi/sim/basic/B4/B4a/exampleB4a.cc:33:10: fatal error: G4RunManagerFactory.hh: No such file or directory
33 | #include "G4RunManagerFactory.hh"
| ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
I’ve looked a bit into it, and the library should be in my Geant4 version (11.0).
To compile it I source both GCC (9.3) and Geant4 from /cvmfs/, which worked fine in the machine I was using before migrating to a different one (same OS: centOS7).
Do you have any suggestion on how to fix this?
Thank you!
The Geant4 install that’s found by CMake can be checked via searching for the Geant4_DIR variable in the CMakeCache.txt file in your build directory. In general, the setup scripts should set either CMAKE_PREFIX_PATH or Geant4_DIR appropriately.
In CVMFS, I’d recommend using the LCG “views” under /cvmfs/sft.cern.ch/lcg/views as these provide a better integration of a full toolset. There’s a full lists here: https://lcginfo.cern.ch, though requires a CERN login. Generally, the latest releases, e.g. LCG_102 will have the latest Geant4 installed, though with some delays depending on LCG/SFT’s release schedule.
Setting manually the Geant4_DIR when running cmake fixed the issue, it was pointing to scraps of an old G4 installation (indeed, 10.6).
Now I have some other packages missing, so I’ll try to use a LCG view instead.
Thank you so much!