Public bug reported:

openms 2.6.0+cleaned1-6build2 fails to build from source on all architectures
in stonking-proposed against hdf5 2.2.0+repack-4, blocking the
hdf5 2.2 transition (openms is in its reverse-build-dependency set).

Build log (amd64):
https://launchpad.net/ubuntu/+source/openms/2.6.0+cleaned1-6build2/+build/33537199

  /usr/bin/x86_64-linux-gnu-ld.bfd: cannot find -lhdf5_cpp-shared: No
such file or directory

Cause:

hdf5 2.2 installs a CMake config package whose imported targets have no
namespace, hdf5-shared and hdf5_cpp-shared. FindHDF5 uses that config and
reports the bare target names in HDF5_CXX_LIBRARIES:

-- Found HDF5: hdf5-shared;hdf5_cpp-shared (found version "2.2.0") found
components: C CXX HL

OpenMS puts HDF5_CXX_LIBRARIES into OPENMS_DEP_LIBRARIES. openms_add_library
copies that list into the cached OpenMS_LIBRARIES variable. src/topp and
src/utils read OpenMS_LIBRARIES to link the executables, from directory
scopes where the imported targets do not exist. CMake treats the names as
plain library names and passes -lhdf5_cpp-shared to the linker. No file
matches that name. The real library is libhdf5_serial_cpp.so.320.

libOpenMS links because it links in the same scope where find_package ran.
Only the executables fail.

Fix:

Mark the HDF5 imported targets IMPORTED_GLOBAL after find_package(HDF5) in
src/openms/cmake_findExternalLibs.cmake. The names then resolve to full
library paths in every scope. This is a packaging patch. No upstream code
changes.

Debian needs the same fix. sid now carries hdf5 2.2.0+repack-5 with openms
still at 2.6.0+cleaned1-6.

** Affects: openms (Ubuntu)
     Importance: Undecided
     Assignee: Valentin Haudiquet (vhaudiquet)
         Status: In Progress


** Tags: ftbfs

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2167933

Title:
  openms: FTBFS in stonking-proposed with hdf5 2.2 (cannot find
  -lhdf5_cpp-shared)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openms/+bug/2167933/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to