Skip to content

[VECGEOM-157] Fix compilation against Geant4-MT

Guilherme Amadio requested to merge vecgeom-157-fix-geant4-mt-compilation into master

Compiling against Geant4-MT requires the addition of ${Geant4_DEFINITIONS} to targets that depend on it, to make sure that G4MULTITHREADED gets defined and that the tls.hh header from Geant4 chooses the right type of thread local storage for the build. Otherwise, the build will fail at link time with the error below.

ld: _ZN14G4GeomSplitterI8G4LVDataE6offsetE: TLS reference in /usr/lib64/libG4Tree.so mismatches non-TLS reference in libvecgeom.a(SimpleNavigator.cpp.o) /usr/lib64/libG4Tree.so: error adding symbols: Bad value collect2: error: ld returned 1 exit status

Closes VECGEOM-157.

Merge request reports