From ac8e29a51715f40310a7ae2823e26c5dc59dc0e1 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Thu, 28 Nov 2019 12:11:02 -0700 Subject: [PATCH] Build ILP64 version properly against non-symbol suffixed openblas (FTBFS bz#1734942) Add upstream fix for icb_arpack_cpp test New include dir (/usr/include/arpack) --- 197.patch | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++ arpack.spec | 34 +++++++++++++++--------------- 2 files changed, 77 insertions(+), 16 deletions(-) create mode 100644 197.patch diff --git a/197.patch b/197.patch new file mode 100644 index 0000000..72c72d1 --- /dev/null +++ b/197.patch @@ -0,0 +1,59 @@ +From 3e760c23e7adfab54a44032f43d61cf52916fa2f Mon Sep 17 00:00:00 2001 +From: Franck HOUSSEN +Date: Thu, 7 Feb 2019 11:31:02 +0100 +Subject: [PATCH] [BUG FIX] arpack may succeed to compute more EV than + expected. + +--- + PARPACK/TESTS/MPI/icb_parpack_cpp.cpp | 6 ++++-- + TESTS/icb_arpack_cpp.cpp | 6 ++++-- + 2 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/PARPACK/TESTS/MPI/icb_parpack_cpp.cpp b/PARPACK/TESTS/MPI/icb_parpack_cpp.cpp +index 46bf434..a2cd9c3 100644 +--- a/PARPACK/TESTS/MPI/icb_parpack_cpp.cpp ++++ b/PARPACK/TESTS/MPI/icb_parpack_cpp.cpp +@@ -75,7 +75,8 @@ void real_symmetric_runner() { + &(workd[ipntr[1] - 1])); + } + // check number of ev found by arpack. +- if (iparam[4] != nev || info != 0) { ++ if (iparam[4] < nev /*arpack may succeed to compute more EV than expected*/ || info != 0) { ++ std::cout << "ERROR: iparam[4] " << iparam[4] << ", nev " << nev << ", info " << info << std::endl; + throw std::domain_error("Error inside ARPACK routines"); + } + +@@ -153,7 +154,8 @@ void complex_symmetric_runner() { + } + + // check number of ev found by arpack +- if (iparam[4] != nev || info != 0) { ++ if (iparam[4] < nev /*arpack may succeed to compute more EV than expected*/ || info != 0) { ++ std::cout << "ERROR: iparam[4] " << iparam[4] << ", nev " << nev << ", info " << info << std::endl; + throw std::domain_error("Error inside ARPACK routines"); + } + +diff --git a/TESTS/icb_arpack_cpp.cpp b/TESTS/icb_arpack_cpp.cpp +index 7363334..18f7e2d 100644 +--- a/TESTS/icb_arpack_cpp.cpp ++++ b/TESTS/icb_arpack_cpp.cpp +@@ -73,7 +73,8 @@ void real_symmetric_runner() { + } + + // check number of ev found by arpack. +- if (iparam[4] != nev || info != 0) { ++ if (iparam[4] < nev /*arpack may succeed to compute more EV than expected*/ || info != 0) { ++ std::cout << "ERROR: iparam[4] " << iparam[4] << ", nev " << nev << ", info " << info << std::endl; + throw std::domain_error("Error inside ARPACK routines"); + } + +@@ -151,7 +152,8 @@ void complex_symmetric_runner() { + } + + // check number of ev found by arpack. +- if (iparam[4] != nev || info != 0) { ++ if (iparam[4] < nev /*arpack may succeed to compute more EV than expected*/ || info != 0) { ++ std::cout << "ERROR: iparam[4] " << iparam[4] << ", nev " << nev << ", info " << info << std::endl; + throw std::domain_error("Error inside ARPACK routines"); + } + diff --git a/arpack.spec b/arpack.spec index 540ec69..a4d8145 100644 --- a/arpack.spec +++ b/arpack.spec @@ -16,12 +16,14 @@ Name: arpack Version: 3.7.0 -Release: 1%{dist} +Release: 2%{dist} Summary: Fortran 77 subroutines for solving large scale eigenvalue problems License: BSD URL: https://github.com/opencollab/arpack-ng Source0: https://github.com/opencollab/arpack-ng/archive/%{version}/arpack-ng-%{version}.tar.gz +# Upstream fixes for +Patch0: https://patch-diff.githubusercontent.com/raw/opencollab/arpack-ng/pull/197.patch BuildRequires: gcc-c++ BuildRequires: gcc-gfortran @@ -80,9 +82,10 @@ library and so links used for building arpack based applications. %prep -%autosetup -c +%setup -qc mv arpack-ng-%{version} src pushd src +%patch0 -p1 autoreconf -vif popd %if %{build64} @@ -110,11 +113,10 @@ popd %if %{build64} pushd src64 %configure --enable-shared --enable-static \ - LIBSUFFIX=64_ \ - SYMBOLSUFFIX=_64 \ + LIBSUFFIX=64 \ INTERFACE64=1 \ - --with-blas=%{blaslib}64_ \ - --with-lapack=%{blaslib}64_ \ + --with-blas=%{blaslib}64 \ + --with-lapack=%{blaslib}64 \ --enable-icb %make_build popd @@ -132,10 +134,6 @@ popd # Get rid of .la files rm -r %{buildroot}%{_libdir}/*.la # Get rid of generic file names (https://github.com/opencollab/arpack-ng/issues/130) -rm -f %{buildroot}%{_includedir}/debug_c.{h,hpp} -rm -f %{buildroot}%{_includedir}/stat.h -rm -f %{buildroot}%{_includedir}/stat_c.{h,hpp} -rm -f %{buildroot}%{_includedir}/debug-arpack.h %check pushd src @@ -156,18 +154,17 @@ popd %license src/COPYING %{_libdir}/libarpack.so.* %if %{build64} -%{_libdir}/libarpack64_.so.* +%{_libdir}/libarpack64.so.* %endif %files devel %{_libdir}/pkgconfig/arpack.pc %{_libdir}/libarpack.so %if %{build64} -%{_libdir}/pkgconfig/arpack64_.pc -%{_libdir}/libarpack64_.so +%{_libdir}/pkgconfig/arpack64.pc +%{_libdir}/libarpack64.so %endif -%{_includedir}/arpack.h -%{_includedir}/arpack.hpp +%{_includedir}/arpack/ %files doc %doc src/EXAMPLES/ src/DOCUMENTS/ @@ -178,11 +175,16 @@ popd %files static %{_libdir}/libarpack.a %if %{build64} -%{_libdir}/libarpack64_.a +%{_libdir}/libarpack64.a %endif %changelog +* Thu Nov 28 2019 Orion Poplawski - 3.7.0-2 +- Build ILP64 version properly against non-symbol suffixed openblas (FTBFS bz#1734942) +- Add upstream fix for icb_arpack_cpp test +- New include dir (/usr/include/arpack) + * Thu Aug 01 2019 Susi Lehtola - 3.7.0-1 - Update to 3.7.0.