Hi Helmut,

On 23.10.19 09:47, Helmut Grohne wrote:
Package: cmake
Version: 3.13.4-1
Tags: patch upstream
User: debian-cr...@lists.debian.org
Usertags: ftcbfs
Control: affects -1 + src:flann src:hyphy src:liggghts src:sopt

FindMPI.cmake uses compiler wrappers such as mpicc to discover the
relevant compiler and linker flags. During cross compilation, these
compiler wrappers do not work and they will not be supported on Debian.
Beyond breaking cross compilation, you cannot easily combine multiple
compiler wrappers (e.g. ccache/distcc/mpicc). It is best to avoid
compiler wrappers entirely and for MPI, this is well supported as all
major implementations ship pkg-config files since ages. I am asking to
stop using mpicc and switch over to pkg-config.

Unfortunately, FindMPI.cmake exposes MPI_*_COMPILER and a number of
downstreams use these wrappers that cannot be used during cross
compilation. Every downstream that wants to be cross buildable must stop
using them and I've filed a relevant patch for liggghts. Avoiding
MPI_*_COMPILER is easy enough in the majority of cases, because
FindMPI.cmake also provides the relevant flags in via other variables.
Still, we must maintain backwards compatibility and thus continue
supplying MPI_*_COMPILER when it is available (i.e. during native
compilation).

The attached patch thus tries the wrappers first before falling back to
pkg-config. I've tested it with flann, hyphy, liggghts and sopt. Of
these, flann and sopt are fixed by this patch. hyphy and liggghts need
further patches, which are submitted separately. Please consider
applying the attached patch.

Helmut

Thanks for providing a patch. Have you submitted this upstream?
I imagine there isn't anything Debian-specific there?

Cheers,
Felix

Reply via email to