Problem 2297

Summary: Cannot build g4py when using system CLHEP
Product: Environments Reporter: Laurie Nevay <laurie.nevay>
Component: g4pyAssignee: Ben Morgan <Ben.Morgan>
Status: CLOSED WONTFIX    
Severity: major    
Priority: P4    
Version: 10.6   
Hardware: All   
OS: Linux   
Attachments: Patch file for fix.

Description Laurie Nevay 2020-12-03 22:08:12 CET
Created attachment 648 [details]
Patch file for fix.

In g4yp/cmake/Modules/FindGeant4.cmake you hard code the Geant4 library names. This includes G4clhep. In the case where we build Geant4 w.r.t. system CLHEP (required for our application because we use full features of CLHEP and also need to ensure we only have one random number generator) this will fail to compile (linker error) as there is no libG4clhep in the installation directory.

The UseGeant4.cmake from a Geant4 installation will provide the variable Geant4_LIBRARIES which can be used, no?

I've attached a patch file that fixes this issue for me.
Comment 1 Ben Morgan 2020-12-17 17:54:45 CET
Version 10.6.2 and onwards no support building/installing Geant4Py through the core CMake build. See the `GEANT4_USE_PYTHON` CMake option, and co-requirements in the Install Guide:

https://geant4-userdoc.web.cern.ch/UsersGuides/InstallationGuide/html/installguide.html#geant4-build-options

Thats for 10.7, but the same options are in 10.6.2 onwards.