Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve compatibility with dependencies. #221

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JamesJieranShen
Copy link
Contributor

Mainly improves two things:

  1. Previously the GDML writer was copied from Geant4's source code almost entirely. This causes issues when one updates to the most recent Geant4 version, as internals of the GDMLWrite data structures have changed. I circumvent this by inheriting most of the geant4 code instead of directly copying them. I've tested that the gdml output feature continues to work using the Eos dumper macros.
  2. Add rpaths to the installed binaries by telling cmake to do so. These Rpaths effectively tell the installed binaries how to find linked libraries. By default CMake only uses rpaths during build time, and does not do so for installed binaries. Adding these line ins the CMake file will allow code to run as long as it builds (*), even when the Root/G4 libraries are not in $LD_LIBRARY_PATH. I've tested this patch with a anaconda build of root and geant4, and the code runs OK.

After merging, effectively one can run ratpac2 with just a conda environment with geant4 and root installed. Much better than asking everybody to install containers, although containers are still probably the best way to go in terms of guaranteeing all features working properly.

@tannerbk tannerbk self-assigned this Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants