#1075985 libfftw3-mpi3 might be misbuilt with MPICH as default

Package:
libfftw3-mpi3
Source:
libfftw3-mpi3
Description:
MPI Library for computing Fast Fourier Transforms
Submitter:
Adrian Bunk
Date:
2025-08-17 18:12:15 UTC
Severity:
normal
Tags:
#1075985#5
Date:
2024-07-08 23:32:25 UTC
From:
To:
https://buildd.debian.org/status/fetch.php?pkg=fftw3&arch=i386&ver=3.3.10-1%2Bb3&stamp=1720426229&raw=0

...
./configure --enable-single  --build i686-linux-gnu F77="gfortran -ff2c" --prefix=/usr --enable-shared --enable-threads --enable-openmp --enable-mpi --libdir=\${prefix}/lib/i386-linux-gnu MPILIBS="" --enable-sse --enable-avx
...
   dh_shlibdeps -a
dpkg-shlibdeps: warning: symbol MPI_Comm_split used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3l_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Comm_dup used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3l_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Bcast used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3l_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Comm_size used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3l_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Alltoall used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3l_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Comm_free used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3l_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Allreduce used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3l_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Abort used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3l_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Comm_rank used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3l_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Alltoallv used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3l_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: 4 other similar warnings have been skipped (use -v to see them all)
dpkg-shlibdeps: warning: symbol MPI_Sendrecv used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3f_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Alltoallv used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3f_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Comm_rank used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3f_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Abort used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3f_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Comm_f2c used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3f_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Send used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3f_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Recv used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3f_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Bcast used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3f_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Comm_size used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3f_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Comm_dup used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3f_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: 4 other similar warnings have been skipped (use -v to see them all)
dpkg-shlibdeps: warning: symbol MPI_Alltoallv used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Abort used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Comm_rank used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Comm_f2c used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Send used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Sendrecv used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Recv used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Comm_split used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Comm_dup used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: symbol MPI_Bcast used by debian/libfftw3-mpi3/usr/lib/i386-linux-gnu/libfftw3_mpi.so.3.6.10 found in none of the libraries
dpkg-shlibdeps: warning: 4 other similar warnings have been skipped (use -v to see them all)
   dh_installdeb -a
...




Likely caused by:

archconfflags := $(archconfflags) --prefix=/usr --enable-shared --enable-threads --enable-openmp --enable-mpi --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) MPILIBS="$(shell mpicc --showme:link)"


$ mpicc.openmpi --showme:link
-L/usr/lib/x86_64-linux-gnu/openmpi/lib -lmpi
$ mpicc.mpich --showme:link
gcc: error: unrecognized command-line option ‘--showme:link’
$

#1075985#20
Date:
2025-03-29 19:01:49 UTC
From:
To:
user debian-release@lists.debian.org
usertag 1075985 + bsp-2025-03-ca-montreal
severity 1075985 normal
thank you

You're right that the libraries are mis-linked, but in the particular
case of fftw MPI, this isn't very serious. Programs using mpi should
generally be built with `mpicc`, which will provide the right flags.

Some examples of things that work fine:
1. The `mpi-bench` test within fftw3 builds and runs successfully.
2. A set of fftw MPI examples on github builds and runs successfully:
https://github.com/nsmith5/FFTW-MPI-Examples/blob/master/example%201/Makefile

The (now less severe) bug could be fixed by using something like:

MPILIBS="$(shell mpicc --showme:link 2>/dev/null || mpicc -show-link-info)"

But this feels a bit too specific to fftw3. I wonder if we could
instead have mpi-default-dev provide a pkgconfig file, so that a
single command could always provide the right flags.

#1075985#25
Date:
2025-03-29 19:28:45 UTC
From:
To:
I just verified that my proposed change to the MPILIBS definition
causes fftw3_mpi to be linked correctly on i386, in case we decide to
go that way.