#1150815 ray: FTBFS on MPICH architectures (armhf, i386): pkg-config mpi-c not found

Package:
src:ray
Source:
src:ray
Submitter:
Sebastien Bacher
Date:
2026-10-17 14:39:02 UTC
Severity:
normal
Tags:
#1150815#5
Date:
2026-10-13 13:35:37 UTC
From:
To:
Hi,

ray fails to build on the architectures where the default MPI is now
MPICH (armhf, i386). The current armhf and i386 binaries are older than
that switch. Reproduced in a sid i386 chroot with libmpich-dev 5.0.2-2:

  Package mpi-c was not found in the pkg-config search path.
  Perhaps you should add the directory containing `mpi-c.pc'
  ...
  RayPlatform/RayPlatform/memory/DirtyBuffer.h:27:10: fatal error: mpi.h:
No such file or directory

d/rules gets the MPI flags from "pkg-config mpi-c". Only OpenMPI
registers the mpi-c.pc alternative. MPICH only registers mpi.pc (the
mpi-c/mpi-cxx/mpi-fort slaves are commented out in libmpich-dev.postinst).
Both register mpi.pc and the libmpi.so alternative.

The attached debdiff:

 - uses "pkg-config --cflags mpi" for the include path
 - links with -lmpi (the libmpi.so alternative) instead of
   "pkg-config --libs". mpich.pc's Libs: leaks MPICH's own build
   LDFLAGS. On Ubuntu, for example, that includes
   -Wl,--package-metadata for mpich, and the Ray binary ended up with
   mpich's package metadata note. On some architectures it also adds
   -lucc/-lze_loader/-lucp, which are not needed for linking ray.

Tested:
 - sid i386 (MPICH 5.0.2, ch3:nemesis): 2.3.1-9 FTBFS. With the patch
   it builds, Ray links libmpich.so.12, and the autopkgtest passes,
   including the "mpiexec -n 2" run.
 - Ubuntu (OpenMPI default on amd64): builds, links libmpi.so.40,
   autopkgtest passes. It also builds with the mpi alternative switched
   to MPICH.

The same change is being uploaded to Ubuntu, where the armhf build
failure blocks ray in -proposed.

Regards,
Sebastien

#1150815#8
Date:
2026-10-17 10:53:10 UTC
From:
To:
Hello,

Bug #1150815 in ray reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/med-team/ray/-/commit/6199468bebfb53ed03254bd913bd4f503c5cd207
------------------------------------------------------------------------
Fix FTBFS on amd64 (OpenMPI) and MPICH architectures

d/rules used 'pkg-config --libs mpi-c' which only OpenMPI registers, so
the build failed on architectures where the default MPI is MPICH
(armhf, i386) with 'mpi.h: No such file or directory' (Closes: #1150815).

The proposed fix in #1150815 switched to 'pkg-config --cflags mpi' plus
a bare '-lmpi'.  That still broke amd64: with OpenMPI's split library
layout the core symbols (e.g. ompi_mpi_byte) live in libopen_mpi, so a
bare -lmpi fails with 'DSO missing from command line'.

Query the generic 'mpi' pc file for the include path (both
implementations register it) and keep 'pkg-config --libs mpi-c'
(-> -lmpi -lopen_mpi) on OpenMPI, falling back to '-lmpi' on MPICH
where mpich.pc leaks MPICH's own build LDFLAGS.
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1150815

#1150815#15
Date:
2026-10-17 14:38:01 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
ray, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1150815@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Andreas Tille <tille@debian.org> (supplier of updated ray package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sat, 17 Oct 2026 15:09:56 +0200
Source: ray
Architecture: source
Version: 2.3.1-10
Distribution: unstable
Urgency: medium
Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
Changed-By: Andreas Tille <tille@debian.org>
Closes: 1150815
Changes:
 ray (2.3.1-10) unstable; urgency=medium
 .
   * d/rules: fix the FTBFS on architectures where the default MPI is
     MPICH (armhf, i386). (Closes: #1150815)
     - Query pkg-config for "mpi" instead of "mpi-c", which only OpenMPI
       registers, so mpi.h was not found with MPICH.
     - Link with -lmpi on MPICH instead of "pkg-config --libs", as
       mpich.pc leaks MPICH's own build LDFLAGS.
   * d/rules: keep using "pkg-config --libs mpi-c" on OpenMPI
     architectures (e.g. amd64).  It expands to -lmpi -lopen_mpi, and the
     latter is required with OpenMPI's split library layout (libmpi.so no
     longer contains the core symbols); a bare -lmpi fails there with
     "undefined reference to ompi_mpi_byte".
   * d/watch: version=5
   * Standards-Version: 4.7.4 (routine-update)
   * Reflow Uploaders field (cme)
   * Remove Priority field (cme)
   * Drop 'Rules-Requires-Root: no' from d/control (routine-update)
   * Reformat the Last-Update date as ISO YYYY-MM-DD.
   * Set upstream metadata fields: Archive, Bug-Database.
Checksums-Sha1:
 b7c8bcfa4a8405d78f0c5fa73b75e54a5ee52392 2127 ray_2.3.1-10.dsc
 2fcaf381ba74cd7f1b6294f06fc06bdf1effe687 213676 ray_2.3.1-10.debian.tar.xz
 008d51ed6b181693f6e9a8f4cfd7e3af87ff66b3 8890 ray_2.3.1-10_amd64.buildinfo
Checksums-Sha256:
 c7a90cb4c615f56bc49829b9f4170edc9e8b7fd9ee4c2f963420bcae1b676688 2127 ray_2.3.1-10.dsc
 ec41c9da5285c19eec157732cc3327cdc347ed2682acc673f2de3fd764dc3977 213676 ray_2.3.1-10.debian.tar.xz
 8a5eb2455756602e4eb8d0cf39642f79ec3daee8cbe45f0a9c487eb97a467fac 8890 ray_2.3.1-10_amd64.buildinfo
Files:
 e83978bc18234d813cbfc6061307385f 2127 science optional ray_2.3.1-10.dsc
 6c8e14ba0e2ed106f501172ec335bdfb 213676 science optional ray_2.3.1-10.debian.tar.xz
 5334ad9c6be8c764876a24fa6e3f524b 8890 science optional ray_2.3.1-10_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQJFBAEBCgAvFiEE8fAHMgoDVUHwpmPKV4oElNHGRtEFAmrTe+QRHHRpbGxlQGRl
Ymlhbi5vcmcACgkQV4oElNHGRtEh8g/8D9Uapy1EBObzoaV+T10nqbIMh+klqTDM
IIjqpzKkh1ccaWnUaqBe5IxG87FsaYRJN5lDkzc/HRj45ImbDAXSoA+xrxiPbj5d
C9F5ggkxQaecZC5+fIzZiX+118qhcXtV+I4fW7PSUEgNgy5f9k3op0peDh6xzzoM
4L5iC8f5W7MRWQBoMz8fMcO6XVhVjPYXXV31GFbf8eWO7yhsl0dPq07schLc5Upi
yKAIwC1iGrQqS9UTNecTxmi1sM+i59SK12S3KK1+70EkWohmJ5fmKeetpkkWzDtP
HT7WqA5U5kFHKok5cJMwzB/PbuSmofdqAjBjBhFoNqGoss1ktZpL/xr5QbIu8C5X
FNU1VQMC4sbernu0AaZAE3WFShIAopcjbV3zihi43DfZG5BJ6DzNL8b9r8uSQXvi
8rA/fWE0bru4qEJqfMJ/s11KuA+XA5oewAzg1WAFtmKOwf74PxfFMwTtTnA6BwFc
UE9T8CH0gjtl5TpyOT5pudxURxxuqhKzSpNaPJCo2D7wqhCqKo5FHp1AoBe4YqmF
YJEickryv/WPXqr8ArC9IxXF3XVhi7iIt6SZ17Qjpw6SxYLmPHmekkvk5P5dlZpf
iQo/vsShwLlhyGaQU6QSlxzD24horoc1qJ/A2lZ3vAhohO7bjsEaScDja+pOjyUr
/CWLRFb6ILc=
=mGjm
-----END PGP SIGNATURE-----