Set HDF5_ROOT to avoid hardcoding library dependencies #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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)