As described in conda-forge/dagmc-feedstock#25, some weirdness in how FindHDF5.cmake works results in transitive dependencies getting linked against, which causes issues in conda-forge with those libraries getting hardcoded in the installed DAGMCTargets.cmake file, thereby breaking potentially downstream applications that are trying to link against DAGMC. The "best" fix would be to use the proper hdf5::hdf5 target provided by newer versions of CMake (3.19+), but I would hesitate to make that the required version. As such, the fix I'm proposed here is to manually remove libpthread, libdl, and libm from the list of HDF5 libraries. This should not cause any issues because:
For shared libraries, everything gets pulled in transitively through libhdf5 anyway
Nowadays, it is not required to link against libpthread or libdl at all (see explanation here)
Old behavior: All DAGMC libraries will be explicitly linked against HDF5 and its transitive dependencies
New behavior: All DAGMC libraries will be explicitly linked against HDF5 and several transitive dependencies (e.g., libcrypto, libcurl) but not libpthread, libdl, or libm
Changelog file
All pull requests are required to update the CHANGELOG file with the PR. Your update can take different forms including:
creating a new entry describing your change, including a reference to this pull request number
adding a reference to your pull request number to an exist entry if that entry can include your changes
Description
As described in conda-forge/dagmc-feedstock#25, some weirdness in how FindHDF5.cmake works results in transitive dependencies getting linked against, which causes issues in conda-forge with those libraries getting hardcoded in the installed DAGMCTargets.cmake file, thereby breaking potentially downstream applications that are trying to link against DAGMC. The "best" fix would be to use the proper
hdf5::hdf5
target provided by newer versions of CMake (3.19+), but I would hesitate to make that the required version. As such, the fix I'm proposed here is to manually remove libpthread, libdl, and libm from the list of HDF5 libraries. This should not cause any issues because:Motivation and Context
Described above
Changes
Described above
Behavior
Old behavior: All DAGMC libraries will be explicitly linked against HDF5 and its transitive dependencies New behavior: All DAGMC libraries will be explicitly linked against HDF5 and several transitive dependencies (e.g., libcrypto, libcurl) but not libpthread, libdl, or libm
Changelog file
All pull requests are required to update the CHANGELOG file with the PR. Your update can take different forms including: