On 2024-11-08 20:26, Bill Allombert wrote:
Le Thu, Nov 07, 2024 at 08:12:22PM +0100, Andreas Tille a écrit :
Control: tags -1 help
Thanks
Hi,
today molds (from Debichem team) came up as candidate for the Bug of
the
Day[1]. I considered bug #1075979 easy to fix by simply adding
libopenmpi-dev to Build-Depends since
$ apt-file search libmpi_cxx.so | grep -- -dev
libopenmpi-dev: /usr/lib/x86_64-linux-gnu/libmpi_cxx.so
libopenmpi-dev: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so
but this is obviously not the case for the 5.x series of
libopenmpi-dev
which does not contain this library any more. Any hints for
replacements or other ways to make the linker happy are welcome since
the problem remains.
Andreas,
debian/rules carries the line
export LIBSBASE=-lstdc++ -lm -lpthread -lgomp -L/usr/lib/lapack/
-llapacke -lmpi -lmpi_cxx
I am pretty sure this is wrong, mpicxx should take care of -lstdc++
-lmpi -lmpi_cxx
I checked and the package build fine without -lstdc++ -lmpi -lmpi_cxx
We're in the middle of transitioning to OpenMPI 5. OpenMPI 5 removed
libmpi_cxx, which is why this bug happened.
Bill is certainly right, -lstdc++ -lmpi -lmpi_cxx should not be
hardcoded in build rules.
and just using mpicxx is the simplest method.
But Build-Depends: libopenmpi-dev is also wrong, unless the program is
badly written and not conformant with the MPI standard. openmpi 5 does
not build on 32-bit arches, so we use mpich.
Build-Depends: mpi-default-dev is the correct dependency
(alongside removing the hardcoded -lmpi -lmpi_cxx and using CXX=mpicxx)