Bug#984242: mpich: ftbfs with GCC-11

Sergio Durigan Junior sergiodj at debian.org
Wed Sep 1 22:13:59 BST 2021


Control: tags -1 + patch

On Wednesday, March 03 2021, Matthias Klose wrote:

> [This bug is not targeted to the upcoming bullseye release]
>
> Please keep this issue open in the bug tracker for the package it
> was filed for.  If a fix in another package is required, please
> file a bug for the other package (or clone), and add a block in this
> package. Please keep the issue open until the package can be built in
> a follow-up test rebuild.
>
> The package fails to build in a test rebuild on at least amd64 with
> gcc-11/g++-11, but succeeds to build with gcc-10/g++-10. The
> severity of this report will be raised before the bookworm release,
> so nothing has to be done for the bullseye release.
>
> The full build log can be found at:
> http://people.debian.org/~doko/logs/20210228/filtered/gcc11/mpich_3.4.1-3_unstable_gcc11.log
> The last lines of the build log are at the end of this report.
>
> To build with GCC 11, either set CC=gcc-11 CXX=g++-11 explicitly,
> or install the gcc, g++, gfortran, ... packages from experimental.
>
>   apt-get -t=experimental install g++ 
>
> Common build failures are new warnings resulting in build failures with
> -Werror turned on, or new/dropped symbols in Debian symbols files.
> For other C/C++ related build failures see the porting guide at
> http://gcc.gnu.org/gcc-11/porting_to.html
>
> GCC 11 defaults to the GNU++17 standard.  If your package installs
> header files in /usr/include, please don't work around C++17 issues
> by choosing a lower C++ standard for the package build, but fix these
> issues to build with the C++17 standard.

Here's a patch that fixes the issue.  It's been adopted by Ubuntu
Impish, which already ships with GCC 11.

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
https://sergiodj.net/

diff --git a/debian/changelog b/debian/changelog
index 570bae5de..06ccfe78b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+mpich (4.0~a1-2) UNRELEASED; urgency=medium
+
+  * d/rules: Make GF10_FLAGS become GF11_FLAGS, to account for GCC/GFortran 11.
+    (Closes: #984242)
+
+ -- Sergio Durigan Junior <sergiodj at debian.org>  Wed, 01 Sep 2021 17:10:26 -0400
+
 mpich (4.0~a1-1) experimental; urgency=medium
 
   * New upstream release
diff --git a/debian/rules b/debian/rules
index ee1fd67ae..f17911ea4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,15 +4,15 @@ export DH_VERBOSE=1
 
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
-GF10_FLAGS:=$(if $(filter $(shell readlink /usr/bin/gfortran), gfortran-10), \
+GF11_FLAGS:=$(if $(filter $(shell readlink /usr/bin/gfortran), gfortran-11), \
                  -fallow-invalid-boz -fallow-argument-mismatch, )
 
 export MPICHLIB_CPPFLAGS=$(shell dpkg-buildflags --get CPPFLAGS)
 export MPICHLIB_CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
 export MPICHLIB_CXXFLAGS=$(shell dpkg-buildflags --get CXXFLAGS)
-export MPICHLIB_FFLAGS=$(shell dpkg-buildflags --get FFLAGS) $(GF10_FLAGS)
-export MPICHLIB_FCFLAGS=$(shell dpkg-buildflags --get FFLAGS) -cpp $(GF10_FLAGS)
-export FFLAGS=$(shell dpkg-buildflags --get FFLAGS |  sed -e 's/-g //') $(GF10_FLAGS)
+export MPICHLIB_FFLAGS=$(shell dpkg-buildflags --get FFLAGS) $(GF11_FLAGS)
+export MPICHLIB_FCFLAGS=$(shell dpkg-buildflags --get FFLAGS) -cpp $(GF11_FLAGS)
+export FFLAGS=$(shell dpkg-buildflags --get FFLAGS |  sed -e 's/-g //') $(GF11_FLAGS)
 export F77=f77
 export TZ=UTC+0
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20210901/7224e4c8/attachment.sig>


More information about the debian-science-maintainers mailing list