Apply upstream PR 6946 to avoid linking private glibc symbol __mmap
Add build deps to run upstream autogen.pl Remove embedded tabs in the spec
This commit is contained in:
parent
7231dd36d0
commit
04d8899582
46
6946.patch
Normal file
46
6946.patch
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
From fbbacc1303f02b4c955975911b82e8755ea0721c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Harumi Kuno <harumi.kuno@hpe.com>
|
||||||
|
Date: Tue, 30 Jul 2019 06:32:27 -0700
|
||||||
|
Subject: [PATCH] Fix mmap infinite recurse in memory patcher
|
||||||
|
|
||||||
|
This commit fixes issue #6853 by removing
|
||||||
|
MacOS/Darwin-specific logic from intercept_mmap.
|
||||||
|
|
||||||
|
Signed-off-by: Harumi Kuno <harumi.kuno@hpe.com>
|
||||||
|
---
|
||||||
|
opal/mca/memory/patcher/configure.m4 | 4 ----
|
||||||
|
opal/mca/memory/patcher/memory_patcher_component.c | 5 -----
|
||||||
|
2 files changed, 9 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/opal/mca/memory/patcher/configure.m4 b/opal/mca/memory/patcher/configure.m4
|
||||||
|
index 6881ec69366..0c5d8553259 100644
|
||||||
|
--- a/opal/mca/memory/patcher/configure.m4
|
||||||
|
+++ b/opal/mca/memory/patcher/configure.m4
|
||||||
|
@@ -40,10 +40,6 @@ AC_DEFUN([MCA_opal_memory_patcher_CONFIG],[
|
||||||
|
|
||||||
|
AC_CHECK_HEADERS([linux/mman.h sys/syscall.h])
|
||||||
|
|
||||||
|
- AC_CHECK_DECLS([__mmap], [], [], [#include <sys/mman.h>])
|
||||||
|
-
|
||||||
|
- AC_CHECK_FUNCS([__mmap])
|
||||||
|
-
|
||||||
|
AC_CHECK_DECLS([__syscall], [], [], [#include <sys/syscall.h>])
|
||||||
|
|
||||||
|
AC_CHECK_FUNCS([__syscall])
|
||||||
|
diff --git a/opal/mca/memory/patcher/memory_patcher_component.c b/opal/mca/memory/patcher/memory_patcher_component.c
|
||||||
|
index 5db3a6016f8..687d430fa36 100644
|
||||||
|
--- a/opal/mca/memory/patcher/memory_patcher_component.c
|
||||||
|
+++ b/opal/mca/memory/patcher/memory_patcher_component.c
|
||||||
|
@@ -125,12 +125,7 @@ static void *_intercept_mmap(void *start, size_t length, int prot, int flags, in
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!original_mmap) {
|
||||||
|
-#ifdef HAVE___MMAP
|
||||||
|
- /* the darwin syscall returns an int not a long so call the underlying __mmap function */
|
||||||
|
- result = __mmap (start, length, prot, flags, fd, offset);
|
||||||
|
-#else
|
||||||
|
result = (void*)(intptr_t) memory_patcher_syscall(SYS_mmap, start, length, prot, flags, fd, offset);
|
||||||
|
-#endif
|
||||||
|
} else {
|
||||||
|
result = original_mmap (start, length, prot, flags, fd, offset);
|
||||||
|
}
|
116
openmpi.spec
116
openmpi.spec
@ -30,71 +30,77 @@
|
|||||||
%bcond_with ucx
|
%bcond_with ucx
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: openmpi%{?_cc_name_suffix}
|
Name: openmpi%{?_cc_name_suffix}
|
||||||
Version: 4.0.2
|
Version: 4.0.2
|
||||||
Release: 0.1.rc1%{?dist}
|
Release: 0.2.rc1%{?dist}
|
||||||
Summary: Open Message Passing Interface
|
Summary: Open Message Passing Interface
|
||||||
License: BSD and MIT and Romio
|
License: BSD and MIT and Romio
|
||||||
URL: http://www.open-mpi.org/
|
URL: http://www.open-mpi.org/
|
||||||
|
|
||||||
# We can't use %%{name} here because of _cc_name_suffix
|
# We can't use %%{name} here because of _cc_name_suffix
|
||||||
Source0: https://www.open-mpi.org/software/ompi/v4.0/downloads/openmpi-%{version}rc1.tar.bz2
|
Source0: https://www.open-mpi.org/software/ompi/v4.0/downloads/openmpi-%{version}rc1.tar.bz2
|
||||||
Source1: openmpi.module.in
|
Source1: openmpi.module.in
|
||||||
Source2: openmpi.pth.py2
|
Source2: openmpi.pth.py2
|
||||||
Source3: openmpi.pth.py3
|
Source3: openmpi.pth.py3
|
||||||
Source4: macros.openmpi
|
Source4: macros.openmpi
|
||||||
|
# Upstream PR 6946 to avoid linking private glibc symbol __mmap
|
||||||
|
Patch0: https://patch-diff.githubusercontent.com/raw/open-mpi/ompi/pull/6946.patch
|
||||||
|
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: autoconf
|
||||||
BuildRequires: gcc-gfortran
|
BuildRequires: automake
|
||||||
BuildRequires: valgrind-devel
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: gcc-gfortran
|
||||||
|
BuildRequires: libtool
|
||||||
|
BuildRequires: valgrind-devel
|
||||||
%ifnarch %{arm}
|
%ifnarch %{arm}
|
||||||
BuildRequires: opensm-devel > 3.3.0
|
BuildRequires: opensm-devel > 3.3.0
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: rdma-core-devel
|
BuildRequires: rdma-core-devel
|
||||||
# Doesn't compile:
|
# Doesn't compile:
|
||||||
# vt_dyn.cc:958:28: error: 'class BPatch_basicBlockLoop' has no member named 'getLoopHead'
|
# vt_dyn.cc:958:28: error: 'class BPatch_basicBlockLoop' has no member named 'getLoopHead'
|
||||||
# loop->getLoopHead()->getStartAddress(), loop_stmts );
|
# loop->getLoopHead()->getStartAddress(), loop_stmts );
|
||||||
#BuildRequires: dyninst-devel
|
#BuildRequires: dyninst-devel
|
||||||
BuildRequires: hwloc-devel
|
BuildRequires: hwloc-devel
|
||||||
# So configure can find lstopo
|
# So configure can find lstopo
|
||||||
BuildRequires: hwloc-gui
|
BuildRequires: hwloc-gui
|
||||||
BuildRequires: java-devel
|
BuildRequires: java-devel
|
||||||
# Old libevent causes issues
|
# Old libevent causes issues
|
||||||
%if !0%{?el7}
|
%if !0%{?el7}
|
||||||
BuildRequires: libevent-devel
|
BuildRequires: libevent-devel
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: libfabric-devel
|
BuildRequires: libfabric-devel
|
||||||
%ifnarch s390 s390x
|
%ifnarch s390 s390x
|
||||||
BuildRequires: papi-devel
|
BuildRequires: papi-devel
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: orangefs-devel
|
BuildRequires: orangefs-devel
|
||||||
BuildRequires: perl-generators
|
BuildRequires: perl-generators
|
||||||
BuildRequires: perl(Getopt::Long)
|
BuildRequires: perl-interpreter
|
||||||
BuildRequires: pmix-devel
|
BuildRequires: perl(Getopt::Long)
|
||||||
BuildRequires: python2
|
BuildRequires: pmix-devel
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2
|
||||||
BuildRequires: python%{python3_pkgversion}-devel
|
BuildRequires: python2-devel
|
||||||
|
BuildRequires: python%{python3_pkgversion}-devel
|
||||||
%ifarch x86_64
|
%ifarch x86_64
|
||||||
BuildRequires: infinipath-psm-devel
|
BuildRequires: infinipath-psm-devel
|
||||||
BuildRequires: libpsm2-devel
|
BuildRequires: libpsm2-devel
|
||||||
%endif
|
%endif
|
||||||
%if %{with ucx}
|
%if %{with ucx}
|
||||||
BuildRequires: ucx-devel
|
BuildRequires: ucx-devel
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
%if !0%{?el7}
|
%if !0%{?el7}
|
||||||
BuildRequires: rpm-mpi-hooks
|
BuildRequires: rpm-mpi-hooks
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Provides: mpi
|
Provides: mpi
|
||||||
%if 0%{?rhel}
|
%if 0%{?rhel}
|
||||||
# Need this for /etc/profile.d/modules.sh
|
# Need this for /etc/profile.d/modules.sh
|
||||||
Requires: environment-modules
|
Requires: environment-modules
|
||||||
%endif
|
%endif
|
||||||
Requires: environment(modules)
|
Requires: environment(modules)
|
||||||
# openmpi currently requires ssh to run
|
# openmpi currently requires ssh to run
|
||||||
# https://svn.open-mpi.org/trac/ompi/ticket/4228
|
# https://svn.open-mpi.org/trac/ompi/ticket/4228
|
||||||
Requires: openssh-clients
|
Requires: openssh-clients
|
||||||
|
|
||||||
# Private openmpi libraries
|
# Private openmpi libraries
|
||||||
%global __provides_exclude_from %{_libdir}/openmpi/lib/(lib(mca|ompi|open-(pal|rte|trace))|openmpi/).*.so
|
%global __provides_exclude_from %{_libdir}/openmpi/lib/(lib(mca|ompi|open-(pal|rte|trace))|openmpi/).*.so
|
||||||
@ -125,21 +131,21 @@ Requires: (python(abi) = %{python3_version} if python3)
|
|||||||
Contains development headers and libraries for openmpi.
|
Contains development headers and libraries for openmpi.
|
||||||
|
|
||||||
%package java
|
%package java
|
||||||
Summary: Java library
|
Summary: Java library
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
%if 0%{?fedora} >= 20 || 0%{?rhel} >= 7
|
%if 0%{?fedora} >= 20 || 0%{?rhel} >= 7
|
||||||
Requires: java-headless
|
Requires: java-headless
|
||||||
%else
|
%else
|
||||||
Requires: java
|
Requires: java
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%description java
|
%description java
|
||||||
Java library.
|
Java library.
|
||||||
|
|
||||||
%package java-devel
|
%package java-devel
|
||||||
Summary: Java development files for openmpi
|
Summary: Java development files for openmpi
|
||||||
Requires: %{name}-java = %{version}-%{release}
|
Requires: %{name}-java = %{version}-%{release}
|
||||||
Requires: java-devel
|
Requires: java-devel
|
||||||
|
|
||||||
%description java-devel
|
%description java-devel
|
||||||
Contains development wrapper for compiling Java with openmpi.
|
Contains development wrapper for compiling Java with openmpi.
|
||||||
@ -149,17 +155,17 @@ Contains development wrapper for compiling Java with openmpi.
|
|||||||
%global namearch openmpi-%{_arch}%{?_cc_name_suffix}
|
%global namearch openmpi-%{_arch}%{?_cc_name_suffix}
|
||||||
|
|
||||||
%package -n python2-openmpi
|
%package -n python2-openmpi
|
||||||
Summary: OpenMPI support for Python 2
|
Summary: OpenMPI support for Python 2
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
Requires: python(abi) = %{python2_version}
|
Requires: python(abi) = %{python2_version}
|
||||||
|
|
||||||
%description -n python2-openmpi
|
%description -n python2-openmpi
|
||||||
OpenMPI support for Python 2.
|
OpenMPI support for Python 2.
|
||||||
|
|
||||||
%package -n python%{python3_pkgversion}-openmpi
|
%package -n python%{python3_pkgversion}-openmpi
|
||||||
Summary: OpenMPI support for Python 3
|
Summary: OpenMPI support for Python 3
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
Requires: python(abi) = %{python3_version}
|
Requires: python(abi) = %{python3_version}
|
||||||
|
|
||||||
%description -n python%{python3_pkgversion}-openmpi
|
%description -n python%{python3_pkgversion}-openmpi
|
||||||
OpenMPI support for Python 3.
|
OpenMPI support for Python 3.
|
||||||
@ -169,6 +175,7 @@ OpenMPI support for Python 3.
|
|||||||
%autosetup -p1 -n openmpi-%{version}rc1
|
%autosetup -p1 -n openmpi-%{version}rc1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
./autogen.pl --force
|
||||||
./configure --prefix=%{_libdir}/%{name} \
|
./configure --prefix=%{_libdir}/%{name} \
|
||||||
--mandir=%{_mandir}/%{namearch} \
|
--mandir=%{_mandir}/%{namearch} \
|
||||||
--includedir=%{_includedir}/%{namearch} \
|
--includedir=%{_includedir}/%{namearch} \
|
||||||
@ -347,6 +354,11 @@ make check
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Aug 30 2019 Philip Kovacs <pkdevel@yahoo.com> - 4.0.2-0.2.rc1
|
||||||
|
- Apply upstream PR 6946 to avoid linking private glibc symbol __mmap
|
||||||
|
- Add build deps to run upstream autogen.pl
|
||||||
|
- Remove embedded tabs in the spec
|
||||||
|
|
||||||
* Thu Aug 29 2019 Philip Kovacs <pkdevel@yahoo.com> - 4.0.2-0.1.rc1
|
* Thu Aug 29 2019 Philip Kovacs <pkdevel@yahoo.com> - 4.0.2-0.1.rc1
|
||||||
- Update to 4.0.2rc1
|
- Update to 4.0.2rc1
|
||||||
- Closes bug #1746564
|
- Closes bug #1746564
|
||||||
|
Loading…
Reference in New Issue
Block a user