Dear Maintainer,
Debian's binNMU 2.6.0+cleaned1-6+b2 ("Rebuild against libhdf5-320") failed
on all release architectures, currently attributed to the GCC-16 FTBFS
(#1133596) and the eigen3 5.0 FTBFS (#1136312), which abort the build at
the compile stage. Once those are fixed, the same rebuild will fail at the
link stage (at least that is what happens in Ubuntu) with:
/usr/bin/ld.bfd: cannot find -lhdf5_cpp-shared: No such file or directory
Cause: hdf5 2.2 installs a CMake config package with non-namespaced
imported targets, hdf5-shared and hdf5_cpp-shared. FindHDF5 reports the
bare target names in HDF5_CXX_LIBRARIES. OpenMS stores those names in the
cached OpenMS_LIBRARIES variable (openms_add_library). src/topp and
src/utils read OpenMS_LIBRARIES from directory scopes where the imported
targets do not exist, so CMake passes -lhdf5_cpp-shared to the linker. No
file matches that name. The real library is libhdf5_serial_cpp.so.320.
Ubuntu carries the same hdf5 and hit this on all 6 compiled architectures.
The attached patch marks the imported targets IMPORTED_GLOBAL after
find_package(HDF5), so they resolve to full library paths in every scope.
With the patch, openms 2.6.0+cleaned1-6ubuntu1 builds against hdf5 2.2 on
amd64, amd64v3, arm64, ppc64el and s390x, with riscv64 in progress.
Launchpad bug with build logs and PPA builds:
https://bugs.launchpad.net/ubuntu/+source/openms/+bug/2167933
*** /tmp/tmplklyj0a8/bug_body
In Ubuntu, the attached patch was applied to achieve the following:
* d/patches: make HDF5 imported targets global for hdf5 2.2 (LP: #2167933)
Thanks for considering the patch.