From b3acbb8af66a9dbf7b436e942cfa648d3ed5c65e Mon Sep 17 00:00:00 2001 From: chen-jan Date: Mon, 7 Aug 2023 11:19:23 +0800 Subject: [PATCH] fix build error && test error --- gromacs-gcc11.patch | 24 ++++++++++++++++++++++++ gromacs.spec | 10 +++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 gromacs-gcc11.patch diff --git a/gromacs-gcc11.patch b/gromacs-gcc11.patch new file mode 100644 index 0000000..a5153dd --- /dev/null +++ b/gromacs-gcc11.patch @@ -0,0 +1,24 @@ +diff --git a/src/gromacs/awh/biasparams.cpp b/src/gromacs/awh/biasparams.cpp +index f4db497..87e0a40 100644 +--- a/src/gromacs/awh/biasparams.cpp ++++ b/src/gromacs/awh/biasparams.cpp +@@ -47,6 +47,7 @@ + #include "biasparams.h" + + #include ++#include + + #include + +diff --git a/src/gromacs/mdrun/minimize.cpp b/src/gromacs/mdrun/minimize.cpp +index 8550271..d259b66 100644 +--- a/src/gromacs/mdrun/minimize.cpp ++++ b/src/gromacs/mdrun/minimize.cpp +@@ -49,6 +49,7 @@ + #include + #include + #include ++#include + + #include + #include diff --git a/gromacs.spec b/gromacs.spec index d40bae7..be32011 100644 --- a/gromacs.spec +++ b/gromacs.spec @@ -8,7 +8,7 @@ %endif Name: gromacs Version: 2019.3 -Release: 3 +Release: 4 Summary: Fast, Free and Flexible Molecular Dynamics License: GPLv2+ and ASL-2.0 and BSL-1.0 and MIT and LGPL-2.1 URL: http://www.gromacs.org @@ -17,6 +17,7 @@ Source1: https://ftp.gromacs.org/pub/manual/manual-%{version}.pdf Source2: https://ftp.gromacs.org/regressiontests/regressiontests-%{version}.tar.gz Patch0: gromacs-dssp-path.patch Patch1: gromacs-issue-2366.patch +Patch2: gromacs-gcc11.patch BuildRequires: gcc-c++ cmake3 >= 3.4.3 openblas-devel fftw-devel gsl-devel hwloc BuildRequires: hwloc-devel libX11-devel lmfit-devel >= 6.0 environment-modules BuildRequires: chrpath @@ -149,6 +150,7 @@ This package single and double precision binaries and libraries. %setup -q %{?SOURCE2:-a 2} -n gromacs-%{version}%{?_rc} %patch0 -p1 %patch1 -p1 +%patch2 -p1 install -Dpm644 %{SOURCE1} ./serial/docs/manual/gromacs.pdf rm -r src/external/{fftpack,tng_io,lmfit} sed -i 's/set(_timeout [0-9]*)/set(_timeout 900)/' src/testutils/TestMacros.cmake @@ -172,6 +174,7 @@ sed -i 's/set(_timeout [0-9]*)/set(_timeout 900)/' src/testutils/TestMacros.cmak %endif %global double -DGMX_DOUBLE:BOOL=ON %global mpi -DGMX_BUILD_MDRUN_ONLY:BOOL=ON -DGMX_MPI:BOOL=ON -DGMX_THREAD_MPI:BOOL=OFF -DGMX_DEFAULT_SUFFIX:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=OFF +. /etc/profile.d/modules.sh for p in '' _d ; do for mpi in '' mpich openmpi ; do test -n "${mpi}" && module load mpi/${mpi}-%{_arch} @@ -234,6 +237,7 @@ echo "%{_libdir}/openmpi/lib" > %{buildroot}/etc/ld.so.conf.d/%{name}-openmpi-%{ /sbin/ldconfig %check +export OMPI_ALLOW_RUN_AS_ROOT=1 . /etc/profile.d/modules.sh for p in '' _d ; do for mpi in '' mpich openmpi ; do @@ -285,6 +289,10 @@ done %config(noreplace) /etc/ld.so.conf.d/%{name}-mpich-%{_arch}.conf %changelog +* Mon Aug 07 2023 chenchen - 2019.3-4 +- fix build error due to gcc upgrade to gcc 12.3.4 +- add variable OMPI_ALLOW_RUN_AS_ROOT=1 for fix test error + * Mon Dec 05 2022 Ge Wang - 2019.3-3 - Remove runpath