Package: libhdf5-dev Version: 1.10.8+repack1-1 Severity: normal Dear Maintainer,
Trying to statically link an executable (like h5_write.c¹) against HDF5 using the pkg-config profile fails: $ gcc -static h5_write.c $(pkg-config --cflags hdf5) $(pkg-config --static --libs hdf5) /usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.a(H5PLint.o): in function `H5PL__open': (.text+0x46b): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.a(H5Fint.o): in function `H5F_track_metadata_read_retries': (.text+0x3c09): undefined reference to `log10' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.a(H5Fint.o): in function `H5F_set_retries': (.text+0x3d42): undefined reference to `log10' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.a(H5Tconv.o): in function `H5T__conv_f_i': (.text+0x631a4): undefined reference to `pow' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.a(H5Tconv.o): in function `H5T__conv_i_f': (.text+0x64a73): undefined reference to `pow' /usr/bin/ld: (.text+0x64d82): undefined reference to `pow' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.a(H5Z.o): in function `H5Z__init_package': (.text+0x60b): undefined reference to `SZ_encoder_enabled' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.a(H5Zdeflate.o): in function `H5Z__filter_deflate': (.text+0x114): undefined reference to `compress2' /usr/bin/ld: (.text+0x212): undefined reference to `inflateInit_' /usr/bin/ld: (.text+0x23d): undefined reference to `inflate' /usr/bin/ld: (.text+0x25e): undefined reference to `inflateEnd' /usr/bin/ld: (.text+0x2b4): undefined reference to `inflateEnd' /usr/bin/ld: (.text+0x33e): undefined reference to `inflateEnd' […] Obviously the libraries on which HDF5 depends should be added to the Libs.private and Requires.private fields.² Thanks for your work, ¹ https://raw.githubusercontent.com/HDFGroup/hdf5/develop/examples/h5_write.c ² See for example https://people.freedesktop.org/~dbn/pkg-config-guide.html -- ⢀⣴⠾⠻⢶⣦⠀ Sébastien Villemot ⣾⠁⢠⠒⠀⣿⡁ Debian Developer ⢿⡄⠘⠷⠚⠋⠀ https://sebastien.villemot.name ⠈⠳⣄⠀⠀⠀⠀ https://www.debian.org