restG4: undefined symbol error in v2.3.8 official release

System : Linux
REST version : v2.3.8 (official releases as it is in /programas/rest/v2.3.8)

When launching restG4, I got this error
restG4: symbol lookup error: restG4: undefined symbol: _ZTv0_n72_N21G4VModularPhysicsList15TerminateWorkerEv
it doesn´t depend on the Geant4 version and it doesn’t happen in the v2.3.7 or in the latest version of REST

Hello Gloria,

In my experience this type of error happens when restG4 has been compiled with a different geant4 version that the one which is currently being sourced. To fix this either recompile REST with the desired geant4 version or source the correct version (if it still exists).

1 Like

In principle the script thisREST.sh is responsible to load the good ROOT and Geant4 versions that were used during the compilation of REST.

Inside thisREST.sh we find:


# if thisroot.sh script is found we load the same ROOT version as used in compilation
if [[ -f "/programas/root/6.24.02/bin/thisroot.sh" && /programas/root/6.24.02/bin/thisroot.sh != /usr/* ]]; then
    source /programas/root/6.24.02/bin/thisroot.sh
fi

# if geant4.sh script is found we load the same Geant4 version as used in compilation
 if [[ -f /programas/geant4/geant4.10.04.p02/bin/../bin/geant4.sh && /programas/geant4/geant4.10.04.p02/bin/../bin/geant4.sh != /usr/* ]]; then
        source /programas/geant4/geant4.10.04.p02/bin/../bin/geant4.sh
 fi

However, I don’t know for what reasons, sometimes the geant4 lines do not appear at thisREST.sh.

My guess is that when invoking cmake, Geant4 has not been properly loaded in the system using geant4-config, however, the cmake compilation system is capable to identify the Geant4 installation. Therefore, everything runs smoothly, but the lines are not added to thisREST.sh.

The best would be that the cmake system would be safe so that this would not happen, and it would always load the same Geant4 version. This would avoid this kind of errors.

By the way, the official v2.3.8 version installed at sultan, /programas/rest/v2.3.8/, had this problem. I re-compiled so that the geant4 lines appeared again at thisREST.sh. So doing

source /programas/rest/v2.3.8/thisREST.sh

Should not show that problem.

I created the following issue. It would be great if someone could address it.