Bug#1097520: fixed in openmpi 5.0.8-8
Gilles Filippini
pini at debian.org
Fri Sep 5 18:08:09 BST 2025
Hi Alastair,
On Fri, 05 Sep 2025 15:36:44 +0000 Debian FTP Masters
<ftpmaster at ftp-master.debian.org> wrote:
> Source: openmpi
> Source-Version: 5.0.8-8
> Done: Alastair McKinstry <mckinstry at debian.org>
...
> Changes:
> openmpi (5.0.8-8) unstable; urgency=medium
> .
> * Fix hard-coded fortran mod directory in patch. Closes: #1097520
Please find attached a patch proposal to fix this hard-coded thing.
The patch is against 5.0.8-6 but should be easy to adapt to 5.0.8-8 :)
Best,
_g.
-------------- next part --------------
diff -Nru openmpi-5.0.8/debian/changelog openmpi-5.0.8/debian/changelog
--- openmpi-5.0.8/debian/changelog 2025-08-30 10:04:55.000000000 +0200
+++ openmpi-5.0.8/debian/changelog 2025-09-05 08:27:08.000000000 +0200
@@ -1,3 +1,10 @@
+openmpi (5.0.8-6.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Retrieve gfortran mod version dynamically (closes: #1097520)
+
+ -- Gilles Filippini <pini at debian.org> Fri, 05 Sep 2025 08:27:08 +0200
+
openmpi (5.0.8-6) unstable; urgency=medium
* Partial revert of 1107591 that breaks compilation
diff -Nru openmpi-5.0.8/debian/patches/gfortran_mod_version.patch openmpi-5.0.8/debian/patches/gfortran_mod_version.patch
--- openmpi-5.0.8/debian/patches/gfortran_mod_version.patch 1970-01-01 01:00:00.000000000 +0100
+++ openmpi-5.0.8/debian/patches/gfortran_mod_version.patch 2025-09-05 08:27:08.000000000 +0200
@@ -0,0 +1,16 @@
+Index: openmpi-5.0.8/configure.ac
+===================================================================
+--- openmpi-5.0.8.orig/configure.ac
++++ openmpi-5.0.8/configure.ac
+@@ -1529,6 +1529,11 @@ m4_ifdef([project_oshmem], [OSHMEM_CONFI
+
+ OPAL_CHECK_LIBNL_SUMMARY
+
++AC_MSG_CHECKING([gfortran mod version])
++GFORTRAN_MOD_VERSION=$($srcdir/debian/gfortran-mod-version.sh)
++AC_MSG_RESULT([$GFORTRAN_MOD_VERSION])
++AC_SUBST(GFORTRAN_MOD_VERSION)
++
+ # checkpoint results
+ AC_CACHE_SAVE
+
diff -Nru openmpi-5.0.8/debian/patches/mpifort.patch openmpi-5.0.8/debian/patches/mpifort.patch
--- openmpi-5.0.8/debian/patches/mpifort.patch 2025-08-30 10:04:55.000000000 +0200
+++ openmpi-5.0.8/debian/patches/mpifort.patch 2025-09-05 08:27:08.000000000 +0200
@@ -5,24 +5,25 @@
Forwarded: not-needed
---- a/ompi/tools/wrappers/mpifort-wrapper-data.txt.in
-+++ b/ompi/tools/wrappers/mpifort-wrapper-data.txt.in
-@@ -14,7 +14,7 @@
+Index: openmpi-5.0.8/ompi/tools/wrappers/mpifort-wrapper-data.txt.in
+===================================================================
+--- openmpi-5.0.8.orig/ompi/tools/wrappers/mpifort-wrapper-data.txt.in
++++ openmpi-5.0.8/ompi/tools/wrappers/mpifort-wrapper-data.txt.in
+@@ -14,7 +14,7 @@ compiler_flags_env=FCFLAGS
compiler=@FC@
preprocessor_flags=
compiler_flags_prefix=@OMPI_WRAPPER_FCFLAGS_PREFIX@
-compiler_flags=@OMPI_WRAPPER_FCFLAGS@
-+compiler_flags=-I${libdir}/../../fortran/gfortran-mod-15/openmpi -I${includedir}
++compiler_flags=-I${libdir}/../../fortran/gfortran-mod- at GFORTRAN_MOD_VERSION@/openmpi -I${includedir}
linker_flags=@OMPI_WRAPPER_FC_LDFLAGS@
linker_flags_static=@OMPI_WRAPPER_FC_LDFLAGS_STATIC@
libs=@OMPI_WRAPPER_FC_LIBS@
-@@ -22,5 +22,8 @@
+@@ -22,5 +22,8 @@ libs_static=@OMPI_WRAPPER_FC_LIBS_STATIC
dyn_lib_file=lib at OMPI_LIBMPI_NAME@. at OPAL_DYN_LIB_SUFFIX@
static_lib_file=lib at OMPI_LIBMPI_NAME@.a
required_file=@OMPI_WRAPPER_FORTRAN_REQUIRED_FILE@
+# The same includedir is used in mpif77 and mpif90; so link the mod files in there
+# but set fmoddir and use it where possible
-+fmoddir=${libdir}/../../fortran/gfortran-mod-15
++fmoddir=${libdir}/../../fortran/gfortran-mod- at GFORTRAN_MOD_VERSION@
includedir=${includedir}
--libdir=${libdir}
-+libdir=${libdir}
+ libdir=${libdir}
diff -Nru openmpi-5.0.8/debian/patches/pkg-config.patch openmpi-5.0.8/debian/patches/pkg-config.patch
--- openmpi-5.0.8/debian/patches/pkg-config.patch 2025-08-30 10:04:55.000000000 +0200
+++ openmpi-5.0.8/debian/patches/pkg-config.patch 2025-09-05 08:27:08.000000000 +0200
@@ -5,10 +5,10 @@
Last-Updated: 2024-11-15
Forwarded: not-needed
-Index: openmpi-5.0.5/ompi/tools/wrappers/ompi-fort.pc.in
+Index: openmpi-5.0.8/ompi/tools/wrappers/ompi-fort.pc.in
===================================================================
---- openmpi-5.0.5.orig/ompi/tools/wrappers/ompi-fort.pc.in
-+++ openmpi-5.0.5/ompi/tools/wrappers/ompi-fort.pc.in
+--- openmpi-5.0.8.orig/ompi/tools/wrappers/ompi-fort.pc.in
++++ openmpi-5.0.8/ompi/tools/wrappers/ompi-fort.pc.in
@@ -12,8 +12,12 @@ includedir=@includedir@
libdir=@libdir@
pkgincludedir=@opalincludedir@
@@ -22,13 +22,13 @@
+Libs: @OMPI_PC_FC_LIBS@
+Libs.private: @OMPI_PC_FC_LIBS_PRIVATE@
+
-+Cflags: -I${libdir}/../../fortran/gfortran-mod-15/openmpi @OMPI_PC_FC_CFLAGS@
++Cflags: -I${libdir}/../../fortran/gfortran-mod- at GFORTRAN_MOD_VERSION@/openmpi @OMPI_PC_FC_CFLAGS@
Requires: @OMPI_PC_MODULES@
Requires.private: @OMPI_PC_MODULES_PRIVATE@
-Index: openmpi-5.0.5/ompi/tools/wrappers/ompi.pc.in
+Index: openmpi-5.0.8/ompi/tools/wrappers/ompi.pc.in
===================================================================
---- openmpi-5.0.5.orig/ompi/tools/wrappers/ompi.pc.in
-+++ openmpi-5.0.5/ompi/tools/wrappers/ompi.pc.in
+--- openmpi-5.0.8.orig/ompi/tools/wrappers/ompi.pc.in
++++ openmpi-5.0.8/ompi/tools/wrappers/ompi.pc.in
@@ -12,8 +12,8 @@ includedir=@includedir@
libdir=@libdir@
pkgincludedir=@opalincludedir@
@@ -38,6 +38,6 @@
-Cflags: @OMPI_PC_CFLAGS@
+Libs: @OMPI_PC_FC_LIBS@
+Libs.private: @OMPI_PC_FC_LIBS_PRIVATE@
-+Cflags: -I${libdir}/../../fortran/gfortran-mod-15/openmpi @OMPI_PC_CFLAGS@
++Cflags: -I${libdir}/../../fortran/gfortran-mod- at GFORTRAN_MOD_VERSION@/openmpi @OMPI_PC_CFLAGS@
Requires: @OMPI_PC_MODULES@
Requires.private: @OMPI_PC_MODULES_PRIVATE@
diff -Nru openmpi-5.0.8/debian/patches/series openmpi-5.0.8/debian/patches/series
--- openmpi-5.0.8/debian/patches/series 2025-08-30 10:04:55.000000000 +0200
+++ openmpi-5.0.8/debian/patches/series 2025-09-05 08:27:08.000000000 +0200
@@ -1,3 +1,4 @@
+gfortran_mod_version.patch
pkg-config.patch
mpifort.patch
build_hurd
diff -Nru openmpi-5.0.8/debian/rules openmpi-5.0.8/debian/rules
--- openmpi-5.0.8/debian/rules 2025-08-30 10:04:55.000000000 +0200
+++ openmpi-5.0.8/debian/rules 2025-09-05 08:27:08.000000000 +0200
@@ -50,7 +50,7 @@
FLANG_VERSION=$(shell basename $(shell readlink /usr/bin/flang))
# GFORTRAN_VERSION:=$(shell basename $(shell readlink -f /usr/bin/gfortran))
-export GFORTRAN_MOD_VERSION=gfortran-mod-15
+GFORTRAN_MOD_VERSION=gfortran-mod-$(shell debian/gfortran-mod-version.sh)
FMODDIR:=/usr/lib/$(DEB_HOST_MULTIARCH)/fortran/$(GFORTRAN_MOD_VERSION)
# arch-neutral version we can put in openmpi-common configs
@@ -114,6 +114,7 @@
find . -name .dirstamp -delete
find . -type l -delete
find . -name '*.o' -delete
+ rm -f debian/gfortran_mod_version.*
override_dh_update_autotools_config:
(cd config && autom4te --language=m4sh opal_get_version.m4sh -o opal_get_version.sh)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20250905/2030320a/attachment.sig>
More information about the debian-science-maintainers
mailing list