Compare commits

...

No commits in common. "c8" and "c9-beta" have entirely different histories.
c8 ... c9-beta

7 changed files with 116 additions and 477 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/mpich-3.4.2.tar.gz
SOURCES/mpich-4.1.1.tar.gz

View File

@ -1 +1 @@
5843e96ee87061297bd59f0511f864b5f63b91e1 SOURCES/mpich-3.4.2.tar.gz
9ac613543e9b53d278196339674499ca71914283 SOURCES/mpich-4.1.1.tar.gz

View File

@ -1,268 +0,0 @@
From 6c286621ff551eed1dca5afaf08aeaa41eabd96d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 30 Jan 2021 13:05:26 +0100
Subject: [PATCH] Revert "Remove use of vasprintf"
This reverts commit 1f0713f80303154d07d9221a7398b6fbc5c0fa6d.
$ valgrind ./modules/json-c/tests/test_json_pointer
==56== Memcheck, a memory error detector
==56== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==56== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info
==56== Command: ./modules/json-c/tests/test_json_pointer
==56==
PASSED - GET - LOADED TEST JSON
{ "foo": [ "bar", "baz" ], "": 0, "a\/b": 1, "c%d": 2, "e^f": 3, "g|h": 4, "i\\j": 5, "k\"l": 6, " ": 7, "m~n": 8 }
PASSED - GET - ENTIRE OBJECT WORKED
PASSED - GET - /foo == ['bar', 'baz']
PASSED - GET - /foo/0 == 'bar'
PASSED - GET - / == 0
PASSED - GET - /a~1b == 1
PASSED - GET - /c%d == 2
PASSED - GET - /e^f == 3
PASSED - GET - /g|h == 4
PASSED - GET - /i\j == 5
PASSED - GET - /k"l == 6
PASSED - GET - / == 7
PASSED - GET - /m~0n == 8
PASSED - GET - LOADED TEST JSON
{ "foo": [ "bar", "baz" ], "": 0, "a\/b": 1, "c%d": 2, "e^f": 3, "g|h": 4, "i\\j": 5, "k\"l": 6, " ": 7, "m~n": 8 }
PASSED - GET - MISSING /
PASSED - GET - NULL INPUTS
==56== Invalid write of size 1
==56== at 0x48D0F75: _IO_default_xsputn (in /usr/lib64/libc-2.32.9000.so)
==56== by 0x48B954F: __vfprintf_internal (in /usr/lib64/libc-2.32.9000.so)
==56== by 0x48C54F3: __vsprintf_internal (in /usr/lib64/libc-2.32.9000.so)
==56== by 0x110C34: UnknownInlinedFun (stdio2.h:52)
==56== by 0x110C34: json_vasprintf.constprop.0 (vasprintf_compat.h:34)
==56== by 0x110EBF: json_pointer_getf.constprop.0 (json_pointer.c:211)
==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199)
==56== by 0x10AAE7: main (test_json_pointer.c:314)
==56== Address 0x4a24a27 is 0 bytes after a block of size 7 alloc'd
==56== at 0x483C805: malloc (vg_replace_malloc.c:307)
==56== by 0x110C12: json_vasprintf.constprop.0 (vasprintf_compat.h:31)
==56== by 0x110EBF: json_pointer_getf.constprop.0 (json_pointer.c:211)
==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199)
==56== by 0x10AAE7: main (test_json_pointer.c:314)
==56==
==56== Invalid write of size 1
==56== at 0x48C54F9: __vsprintf_internal (in /usr/lib64/libc-2.32.9000.so)
==56== by 0x110C34: UnknownInlinedFun (stdio2.h:52)
==56== by 0x110C34: json_vasprintf.constprop.0 (vasprintf_compat.h:34)
==56== by 0x110EBF: json_pointer_getf.constprop.0 (json_pointer.c:211)
==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199)
==56== by 0x10AAE7: main (test_json_pointer.c:314)
==56== Address 0x4a24a29 is 2 bytes after a block of size 7 alloc'd
==56== at 0x483C805: malloc (vg_replace_malloc.c:307)
==56== by 0x110C12: json_vasprintf.constprop.0 (vasprintf_compat.h:31)
==56== by 0x110EBF: json_pointer_getf.constprop.0 (json_pointer.c:211)
==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199)
==56== by 0x10AAE7: main (test_json_pointer.c:314)
==56==
==56== Invalid read of size 1
==56== at 0x483F800: __strchr_sse2 (vg_replace_strmem.c:248)
==56== by 0x10CCDC: json_pointer_get_recursive (json_pointer.c:152)
==56== by 0x110F07: json_pointer_getf.constprop.0 (json_pointer.c:223)
==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199)
==56== by 0x10AAE7: main (test_json_pointer.c:314)
==56== Address 0x4a24a27 is 0 bytes after a block of size 7 alloc'd
==56== at 0x483C805: malloc (vg_replace_malloc.c:307)
==56== by 0x110C12: json_vasprintf.constprop.0 (vasprintf_compat.h:31)
==56== by 0x110EBF: json_pointer_getf.constprop.0 (json_pointer.c:211)
==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199)
==56== by 0x10AAE7: main (test_json_pointer.c:314)
==56==
==56== Invalid write of size 1
==56== at 0x10CCE5: json_pointer_get_recursive (json_pointer.c:154)
==56== by 0x110F07: json_pointer_getf.constprop.0 (json_pointer.c:223)
==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199)
==56== by 0x10AAE7: main (test_json_pointer.c:314)
==56== Address 0x4a24a27 is 0 bytes after a block of size 7 alloc'd
==56== at 0x483C805: malloc (vg_replace_malloc.c:307)
==56== by 0x110C12: json_vasprintf.constprop.0 (vasprintf_compat.h:31)
==56== by 0x110EBF: json_pointer_getf.constprop.0 (json_pointer.c:211)
==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199)
==56== by 0x10AAE7: main (test_json_pointer.c:314)
==56==
==56== Invalid read of size 1
==56== at 0x483FBE4: __strlen_sse2 (vg_replace_strmem.c:461)
==56== by 0x10CB0B: string_replace_all_occurrences_with_char (json_pointer.c:30)
==56== by 0x10CD47: UnknownInlinedFun (json_pointer.c:100)
==56== by 0x10CD47: json_pointer_get_recursive (json_pointer.c:157)
==56== by 0x110F07: json_pointer_getf.constprop.0 (json_pointer.c:223)
==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199)
==56== by 0x10AAE7: main (test_json_pointer.c:314)
==56== Address 0x4a24a27 is 0 bytes after a block of size 7 alloc'd
==56== at 0x483C805: malloc (vg_replace_malloc.c:307)
==56== by 0x110C12: json_vasprintf.constprop.0 (vasprintf_compat.h:31)
==56== by 0x110EBF: json_pointer_getf.constprop.0 (json_pointer.c:211)
==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199)
==56== by 0x10AAE7: main (test_json_pointer.c:314)
==56==
==56== Invalid read of size 1
==56== at 0x4844510: strstr (vg_replace_strmem.c:1642)
==56== by 0x10CB53: string_replace_all_occurrences_with_char (json_pointer.c:33)
==56== by 0x10CD47: UnknownInlinedFun (json_pointer.c:100)
==56== by 0x10CD47: json_pointer_get_recursive (json_pointer.c:157)
==56== by 0x110F07: json_pointer_getf.constprop.0 (json_pointer.c:223)
==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199)
==56== by 0x10AAE7: main (test_json_pointer.c:314)
==56== Address 0x4a24a27 is 0 bytes after a block of size 7 alloc'd
==56== at 0x483C805: malloc (vg_replace_malloc.c:307)
==56== by 0x110C12: json_vasprintf.constprop.0 (vasprintf_compat.h:31)
==56== by 0x110EBF: json_pointer_getf.constprop.0 (json_pointer.c:211)
==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199)
==56== by 0x10AAE7: main (test_json_pointer.c:314)
==56==
==56== Invalid read of size 1
==56== at 0x483FBE4: __strlen_sse2 (vg_replace_strmem.c:461)
==56== by 0x10CB0B: string_replace_all_occurrences_with_char (json_pointer.c:30)
==56== by 0x10CD5B: UnknownInlinedFun (json_pointer.c:101)
==56== by 0x10CD5B: json_pointer_get_recursive (json_pointer.c:157)
==56== by 0x110F07: json_pointer_getf.constprop.0 (json_pointer.c:223)
==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199)
==56== by 0x10AAE7: main (test_json_pointer.c:314)
==56== Address 0x4a24a27 is 0 bytes after a block of size 7 alloc'd
==56== at 0x483C805: malloc (vg_replace_malloc.c:307)
==56== by 0x110C12: json_vasprintf.constprop.0 (vasprintf_compat.h:31)
==56== by 0x110EBF: json_pointer_getf.constprop.0 (json_pointer.c:211)
==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199)
==56== by 0x10AAE7: main (test_json_pointer.c:314)
==56==
==56== Invalid read of size 1
==56== at 0x4844510: strstr (vg_replace_strmem.c:1642)
==56== by 0x10CB53: string_replace_all_occurrences_with_char (json_pointer.c:33)
==56== by 0x10CD5B: UnknownInlinedFun (json_pointer.c:101)
==56== by 0x10CD5B: json_pointer_get_recursive (json_pointer.c:157)
==56== by 0x110F07: json_pointer_getf.constprop.0 (json_pointer.c:223)
==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199)
==56== by 0x10AAE7: main (test_json_pointer.c:314)
==56== Address 0x4a24a27 is 0 bytes after a block of size 7 alloc'd
==56== at 0x483C805: malloc (vg_replace_malloc.c:307)
==56== by 0x110C12: json_vasprintf.constprop.0 (vasprintf_compat.h:31)
==56== by 0x110EBF: json_pointer_getf.constprop.0 (json_pointer.c:211)
==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199)
==56== by 0x10AAE7: main (test_json_pointer.c:314)
==56==
==56== Invalid read of size 1
==56== at 0x483FBE4: __strlen_sse2 (vg_replace_strmem.c:461)
==56== by 0x10DAD3: lh_char_hash (linkhash.c:480)
==56== by 0x10CDCA: UnknownInlinedFun (linkhash.h:346)
==56== by 0x10CDCA: UnknownInlinedFun (linkhash.c:625)
==56== by 0x10CDCA: UnknownInlinedFun (linkhash.c:630)
==56== by 0x10CDCA: UnknownInlinedFun (json_object.c:547)
==56== by 0x10CDCA: UnknownInlinedFun (json_object.c:535)
==56== by 0x10CDCA: UnknownInlinedFun (json_pointer.c:103)
==56== by 0x10CDCA: json_pointer_get_recursive (json_pointer.c:157)
==56== by 0x110F07: json_pointer_getf.constprop.0 (json_pointer.c:223)
==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199)
==56== by 0x10AAE7: main (test_json_pointer.c:314)
==56== Address 0x4a24a27 is 0 bytes after a block of size 7 alloc'd
==56== at 0x483C805: malloc (vg_replace_malloc.c:307)
==56== by 0x110C12: json_vasprintf.constprop.0 (vasprintf_compat.h:31)
==56== by 0x110EBF: json_pointer_getf.constprop.0 (json_pointer.c:211)
==56== by 0x10AAE7: UnknownInlinedFun (test_json_pointer.c:199)
==56== by 0x10AAE7: main (test_json_pointer.c:314)
==56==
test_json_pointer: test_json_pointer.c:200: test_wrong_inputs_get: Assertion `errno == EINVAL' failed.
==56==
==56== Process terminating with default action of signal 6 (SIGABRT)
==56== at 0x488A282: raise (in /usr/lib64/libc-2.32.9000.so)
==56== by 0x48738A3: abort (in /usr/lib64/libc-2.32.9000.so)
==56== by 0x4873788: __assert_fail_base.cold (in /usr/lib64/libc-2.32.9000.so)
==56== by 0x4882A05: __assert_fail (in /usr/lib64/libc-2.32.9000.so)
==56== by 0x10B8F8: UnknownInlinedFun (test_json_pointer.c:200)
==56== by 0x10B8F8: main (test_json_pointer.c:314)
==56==
==56== HEAP SUMMARY:
==56== in use at exit: 2,307 bytes in 29 blocks
==56== total heap usage: 130 allocs, 101 frees, 10,302 bytes allocated
==56==
==56== LEAK SUMMARY:
==56== definitely lost: 0 bytes in 0 blocks
==56== indirectly lost: 0 bytes in 0 blocks
==56== possibly lost: 0 bytes in 0 blocks
==56== still reachable: 2,307 bytes in 29 blocks
==56== suppressed: 0 bytes in 0 blocks
==56== Rerun with --leak-check=full to see details of leaked memory
==56==
==56== For lists of detected and suppressed errors, rerun with: -s
==56== ERROR SUMMARY: 10 errors from 9 contexts (suppressed: 0 from 0)
Aborted (core dumped)
---
configure.ac | 2 +-
json_pointer.c | 4 ++--
printbuf.c | 2 +-
vasprintf_compat.h | 4 +++-
4 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index 9eb80bcf1c..f61fcccf24 100644
--- a/modules/json-c/configure.ac
+++ b/modules/json-c/configure.ac
@@ -81,7 +81,7 @@ AS_IF([test "x$ac_cv___thread" != xno],
AC_FUNC_VPRINTF
AC_FUNC_MEMCMP
AC_CHECK_FUNCS([realloc])
-AC_CHECK_FUNCS(strcasecmp strdup strerror snprintf vsnprintf open strncasecmp setlocale)
+AC_CHECK_FUNCS(strcasecmp strdup strerror snprintf vsnprintf vasprintf open strncasecmp setlocale)
AC_CHECK_DECLS([INFINITY], [], [], [[#include <math.h>]])
AC_CHECK_DECLS([nan], [], [], [[#include <math.h>]])
AC_CHECK_DECLS([isnan], [], [], [[#include <math.h>]])
diff --git a/modules/json-c/json_pointer.c b/modules/json-c/json_pointer.c
index 3b43eb2f40..9531c036c8 100644
--- a/modules/json-c/json_pointer.c
+++ b/modules/json-c/json_pointer.c
@@ -208,7 +208,7 @@ int json_pointer_getf(struct json_object *obj, struct json_object **res, const c
}
va_start(args, path_fmt);
- rc = json_vasprintf(&path_copy, path_fmt, args);
+ rc = vasprintf(&path_copy, path_fmt, args);
va_end(args);
if (rc < 0)
@@ -287,7 +287,7 @@ int json_pointer_setf(struct json_object **obj, struct json_object *value, const
/* pass a working copy to the recursive call */
va_start(args, path_fmt);
- rc = json_vasprintf(&path_copy, path_fmt, args);
+ rc = vasprintf(&path_copy, path_fmt, args);
va_end(args);
if (rc < 0)
diff --git a/modules/json-c/printbuf.c b/modules/json-c/printbuf.c
index b326293b01..6c77b5defd 100644
--- a/modules/json-c/printbuf.c
+++ b/modules/json-c/printbuf.c
@@ -129,7 +129,7 @@ int sprintbuf(struct printbuf *p, const char *msg, ...)
would have been written - this code handles both cases. */
if(size == -1 || size > 127) {
va_start(ap, msg);
- if((size = json_vasprintf(&t, msg, ap)) < 0) { va_end(ap); return -1; }
+ if((size = vasprintf(&t, msg, ap)) < 0) { va_end(ap); return -1; }
va_end(ap);
printbuf_memappend(p, t, size);
free(t);
diff --git a/modules/json-c/vasprintf_compat.h b/modules/json-c/vasprintf_compat.h
index b57f30f64c..43dbf8939c 100644
--- a/modules/json-c/vasprintf_compat.h
+++ b/modules/json-c/vasprintf_compat.h
@@ -8,8 +8,9 @@
#include "snprintf_compat.h"
+#if !defined(HAVE_VASPRINTF)
/* CAW: compliant version of vasprintf */
-static int json_vasprintf(char **buf, const char *fmt, va_list ap)
+static int vasprintf(char **buf, const char *fmt, va_list ap)
{
#ifndef WIN32
static char _T_emptybuffer = '\0';
@@ -40,5 +41,6 @@ static int json_vasprintf(char **buf, const char *fmt, va_list ap)
return chars;
}
+#endif /* !HAVE_VASPRINTF */
#endif /* __vasprintf_compat_h */

View File

@ -1,160 +0,0 @@
diff -Naur mpich-3.3.2.orig/src/env/mpicc.bash.in mpich-3.3.2/src/env/mpicc.bash.in
--- mpich-3.3.2.orig/src/env/mpicc.bash.in 2020-08-06 00:42:51.089874000 +0000
+++ mpich-3.3.2/src/env/mpicc.bash.in 2020-08-06 00:49:34.849138000 +0000
@@ -214,13 +214,13 @@
fi
fi
-final_cflags="@MPICH_MPICC_CFLAGS@ @WRAPPER_CFLAGS@"
-final_cppflags="@MPICH_MPICC_CPPFLAGS@ @WRAPPER_CPPFLAGS@"
-final_ldflags="@MPICH_MPICC_LDFLAGS@ @WRAPPER_LDFLAGS@"
+final_cflags="@MPICH_MPICC_CFLAGS@ "
+final_cppflags="@MPICH_MPICC_CPPFLAGS@ "
+final_ldflags="@MPICH_MPICC_LDFLAGS@ "
final_libs="@MPICH_MPICC_LIBS@"
if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
final_ldflags="${final_ldflags} @LDFLAGS@"
- final_libs="${final_libs} @LIBS@ @WRAPPER_LIBS@"
+ final_libs="${final_libs} @LIBS@ "
fi
# -----------------------------------------------------------------------
diff -Naur mpich-3.3.2.orig/src/env/mpicc.sh.in mpich-3.3.2/src/env/mpicc.sh.in
--- mpich-3.3.2.orig/src/env/mpicc.sh.in 2020-08-06 00:42:51.090874000 +0000
+++ mpich-3.3.2/src/env/mpicc.sh.in 2020-08-06 00:49:34.849138000 +0000
@@ -223,13 +223,13 @@
fi
fi
-final_cflags="@MPICH_MPICC_CFLAGS@ @WRAPPER_CFLAGS@"
-final_cppflags="@MPICH_MPICC_CPPFLAGS@ @WRAPPER_CPPFLAGS@"
-final_ldflags="@MPICH_MPICC_LDFLAGS@ @WRAPPER_LDFLAGS@"
+final_cflags="@MPICH_MPICC_CFLAGS@ "
+final_cppflags="@MPICH_MPICC_CPPFLAGS@ "
+final_ldflags="@MPICH_MPICC_LDFLAGS@ "
final_libs="@MPICH_MPICC_LIBS@"
if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
final_ldflags="${final_ldflags} @LDFLAGS@"
- final_libs="${final_libs} @LIBS@ @WRAPPER_LIBS@"
+ final_libs="${final_libs} @LIBS@ "
fi
# -----------------------------------------------------------------------
diff -Naur mpich-3.3.2.orig/src/env/mpicxx.bash.in mpich-3.3.2/src/env/mpicxx.bash.in
--- mpich-3.3.2.orig/src/env/mpicxx.bash.in 2020-08-06 00:42:51.090874000 +0000
+++ mpich-3.3.2/src/env/mpicxx.bash.in 2020-08-06 00:49:34.849138000 +0000
@@ -220,13 +220,13 @@
fi
fi
-final_cxxflags="@MPICH_MPICXX_CXXFLAGS@ @WRAPPER_CXXFLAGS@"
-final_cppflags="@MPICH_MPICXX_CPPFLAGS@ @WRAPPER_CPPFLAGS@"
-final_ldflags="@MPICH_MPICXX_LDFLAGS@ @WRAPPER_LDFLAGS@"
+final_cxxflags="@MPICH_MPICXX_CXXFLAGS@ "
+final_cppflags="@MPICH_MPICXX_CPPFLAGS@ "
+final_ldflags="@MPICH_MPICXX_LDFLAGS@ "
final_libs="@MPICH_MPICXX_LIBS@"
if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
final_ldflags="${final_ldflags} @LDFLAGS@"
- final_libs="${final_libs} @LIBS@ @WRAPPER_LIBS@"
+ final_libs="${final_libs} @LIBS@ "
fi
# A temporary statement to invoke the compiler
diff -Naur mpich-3.3.2.orig/src/env/mpicxx.sh.in mpich-3.3.2/src/env/mpicxx.sh.in
--- mpich-3.3.2.orig/src/env/mpicxx.sh.in 2020-08-06 00:42:51.090874000 +0000
+++ mpich-3.3.2/src/env/mpicxx.sh.in 2020-08-06 00:49:34.850138000 +0000
@@ -229,13 +229,13 @@
fi
fi
-final_cxxflags="@MPICH_MPICXX_CXXFLAGS@ @WRAPPER_CXXFLAGS@"
-final_cppflags="@MPICH_MPICXX_CPPFLAGS@ @WRAPPER_CPPFLAGS@"
-final_ldflags="@MPICH_MPICXX_LDFLAGS@ @WRAPPER_LDFLAGS@"
+final_cxxflags="@MPICH_MPICXX_CXXFLAGS@ "
+final_cppflags="@MPICH_MPICXX_CPPFLAGS@ "
+final_ldflags="@MPICH_MPICXX_LDFLAGS@ "
final_libs="@MPICH_MPICXX_LIBS@"
if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
final_ldflags="${final_ldflags} @LDFLAGS@"
- final_libs="${final_libs} @LIBS@ @WRAPPER_LIBS@"
+ final_libs="${final_libs} @LIBS@ "
fi
# A temporary statement to invoke the compiler
diff -Naur mpich-3.3.2.orig/src/env/mpif77.bash.in mpich-3.3.2/src/env/mpif77.bash.in
--- mpich-3.3.2.orig/src/env/mpif77.bash.in 2020-08-06 00:42:51.090874000 +0000
+++ mpich-3.3.2/src/env/mpif77.bash.in 2020-08-06 00:49:34.852138000 +0000
@@ -272,12 +272,12 @@
fi
fi
-final_fflags="@MPICH_MPIF77_FFLAGS@ @WRAPPER_FFLAGS@"
-final_ldflags="@MPICH_MPIF77_LDFLAGS@ @WRAPPER_LDFLAGS@"
+final_fflags="@MPICH_MPIF77_FFLAGS@ "
+final_ldflags="@MPICH_MPIF77_LDFLAGS@ "
final_libs="@MPICH_MPIF77_LIBS@"
if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
final_ldflags="${final_ldflags} @LDFLAGS@"
- final_libs="${final_libs} @LIBS@ @WRAPPER_LIBS@"
+ final_libs="${final_libs} @LIBS@ "
fi
# A temporary statement to invoke the compiler
diff -Naur mpich-3.3.2.orig/src/env/mpif77.sh.in mpich-3.3.2/src/env/mpif77.sh.in
--- mpich-3.3.2.orig/src/env/mpif77.sh.in 2020-08-06 00:42:51.090874000 +0000
+++ mpich-3.3.2/src/env/mpif77.sh.in 2020-08-06 00:49:34.852138000 +0000
@@ -294,12 +294,12 @@
fi
fi
-final_fflags="@MPICH_MPIF77_FFLAGS@ @WRAPPER_FFLAGS@"
-final_ldflags="@MPICH_MPIF77_LDFLAGS@ @WRAPPER_LDFLAGS@"
+final_fflags="@MPICH_MPIF77_FFLAGS@ "
+final_ldflags="@MPICH_MPIF77_LDFLAGS@ "
final_libs="@MPICH_MPIF77_LIBS@"
if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
final_ldflags="${final_ldflags} @LDFLAGS@"
- final_libs="${final_libs} @LIBS@ @WRAPPER_LIBS@"
+ final_libs="${final_libs} @LIBS@ "
fi
# A temporary statement to invoke the compiler
diff -Naur mpich-3.3.2.orig/src/env/mpifort.bash.in mpich-3.3.2/src/env/mpifort.bash.in
--- mpich-3.3.2.orig/src/env/mpifort.bash.in 2020-08-06 00:42:51.090874000 +0000
+++ mpich-3.3.2/src/env/mpifort.bash.in 2020-08-06 00:49:34.854138000 +0000
@@ -313,12 +313,12 @@
FCMODDIRS="${FCMODINC}$modincdir"
fi
-final_fcflags="@MPICH_MPIFORT_FCFLAGS@ @WRAPPER_FCFLAGS@"
-final_ldflags="@MPICH_MPIFORT_LDFLAGS@ @WRAPPER_LDFLAGS@"
+final_fcflags="@MPICH_MPIFORT_FCFLAGS@ "
+final_ldflags="@MPICH_MPIFORT_LDFLAGS@ "
final_libs="@MPICH_MPIFORT_LIBS@"
if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
final_ldflags="${final_ldflags} @LDFLAGS@"
- final_libs="${final_libs} @LIBS@ @WRAPPER_LIBS@"
+ final_libs="${final_libs} @LIBS@ "
fi
# A temporary statement to invoke the compiler
diff -Naur mpich-3.3.2.orig/src/env/mpifort.sh.in mpich-3.3.2/src/env/mpifort.sh.in
--- mpich-3.3.2.orig/src/env/mpifort.sh.in 2020-08-06 00:42:51.090874000 +0000
+++ mpich-3.3.2/src/env/mpifort.sh.in 2020-08-06 00:49:34.854138000 +0000
@@ -330,12 +330,12 @@
FCMODDIRS="${FCMODINC}$modincdir"
fi
-final_fcflags="@MPICH_MPIFORT_FCFLAGS@ @WRAPPER_FCFLAGS@"
-final_ldflags="@MPICH_MPIFORT_LDFLAGS@ @WRAPPER_LDFLAGS@"
+final_fcflags="@MPICH_MPIFORT_FCFLAGS@ "
+final_ldflags="@MPICH_MPIFORT_LDFLAGS@ "
final_libs="@MPICH_MPIFORT_LIBS@"
if test "@INTERLIB_DEPS@" = "no" -o "${interlib_deps}" = "no" ; then
final_ldflags="${final_ldflags} @LDFLAGS@"
- final_libs="${final_libs} @LIBS@ @WRAPPER_LIBS@"
+ final_libs="${final_libs} @LIBS@ "
fi
# A temporary statement to invoke the compiler

View File

@ -16,8 +16,8 @@
+setenv MPI_INCLUDE @includedir@
+setenv MPI_LIB @libdir@
+setenv MPI_MAN @mandir@
+setenv MPI_PYTHON_SITEARCH @py3sitearch@/@MPINAME@
+setenv MPI_PYTHON2_SITEARCH @py3sitearch@/@MPINAME@
+setenv MPI_PYTHON_SITEARCH @py2sitearch@/@MPINAME@
+setenv MPI_PYTHON2_SITEARCH @py2sitearch@/@MPINAME@
+setenv MPI_PYTHON3_SITEARCH @py3sitearch@/@MPINAME@
+setenv MPI_COMPILER @MPINAME@-@ARCH@
+setenv MPI_SUFFIX _@MPINAME@

1
SOURCES/mpich.pth.py2 Normal file
View File

@ -0,0 +1 @@
import sys, os; s = os.getenv('MPI_PYTHON2_SITEARCH'); s and (s in sys.path or sys.path.append(s))

View File

@ -1,27 +1,22 @@
Summary: A high-performance implementation of MPI
Name: mpich
Version: 3.4.2
Version: 4.1.1
Release: 1%{?dist}
License: MIT
URL: https://www.mpich.org/
Source0: https://www.mpich.org/static/downloads/%{version}/%{name}-%{version}.tar.gz
Source1: mpich.macros
Source2: mpich.pth.py3
Source2: mpich.pth.py2
Source3: mpich.pth.py3
Patch0: mpich-modules.patch
Patch1: 0001-Drop-real128.patch
# Drop build flags, e.g. -specs... and -lto from mpi wrappers (mpicc and mpicxx)
# for discussion see:
# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/7TFWEKTDWBYBHEGMIWBVI3AVGORZGNBS/
Patch3: fix_wrapper_flags.patch
# https://github.com/pmodels/mpich/issues/4534
Patch4: 0001-Revert-Remove-use-of-vasprintf.patch
BuildRequires: make
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: gcc-gfortran
BuildRequires: hwloc-devel >= 2.2.0
BuildRequires: hwloc-devel >= 2.0
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
@ -34,6 +29,8 @@ BuildRequires: valgrind-devel
BuildRequires: python3-devel
BuildRequires: rpm-mpi-hooks
Provides: mpi
Provides: mpich2 = %{version}
Obsoletes: mpich2 < 3.0
Requires: environment(modules)
# Make sure this package is rebuilt with correct Python version when updating
@ -64,7 +61,9 @@ mpich-autoload package.
%package autoload
Summary: Load mpich automatically into profile
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: mpich = %{version}-%{release}
Provides: mpich2-autoload = 3.0.1
Obsoletes: mpich2-autoload < 3.0
%description autoload
This package contains profile files that make mpich automatically loaded.
@ -72,11 +71,13 @@ This package contains profile files that make mpich automatically loaded.
%package devel
Summary: Development files for mpich
Provides: %{name}-devel-static = %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig
Requires: gcc-gfortran
Requires: rpm-mpi-hooks
Requires: redhat-rpm-config
Provides: mpich2-devel = 3.0.1
Obsoletes: mpich2-devel < 3.0
%description devel
Contains development headers and libraries for mpich
@ -85,21 +86,22 @@ Contains development headers and libraries for mpich
Summary: Documentations and examples for mpich
BuildArch: noarch
Requires: %{name}-devel = %{version}-%{release}
Provides: mpich2-doc = 3.0.1
Obsoletes: mpich2-doc < 3.0
%description doc
Contains documentations, examples and man-pages for mpich
%package -n python3-mpich
Summary: mpich support for Python 3
Provides: python-mpich
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name} = %{version}-%{release}
Requires: python(abi) = %{python3_version}
%description -n python3-mpich
mpich support for Python 3.
%prep
%setup -q
%setup
%patch0 -p1
@ -107,10 +109,6 @@ mpich support for Python 3.
%patch1 -p1
%endif
%patch3 -p1
%patch4 -p1
%build
./autogen.sh
@ -135,7 +133,8 @@ CONFIGURE_OPTS=(
--with-hwloc-prefix=system
)
%configure "${CONFIGURE_OPTS[@]}"
# Set -fallow-argument-mismatch for #1795817
%configure "${CONFIGURE_OPTS[@]}" FFLAGS="$FFLAGS -fallow-argument-mismatch"
# Remove rpath
sed -r -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
@ -161,6 +160,7 @@ mkdir -p %{buildroot}%{_datadir}/modulefiles/mpi
sed -r 's|%{_bindir}|%{_libdir}/%{name}/bin|;
s|@LIBDIR@|%{_libdir}/%{name}|;
s|@MPINAME@|%{name}|;
s|@py2sitearch@|%{python2_sitearch}|;
s|@py3sitearch@|%{python3_sitearch}|;
s|@ARCH@|%{_arch}|;
s|@fortranmoddir@|%{_fmoddir}|;
@ -179,8 +179,10 @@ cp -p %{buildroot}%{_sysconfdir}/profile.d/mpich-%{_arch}.{sh,csh}
install -pDm0644 %{SOURCE1} %{buildroot}%{_rpmconfigdir}/macros.d/macros.%{name}
# Install the .pth files
mkdir -p %{buildroot}%{python2_sitearch}/%{name}
install -pDm0644 %{SOURCE2} %{buildroot}%{python2_sitearch}/%{name}.pth
mkdir -p %{buildroot}%{python3_sitearch}/%{name}
install -pDm0644 %{SOURCE2} %{buildroot}%{python3_sitearch}/%{name}.pth
install -pDm0644 %{SOURCE3} %{buildroot}%{python3_sitearch}/%{name}.pth
find %{buildroot} -type f -name "*.la" -delete
@ -239,38 +241,102 @@ make check VERBOSE=1 \
%{python3_sitearch}/%{name}.pth
%changelog
* Thu Dec 09 2021 Honggang Li <honli@redhat.com> - 3.4.2-1
- Update to latest upstream release 3.4.2
- Resolves: rhbz#2008515
* Sat Jun 03 2023 Kamal Heib <kheib@redhat.com> - 4.1.1-1
- Update to upstream release 4.1.1
- Resolves: rhbz#2212010
* Thu May 27 2021 Honggang Li <honli@redhat.com> - 3.4.1-1
- Sync with Fedora build
- Update to latest upstream release 3.4.1
- Resolves: rhbz#1960076
* Sat Nov 27 2021 Honggang Li <honli@redhat.com> - 3.4.2-1
- Update to latest version 3.4.2
- Related: rhbz#2015398
* Thu Oct 15 2020 Honggang Li <honli@redhat.com> - 3.3.2-9
- Fix a dependency typo
- Related: rhbz#1850080
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com>
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Thu Oct 15 2020 Honggang Li <honli@redhat.com> - 3.3.2-8
- Sync with Fedora build
- Update to latest upstream release 3.3.2
- Resolves: rhbz#1657316, rhbz#1732982, rhbz#1850080
* Fri Aug 6 2021 Florian Weimer <fweimer@redhat.com> - 3.4.1-3
- Rebuild to pick up new build flags from redhat-rpm-config (#1984652)
* Fri Sep 21 2018 Jarod Wilson <jarod@redhat.com> - 3.2.1-9
- Use proper distro compile flags throughout build
- Related: rhbz#1624144
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com>
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Thu Sep 13 2018 Jarod Wilson <jarod@redhat.com> - 3.2.1-8
- Remove python2 bits entirely, fix mpi lib dependencies
- Remove obsolete Provides/Obsoletes for mpich2
- Resolves: rhbz#1628628
* Wed Jan 27 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.4.1-1
- Update to latest version (#1912981)
* Fri Aug 3 2018 Florian Weimer <fweimer@redhat.com> - 3.2.1-7
- Honor %%{valgrind_arches}
* Tue Jan 5 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.4-1
- Update to latest version (#1912981)
* Thu May 17 2018 Charalampos Stratakis <cstratak@redhat.com> - 3.2.1-6
- Do not build the python2 subpackage on EL > 7
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.2-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Sep 15 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.3.2-8
- Do not require non-loopback addresses in mpirun (#1839007)
* Thu Aug 06 2020 Christoph Junghans <junghans@votca.org> - 3.3.2-7
- Drop build flag from mpi wrappers
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon May 25 2020 Miro Hrončok <mhroncok@redhat.com> - 3.3.2-5
- Rebuilt for Python 3.9
* Fri Feb 14 2020 Christoph Junghans <junghans@votca.org> - 3.3.2-4
- Add 4320.patch to fix #1793563 and #1799473
* Thu Jan 30 2020 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.3.2-3
- Add requirement for redhat-rpm-config (#1795674)
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sun Nov 17 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.3.2-1
- Subpackage python2-mpich has been removed (#1773126)
* Sun Nov 17 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.3.2-1
- Update to latest version (#1772152). This is a bugfix release:
https://github.com/pmodels/mpich/blob/v3.3.2/CHANGES.
* Wed Aug 28 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.3.1-1
- Really upgrade to 3.3.1 (#1745252)
* Sat Aug 24 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.2.1-1
- "Upgrade" back to 3.2.1 (#1745252)
(I made a typo, and instead of *upgrading* to 3.3.1, I made a downgrade
to 3.1.1. Too bad that we don't have *any* automatic check that would
warn about this in Fedora. Version 3.3.1 requires a newer hwloc, but
some of the dependencies are not ready to switch. So let's "upgrade"
back to 3.2.1, and plan to 3.3.1 next week.)
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 3.1.1-2
- Rebuilt for Python 3.8
* Tue Jul 30 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.1.1-1
- Update to latest version (#1718376)
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed May 8 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.2.1-12
- Require main package and appropriate python version from python subpackages
* Tue May 7 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.2.1-11
- Add a guard for python3 version (#1705296)
- Module files are moved to /usr/share/modulefiles/mpi/
* Tue May 7 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.2.1-10
- Drop all custom compilation and link flags (#1573088)
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 3.2.1-7
- Rebuilt for Python 3.7
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 3.2.1-6
- Rebuilt for Python 3.7
* Wed Apr 4 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.2.1-5
- Update MANPATH so that normal man pages can still be found (#1533717)