Hi Drew,

Drew Parsons a écrit le 04/11/2022 à 11:27 :
Package: libhdf5-openmpi-dev
Version: 1.10.8+repack-1
Severity: important
Control: block 1020054 by -1

h5pcc is showing an unexpected default configuration:

$ h5pcc --showconfig
gcc -I/usr/include/hdf5/openmpi -L/usr/lib/x86_64-linux-gnu/hdf5/openmpi 
/usr/lib/x86_64-linux-gnu/hdf5/openmpi/libhdf5_hl.a 
/usr/lib/x86_64-linux-gnu/hdf5/openmpi/libhdf5.a -lcrypto -lcurl -lsz -lz -ldl 
-lm -Wl,-rpath -Wl,/usr/lib/x86_64-linux-gnu/hdf5/openmpi 
-I/usr/lib/x86_64-linux-gnu/openmpi/include 
-I/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi 
-L/usr/lib/x86_64-linux-gnu/openmpi/lib -lmpi

Note how it includes static linking to libhdf5_hl.a and libhdf5.a

This is the expected behavior as documented by upstream:

-shlib Compile with shared HDF5 libraries [default for hdf5 built without static libraries]

       -noshlib
Compile with static HDF5 libraries [default for hdf5 built with static libraries]

I would expect the default configuration to use dynamic linking with
shared libraries, as in

$ h5pcc --showconfig -shlib
gcc -I/usr/include/hdf5/openmpi -L/usr/lib/x86_64-linux-gnu/hdf5/openmpi 
-lhdf5_hl -lhdf5 -lcrypto -lcurl -lsz -lz -ldl -lm -Wl,-rpath 
-Wl,/usr/lib/x86_64-linux-gnu/hdf5/openmpi

As far as I can tell, the default static linking is causing the RC
Bug#1020054 reported against h5py.

Could be fixed using `HDF5_USE_SHLIB=yes`:
PYBUILD_NAME=$(PYBUILD_NAME_MPI) CC=h5pcc HDF5_USE_SHLIB=yes HDF5_MPI=ON HDF5_PKGCONFIG_NAME=hdf5-mpi H5PY_SYSTEM_LZF=1 dh_auto_build -D $(BUILD_DIR_MPI)


Should the default configuration of h5pcc be changed to confirm with
the -shlib configuration?

I don't think so since the current behavior is the documented one.

Best,
_g.

Reply via email to