Package: libhdf5-openmpi-dev
Version: 1.10.7+repack-2
Severity: serious
Justification: FTBFS
Control: affects -1 src:fenics-dolfinx

The hdf5 compiler wrappers declare -lcurl as a linked library
e.g. 
$ h5cc -showconfig | grep curl
                Extra libraries: -lcrypto -lcurl -lpthread -lsz -lz -ldl -lm 
$ h5pcc -showconfig | grep curl
                Extra libraries: -lcrypto -lcurl -lsz -lz -ldl -lm 


But libcurl-dev is not declared as a Dependency for libhdf5-openmpi-dev.
This means that compiling with h5pcc (or h5cc) fails unless [a]
libcurl-dev is installed.

This affects client packages using cmake that check HDF5
configuration using find_package(hdf5),
e.g. a trivial sample CMakeLists.txt

------------------
project(TEST_hdf5)

set(HDF5_PREFER_PARALLEL TRUE)
find_package(HDF5 REQUIRED COMPONENTS C)
------------------

gives the result,

  -- HDF5 C compiler wrapper is unable to compile a minimal HDF5 program.
  CMake Error at 
/usr/share/cmake-3.21/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
    Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS C) (found
    version "")


A current example is the broken build of fenics-dolfinx on i386,
https://buildd.debian.org/status/fetch.php?pkg=fenics-dolfinx&arch=i386&ver=1%3A0.3.0-3&stamp=1633198410&raw=0


cmake is desparately opaque, but with enough sweat and tears
(ultimately, by compiling the cmake hdf5 test file manually with
h5pcc) one can eventually discover that the problem is the -lcurl flag
in h5pcc,

  CMakeFiles/hdf5$ h5pcc cmake_hdf5_test.c
  /usr/bin/ld: cannot find -lcurl



I'm filing this bug against libhdf5-openmpi-dev, providing h5pcc, 
since I want to use hdf5-mpi, but the problem also affects libhdf5-dev
(providing h5cc).

Since h5pcc and h5cc invoke -lcurl, libhdf5-openmpi-dev, libhdf5-dev (and
probably libhdf5-mpich-dev also) should declare Depends: libcurl-dev

Finally, since libcurl-dev is virtual, the actual declaration should be
(following hdf5's Build-Depends)

  Depends: libcurl4-openssl-dev

or possibly Depends: libcurl4-openssl-dev | libcurl-dev
(the libcurl variants seem to be interchangeable)


Why h5cc needs -lcurl is a separate question! What is it trying to
download?


Drew


-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.14.0-1-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_AU:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libhdf5-openmpi-dev depends on:
ii  libaec-dev                         1.0.6-1
ii  libhdf5-openmpi-103-1              1.10.7+repack-2
ii  libhdf5-openmpi-cpp-103-1          1.10.7+repack-2
ii  libhdf5-openmpi-fortran-102        1.10.7+repack-2
ii  libhdf5-openmpi-hl-100             1.10.7+repack-2
ii  libhdf5-openmpi-hl-cpp-100         1.10.7+repack-2
ii  libhdf5-openmpi-hl-fortran-100     1.10.7+repack-2
ii  libjpeg-dev                        1:2.0.6-4
ii  libjpeg62-turbo-dev [libjpeg-dev]  1:2.0.6-4
ii  libopenmpi-dev                     4.1.2~rc1-4
ii  zlib1g-dev                         1:1.2.11.dfsg-2

libhdf5-openmpi-dev recommends no packages.

Versions of packages libhdf5-openmpi-dev suggests:
pn  libhdf5-doc  <none>

-- no debconf information

Reply via email to