Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock

Please unblock package mpich

It fixes building packages against mpich, see e.g. #924032.

unblock mpich/3.3-3

-- System Information:
Debian Release: 8.10
  APT prefers oldstable
  APT policy: (500, 'oldstable')
Architecture: i386 (i686)

Kernel: Linux 3.16.0-4-686-pae (SMP w/1 CPU core)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru mpich-3.3/debian/changelog mpich-3.3/debian/changelog
--- mpich-3.3/debian/changelog  2019-02-22 17:45:42.000000000 +0100
+++ mpich-3.3/debian/changelog  2019-03-18 09:31:47.000000000 +0100
@@ -1,3 +1,11 @@
+mpich (3.3-3) unstable; urgency=medium
+
+
+  * Patch from Ana Guerrero Lopez, Andreas Beckann to remove obsolete
+    GCC check. Closes: #807666, #924837.
+
+ -- Alastair McKinstry <mckins...@debian.org>  Mon, 18 Mar 2019 08:31:47 +0000
+
 mpich (3.3-2) unstable; urgency=medium

   * Use dh_fortran_mod to install Fortran mod files in $fmoddir/mpich.
diff -Nru mpich-3.3/debian/control mpich-3.3/debian/control
--- mpich-3.3/debian/control    2019-02-22 17:45:42.000000000 +0100
+++ mpich-3.3/debian/control    2019-03-18 09:31:47.000000000 +0100
@@ -38,7 +38,10 @@
 Fortran-Mod: ${Fortran-Mod}
 Breaks: libmpl-dev,
         libopa-dev,
-        libmpich2-dev
+        libmpich2-dev,
+        libopenmpi-dev (<< 3.0.1~rc1-2),
+        openmpi-bin (<< 3.0.1~rc1-2),
+        lam4-dev (<< 7.1.4-3.2),
 Replaces: libmpl-dev,
           libopa-dev,
           libmpich2-dev
@@ -89,7 +92,10 @@
 Suggests: mpich-doc (= ${source:Version})
 Breaks: mpich-bin,
         mpich2,
-       libmpich-dev ( << 3.3~b2-3~)
+        libmpich-dev ( << 3.3~b2-3~),
+        libopenmpi-dev (<< 3.0.1~rc1-2),
+        openmpi-bin (<< 3.0.1~rc1-2),
+        lam4-dev (<< 7.1.4-3.2),
 Replaces: mpich-bin,
           mpich2,
          libmpich-dev ( << 3.3~b2-3~)
diff -Nru mpich-3.3/debian/libmpich-dev.postinst.in 
mpich-3.3/debian/libmpich-dev.postinst.in
--- mpich-3.3/debian/libmpich-dev.postinst.in   2019-02-22 17:45:42.000000000 
+0100
+++ mpich-3.3/debian/libmpich-dev.postinst.in   2019-03-18 09:31:47.000000000 
+0100
@@ -5,7 +5,7 @@
 # lib*.so files, which depends on the multiarch triplet. This can be gotten
 # from dpkg-architecture, but to avoid dependence on dpkg-dev, we instead
 # determine it at package build-time, and include a processed version of this
-# file as the libmpich-dev.postinst, where the variable triplet has been 
replaced
+# file as the libmpich-dev.postinst, where the variable TRIPLET has been 
replaced
 # by its appropriate value, depending on the build host architecture.

 set -e
@@ -27,5 +27,6 @@

 fi

+
 #DEBHELPER#

diff -Nru mpich-3.3/debian/libmpich-dev.preinst.in 
mpich-3.3/debian/libmpich-dev.preinst.in
--- mpich-3.3/debian/libmpich-dev.preinst.in    2019-02-22 17:45:42.000000000 
+0100
+++ mpich-3.3/debian/libmpich-dev.preinst.in    2019-03-18 09:31:47.000000000 
+0100
@@ -2,10 +2,58 @@

 set -e

-# Splitting mpi and mpi-$MULTIARCH  requires this
-if [ ! -z "$(update-alternatives --query mpi 2> /dev/null | grep --silent 
mpi-fort.pc)" ]; then
-    update-alternatives --quiet --remove-all mpi >/dev/null 2>&1
-    update-alternatives --quiet --remove-all mpi-TRIPLET >/dev/null 2>&1
+remove_corrupt_alternative()
+{
+       local alt=$1
+
+       if [ -f /var/lib/dpkg/alternatives/$alt ] && \
+               ! update-alternatives --query $alt >/dev/null 2>&1
+       then
+               # file exists, but query failed? likely corrupt!
+               echo "Removing corrupt alternative(s) '$alt'"
+               update-alternatives --remove-all $alt >/dev/null 2>&1 || \
+                       rm -fv /var/lib/dpkg/alternatives/$alt
+       fi
+}
+
+remove_obsolete_alternative()
+{
+       local alt=$1
+
+       remove_corrupt_alternative $alt
+
+       if update-alternatives --query $alt >/dev/null 2>&1
+       then
+               echo "Removing obsolete alternative(s) '$alt'"
+               update-alternatives --remove-all $alt
+       fi
+}
+
+if [ "$1" = "install" ] || [ "$1" = "upgrade" ]; then
+
+       if dpkg --compare-versions "$2" lt "3.3-2~" ; then
+
+               # Recover from historically grown corruption (#912437)
+               remove_corrupt_alternative mpi
+               remove_corrupt_alternative mpi-TRIPLET
+
+               # mpicc seemed to be used as a master alternative by some MPI 
package. But
+               # currently, all MPI packages have the mpicc alternative 
installed as a slave
+               # link. We remove the link here in order to resolve bugs 
#531184 and #532910.
+               remove_obsolete_alternative mpicc
+
+               # Similarly, see #886644
+               remove_obsolete_alternative mpiCC
+
+               # Splitting mpi and mpi-$MULTIARCH requires this
+               if update-alternatives --query mpi 2>/dev/null | grep -q 
mpi-fort.pc ; then
+                       echo "Removing pre-multiarch 'mpi' alternative(s)"
+                       update-alternatives --remove-all mpi
+                       update-alternatives --remove-all mpi-TRIPLET 
2>/dev/null || true
+               fi
+
+       fi
+
 fi

 #DEBHELPER#
diff -Nru mpich-3.3/debian/libmpich-dev.prerm.in 
mpich-3.3/debian/libmpich-dev.prerm.in
--- mpich-3.3/debian/libmpich-dev.prerm.in      2019-02-22 17:45:42.000000000 
+0100
+++ mpich-3.3/debian/libmpich-dev.prerm.in      2019-03-18 09:31:47.000000000 
+0100
@@ -2,7 +2,10 @@

 set -e

-if [ "$1" != "upgrade" ]; then
+# do not touch the alternative while being deconfigured
+# this is a M-A:same package which gets regularily deconfigured
+# during upgrades if multiple architectures are installed
+if [ "$1" = "remove" ]; then
        update-alternatives --remove mpi-TRIPLET /usr/include/TRIPLET/mpich
 fi

diff -Nru mpich-3.3/debian/mpich.postinst mpich-3.3/debian/mpich.postinst
--- mpich-3.3/debian/mpich.postinst     2019-02-22 17:45:42.000000000 +0100
+++ mpich-3.3/debian/mpich.postinst     2019-03-18 09:31:47.000000000 +0100
@@ -2,27 +2,15 @@

 set -e

-case "$1" in
-   configure)
-      # Continue below
-      ;;
-   abort-upgrade|abort-remove|abort-deconfigure)
-      exit 0;
-      ;;
-   *)
-      echo "postinst called with unknown argument \`$1'" >&2
-      exit 0;
-      ;;
-esac
+if [ "$1" = "configure" ]; then

-# so, we are running with $1 = configure
 # mpich2 versions before 1.2.1~rc1-1 were using two alternatives where other
 # MPI implementations were using only one, which breaks. Clean up
 # our mess.
 if [ "$2" != "" ] && dpkg --compare-versions "$2" le "1.2.1~rc1-1"; then
     update-alternatives --remove mpiexec /usr/bin/mpiexec.mpich2
 fi
-if update-alternatives --list mpiexec > /dev/null 2>&1; then
+if update-alternatives --list mpiexec >/dev/null 2>&1; then
     # OK, that case sucks. Apparently, we still have a mpiexec alternative, 
maybe
     # from a different package (like openmpi). In that case, the only thing we
     # can do is --remove-all...
@@ -51,5 +39,5 @@
        --slave /usr/bin/mpiexec mpiexec /usr/bin/mpiexec.mpich \
        --slave /usr/share/man/man1/mpiexec.1.gz mpiexec.1.gz 
/usr/share/man/man1/mpiexec.mpich.1.gz

-#DEBHELPER#
+fi

diff -Nru mpich-3.3/debian/mpich.prerm mpich-3.3/debian/mpich.prerm
--- mpich-3.3/debian/mpich.prerm        2019-02-22 17:45:42.000000000 +0100
+++ mpich-3.3/debian/mpich.prerm        2019-03-18 09:31:47.000000000 +0100
@@ -2,7 +2,7 @@

 set -e

-if [ "$1" != "upgrade" ]; then
+if [ "$1" = "remove" ] || [ "$1" = "deconfigure" ]; then
        update-alternatives --remove mpirun /usr/bin/mpirun.mpich
        update-alternatives --remove mpi /usr/bin/mpicc.mpich
 fi
diff -Nru mpich-3.3/debian/patches/0001-Remove-obsolete-GCC-check.patch 
mpich-3.3/debian/patches/0001-Remove-obsolete-GCC-check.patch
--- mpich-3.3/debian/patches/0001-Remove-obsolete-GCC-check.patch       
1970-01-01 01:00:00.000000000 +0100
+++ mpich-3.3/debian/patches/0001-Remove-obsolete-GCC-check.patch       
2019-03-18 09:31:47.000000000 +0100
@@ -0,0 +1,49 @@
+>From 43a4b31ecb6a6a13b09f42b5ecef98e40ab31123 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ana=20Guerrero=20L=C3=B3pez?= <aguerr...@suse.com>
+Date: Thu, 14 Mar 2019 16:12:56 +0100
+Subject: [PATCH] Remove obsolete GCC check
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This check was added due to a problem with GCC 3 and currently
+MPICH supports GCC >= 4.1
+Keeping this code around forces to rebuild mpich every time there
+is a new minor version of GCC. Even when it shouldn't be a problem
+using different GCC minor versions belonging to the same release
+series.
+
+Signed-off-by: Ana Guerrero López <aguerr...@suse.com>
+---
+ src/binding/cxx/buildiface | 15 ---------------
+ 1 file changed, 15 deletions(-)
+
+diff --git a/src/binding/cxx/buildiface b/src/binding/cxx/buildiface
+index 6c17990ae..52c224066 100755
+--- a/src/binding/cxx/buildiface
++++ b/src/binding/cxx/buildiface
+@@ -1454,21 +1454,6 @@ sub printDefineChecks {
+ #endif\n\n";
+     }
+
+-    # GCC changed the calling convention between 3.2.3 and 3.4.3 (!!!)
+-    # check for that
+-    print $OUTFD "
+-// Check for incompatible GCC versions
+-// GCC (specifically) g++ changed the calling convention
+-// between 3.2.3 and 3.4.3 (!!)  Normally such changes
+-// should only occur at major releases (e.g., version 3 to 4)
+-#ifdef __GNUC__
+-# if __GNUC__ >= \@GNUCXX_VERSION\@
+-#  if __GNUC_MINOR__ > 2 && \@GNUCXX_MINORVERSION\@ == 2
+-#  error 'Please use the same version of GCC and g++ for compiling MPICH and 
user MPI programs'
+-#  endif
+-# endif
+-#endif\n";
+-
+     print $OUTFD "
+ /*
+  * Because the API is defined, some methods have parameters that are
+--
+2.21.0
+
diff -Nru mpich-3.3/debian/patches/series mpich-3.3/debian/patches/series
--- mpich-3.3/debian/patches/series     2019-02-22 17:45:42.000000000 +0100
+++ mpich-3.3/debian/patches/series     2019-03-18 09:31:47.000000000 +0100
@@ -2,3 +2,4 @@
 10_gcc-check.patch
 pkgconfig.patch
 # fix-autogen-hwloc.patch
+0001-Remove-obsolete-GCC-check.patch

Reply via email to