Package: libopenmpi-dev Version: 5.0.7-1 User: [email protected] Usertags: ftcbfs X-Debbugs-Cc: [email protected] Control: affects -1 + src:spfft cmake-data
Hi, cross building src:spfft fails. It uses CMake to discover an MPI implementation and attempts to use OpenMPI on 64bit architectures. The CMake code strongly prefers using the compiler wrappers mpicc and others. These are fundamentally incompatible with cross compilation and everywhere else the solution has been not to use mpicc. Ideally, FindMPI.cmake would eventually prefer pkgconf, but it is less than clear how to get there in a backwards-compatible way. It can be made to use pkgconf by setting -DMPI_SKIP_COMPILER_WRAPPER=ON, but then we run into the next problem. It searches for a package named "mpi-cxx" and there is none. libopenmpi-dev installs lots of ompi-*.pc including ompi-cxx.pc and manages mpi-*.pc via update-alternatives. Its postinst has a comment saying that mpi-cxx.pc was removed in OpenMPI >= 5.0.0, which is not actually the case. What was removed is libmpi++.so and libmpi_cxx.so, but ompi-cxx.pc continues to exist. So at present, we're in a situation where CMake + MPI + C++ + cross compilation does not work in any way. It works if you don't cross build (via mpicxx) or if you don't use C++ (via mpi-c.pc). How can we move forward here? What is the proper way to discover MPI support for C++? Helmut

