Package: phyml
Version: 3:3.3.20220408-4
Tags: patch upstream
User: [email protected]
Usertags: ftcbfs

Hi,

I'm sorry for my earlier patch having broken phyml on 32bit
architectures. Reverting it was the right thing to do. Thanks for taking
that action.

Now of course we're back to phyml failing to cross build. I'm asking for
a compromise now. Rather than switch from mpicc to pkgconf, how about
trying pkgconf and falling back to mpicc?

 * When compiling for 64bit case, openmpi will provide mpi-c.pc, so
   that'll be used.
 * When compiling natively on 32bit, mpi-c.pc will be missing and mpicc
   will be used.
 * Cross compiling for 32bit will be broken.

I see two advantages here. One is that we can then generally test cross
building phyml and will see other possible regressions (on 64bit
architectures). The other is that I can use phyml as a test case for
sending patches to mpich.

The patch likely is not appropriate for trixie. How about adding it
early in forky?

Helmut
Author: Helmut Grohne <[email protected]>
Last-Update: 2025-05-27
Bug-Debian: https://bugs.debian.org/902433
Description: Use MPI_C to enable cross building

--- phyml-3.3.20220408.orig/configure.ac
+++ phyml-3.3.20220408/configure.ac
@@ -105,7 +105,8 @@
 AC_ARG_ENABLE([phyml-mpi],
               [AS_HELP_STRING([--enable-phyml-mpi],
                               [Compile with mpicc instead of gcc.])])
-AS_IF([test "x$enable_phyml_mpi" = "xyes"],[CC="mpicc"])
+AS_IF([test "x$enable_phyml_mpi" = "xyes"],
+      [PKG_CHECK_MODULES([MPI_C],[mpi-c],,[CC="mpicc"])])
 AS_IF([test "x$enable_phyml_mpi" = "xyes"],AC_DEFINE([MPI],[1],[MPI tag on]))
 AM_CONDITIONAL([WANT_MPI], [test "$enable_phyml_mpi" = yes])
 
--- phyml-3.3.20220408.orig/src/Makefile.am
+++ phyml-3.3.20220408/src/Makefile.am
@@ -187,7 +187,8 @@
 avx.c avx.h\
 ancestral.c ancestral.h\
 mpi_boot.c mpi_boot.h
-phyml_mpi_LDADD = -lm
+phyml_mpi_CFLAGS = $(MPI_C_CFLAGS)
+phyml_mpi_LDADD = -lm $(MPI_C_LIBS)
 else
 if WANT_WIN
 phyml_windows_SOURCES = main.c \

Reply via email to