[Debichem-devel] Bug#1075979: [Help] molds: FTBFS with mpich as default MPI provider: /usr/bin/ld: cannot find -lmpi_cxx: No such file or directory
Drew Parsons
dparsons at emerall.com
Fri Nov 8 20:11:51 GMT 2024
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)
More information about the Debichem-devel
mailing list