Problem 2297 - Cannot build g4py when using system CLHEP
Summary: Cannot build g4py when using system CLHEP
Status: CLOSED WONTFIX
Alias: None
Product: Environments
Classification: Unclassified
Component: g4py (show other problems)
Version: 10.6
Hardware: All Linux
: P4 major
Assignee: Ben Morgan
URL:
Depends on:
Blocks:
 
Reported: 2020-12-03 22:08 CET by Laurie Nevay
Modified: 2020-12-17 17:54 CET (History)
0 users

See Also:


Attachments
Patch file for fix. (1.52 KB, text/plain)
2020-12-03 22:08 CET, Laurie Nevay
Details

Note You need to log in before you can comment on or make changes to this problem.
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.