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

Fix FairRoot::FastSim RPATH resolution on Linux #1524

Closed
wants to merge 1 commit into from

Conversation

fuhlig1
Copy link
Member

@fuhlig1 fuhlig1 commented Apr 19, 2024

Fix FairRoot::FastSim RPATH resolution on Linux

Store RPATH information in FairFastSim library instead of RUNPATH information.
On many Linux systems only primary library dependencies are properly resolved
when only RUNPATH information is available. Secondary indirect dependencies
are not found when linking an executable against the FairFastSim library.

fixes #1523

Checklist:

@fuhlig1 fuhlig1 added the bug label Apr 19, 2024
@fuhlig1 fuhlig1 changed the base branch from master to dev April 19, 2024 15:00
Store RPATH information in FairFastSim library instead of RUNPATH information.
On many Linux systems only primary library dependencies are properly resolved
when only RUNPATH information is available. Secondary indirect dependencies
are not found when linking an excutable against the FairFastSim library.

fixes FairRootGroup#1523
Copy link
Member

@dennisklein dennisklein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on your research and findings in this issue - thx! ❤️ - we realized that we should rather set LD_LIBRARY_PATH (as workaround) as we do for the root macro based tests. See #1525

Fixing this issue by falling back to RPATH is too invasive and only works by conincidence with legacy FairSoft because we install all transitive dependencies into the same directory.

# found.
# Send patches to upstrean such that that geant4, geant4_vmc and vgm
# correctly build libraries with RPATH information.
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition is too general, as it is not needed on some systems.

Comment on lines +70 to +71
# Send patches to upstrean such that that geant4, geant4_vmc and vgm
# correctly build libraries with RPATH information.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Opened FairRootGroup/FairSoft#535 to track this effort!

@fuhlig1
Copy link
Member Author

fuhlig1 commented Apr 22, 2024

Close id favour of #1524.

@fuhlig1 fuhlig1 closed this Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RPATH resolution sometimes broken when linking against FairRoot::FastSim
2 participants