-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Set HDF5_ROOT to avoid hardcoding library dependencies #25
Conversation
@conda-forge-admin, please rerender |
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
…nda-forge-pinning 2023.12.04.19.29.31
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to leave the HDF5 find debug on?
@@ -32,6 +32,9 @@ cmake -DBUILD_MCNP5=OFF \ | |||
-DBUILD_PIC=OFF \ | |||
-DBUILD_RPATH=ON \ | |||
-DDOUBLE_DOWN=OFF \ | |||
-DCMAKE_POLICY_DEFAULT_CMP0074=NEW \ | |||
-DHDF5_ROOT="${PREFIX}" \ | |||
-DHDF5_FIND_DEBUG=ON \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this have a continuing purpose? Or was it transient?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just debugging, although the fix I've proposed here didn't work as intended so I still have some digging to do 😞
Well, unfortunately my attempts to get around the HDF5 library linking issue appear to be unsuccessful. I'm going to submit a PR to DAGMC proper that can be incorporated in a future release. |
Currently, the DAGMC package on conda forge has hardcoded libraries in the exported
DAGMCTargets.cmake
file from a temporary build path which won't show up on a user's system, which breaks downstream dependencies (e.g., OpenMC). After a lot of digging, I've determined that it is the fault of HDF5. See here for a detailed explanation: InsightSoftwareConsortium/ITK#343.The solution in the above linked ITK issue is to change how HDF5 is linked by using
*_LIBRARY_NAMES
rather than*_LIBRARIES
. An easier workaround that requires no changes in the DAGMC source itself is to setHDF5_ROOT
, which causesh5cc -show
to fail which then triggers a fallback in FindHDF5.cmake whereby it only searches for libhdf5.so and not all the transitive dependencies.I'm not sure there's a good proper fix short of 1) the HDF5 feedstock on conda-forge using CMake rather than autoconf, or 2) FindHDF5.cmake being fixed to not hardcode paths to system libraries.
Checklist
Reset the build number to0
(if the version changed)conda-smithy
(Use the phrase@conda-forge-admin, please rerender
in a comment in this PR for automated rerendering)