On 27/12/2023 08:45, Drew Parsons wrote:
On 2023-12-26 12:45, Drew Parsons wrote:

I can manually reproduce the error trivially on an arm64 chroot
(amdahl.debian.org).  Copying hello.f90 from openmpi's debian/tests
and manually running
  mpif90 -o hello hello.f90
reproduces the error reference to the x86_64 include path on the arm64 machine.

`mpif90.openmpi -print-search-dirs` only shows aarch64 paths though.

I guess the problem must be the common files from openmpi-common in /usr/share/openmpi/. They're not actually arch-independent.  Do mpif90.openmpi and the other components actively read them at runtime?

For instance, /usr/share/openmpi/mpif90.openmpi-wrapper-data.txt contains
fmoddir=/usr/include/x86_64-linux-gnu/fortran/gfortran-mod-15

Since openmpi-common is marked Arch: all, it's only built once, on amd64, hence x86_64-linux-gnu gets carried to the other arches. The compiler_flags variables is also affected, alongside as fmoddir.

It looks like only the mpi fortran wrapper txts are affected,
mpif77-wrapper-data.txt
mpif77.openmpi-wrapper-data.txt
mpif90-wrapper-data.txt
mpif90.openmpi-wrapper-data.txt
mpifort-wrapper-data.txt
mpifort.openmpi-wrapper-data.txt

Should these be moved from openmpi-common to libopenmpi-dev (or openmpi-bin)
at /usr/lib/<multiarch>/openmpi/share ?

This appears to be it. I've been building on arm64 recently (a VM on a mac) and don't see this.

There appears to be a mechanism for including ${includedir} and ${libdir} and evaluating the wrapper-data files at runtime. My hacking on these files in d/rules is causing the errors. I'll work on a better solution.


Alastair


--
Alastair McKinstry,
GPG: 82383CE9165B347C787081A2CBE6BB4E5D9AD3A5
ph: +353 87 6847928 e: alast...@mckinstry.ie, im: @alastair:mckinstry.ie

Reply via email to