From a7aeab56062a49508e2bb173a62d6a36521e1a5f Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 6 Sep 2018 13:08:42 -0500 Subject: [PATCH] backport upstream fix for step FTBFS (#1619860) --- ...warnings-for-doc-eigen-prerequisites.patch | 80 +++++++++++++++++++ eigen3.spec | 13 ++- 2 files changed, 91 insertions(+), 2 deletions(-) create mode 100644 0004-fix-warnings-for-doc-eigen-prerequisites.patch diff --git a/0004-fix-warnings-for-doc-eigen-prerequisites.patch b/0004-fix-warnings-for-doc-eigen-prerequisites.patch new file mode 100644 index 0000000..10b0ab4 --- /dev/null +++ b/0004-fix-warnings-for-doc-eigen-prerequisites.patch @@ -0,0 +1,80 @@ +From 35e60f607c83056e787237b469ae96c0fe27bcf7 Mon Sep 17 00:00:00 2001 +From: Christoph Hertzberg +Date: Tue, 24 Jul 2018 21:59:15 +0200 +Subject: [PATCH 04/24] fix warnings for doc-eigen-prerequisites + +--- + doc/snippets/MatrixBase_cwiseEqual.cpp | 2 +- + doc/snippets/MatrixBase_cwiseNotEqual.cpp | 2 +- + unsupported/Eigen/src/IterativeSolvers/DGMRES.h | 2 +- + unsupported/doc/examples/FFT.cpp | 6 +++--- + 4 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/doc/snippets/MatrixBase_cwiseEqual.cpp b/doc/snippets/MatrixBase_cwiseEqual.cpp +index eb3656f4c..469af642c 100644 +--- a/doc/snippets/MatrixBase_cwiseEqual.cpp ++++ b/doc/snippets/MatrixBase_cwiseEqual.cpp +@@ -3,5 +3,5 @@ m << 1, 0, + 1, 1; + cout << "Comparing m with identity matrix:" << endl; + cout << m.cwiseEqual(MatrixXi::Identity(2,2)) << endl; +-int count = m.cwiseEqual(MatrixXi::Identity(2,2)).count(); ++Index count = m.cwiseEqual(MatrixXi::Identity(2,2)).count(); + cout << "Number of coefficients that are equal: " << count << endl; +diff --git a/doc/snippets/MatrixBase_cwiseNotEqual.cpp b/doc/snippets/MatrixBase_cwiseNotEqual.cpp +index 6a2e4fb6c..7f0a105d6 100644 +--- a/doc/snippets/MatrixBase_cwiseNotEqual.cpp ++++ b/doc/snippets/MatrixBase_cwiseNotEqual.cpp +@@ -3,5 +3,5 @@ m << 1, 0, + 1, 1; + cout << "Comparing m with identity matrix:" << endl; + cout << m.cwiseNotEqual(MatrixXi::Identity(2,2)) << endl; +-int count = m.cwiseNotEqual(MatrixXi::Identity(2,2)).count(); ++Index count = m.cwiseNotEqual(MatrixXi::Identity(2,2)).count(); + cout << "Number of coefficients that are not equal: " << count << endl; +diff --git a/unsupported/Eigen/src/IterativeSolvers/DGMRES.h b/unsupported/Eigen/src/IterativeSolvers/DGMRES.h +index eff2dc8ad..eae717aa2 100644 +--- a/unsupported/Eigen/src/IterativeSolvers/DGMRES.h ++++ b/unsupported/Eigen/src/IterativeSolvers/DGMRES.h +@@ -173,7 +173,7 @@ class DGMRES : public IterativeSolverBase > + /** + * Set the restart value (default is 30) + */ +- Index set_restart(const Index restart) { m_restart=restart; } ++ void set_restart(const Index restart) { m_restart=restart; } + + /** + * Set the number of eigenvalues to deflate at each restart +diff --git a/unsupported/doc/examples/FFT.cpp b/unsupported/doc/examples/FFT.cpp +index fcbf81276..85e8a0241 100644 +--- a/unsupported/doc/examples/FFT.cpp ++++ b/unsupported/doc/examples/FFT.cpp +@@ -61,14 +61,14 @@ template + void RandomFill(std::vector & vec) + { + for (size_t k=0;k + void RandomFill(std::vector > & vec) + { + for (size_t k=0;k ( T( rand() )/T(RAND_MAX) - .5, T( rand() )/T(RAND_MAX) - .5); ++ vec[k] = std::complex ( T( rand() )/T(RAND_MAX) - T(.5), T( rand() )/T(RAND_MAX) - T(.5)); + } + + template +@@ -85,7 +85,7 @@ void fwd_inv(size_t nfft) + vector timebuf2; + fft.inv(timebuf2,freqbuf); + +- long double rmse = mag2(timebuf - timebuf2) / mag2(timebuf); ++ T_time rmse = mag2(timebuf - timebuf2) / mag2(timebuf); + cout << "roundtrip rmse: " << rmse << endl; + } + +-- +2.17.1 + diff --git a/eigen3.spec b/eigen3.spec index 5b56b33..b20ec80 100644 --- a/eigen3.spec +++ b/eigen3.spec @@ -8,7 +8,7 @@ Name: eigen3 Version: 3.3.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A lightweight C++ template library for vector and matrix math Group: Development/Libraries @@ -25,6 +25,9 @@ Patch1: eigen_pkgconfig.patch # Fix the include paths in the new Eigen3Config.cmake file Patch2: eigen3-3.3.1-fixcmake.patch +## upstream patches from 3.3 branch +Patch104: 0004-fix-warnings-for-doc-eigen-prerequisites.patch + BuildRequires: atlas-devel BuildRequires: fftw-devel BuildRequires: glew-devel @@ -73,6 +76,8 @@ Developer documentation for Eigen. %patch1 -p1 %patch2 -p0 -b .fixcmake +%patch104 -p1 -b .0004 + %build mkdir %{_target_platform} pushd %{_target_platform} @@ -88,6 +93,7 @@ pushd %{_target_platform} -DMETIS_INCLUDES=%{_includedir} -DMETIS_LIBRARIES="metis" \ -DCMAKEPACKAGE_INSTALL_DIR=%{_datadir}/%{name} popd + %make_build -C %{_target_platform} %make_build doc -C %{_target_platform} @@ -111,9 +117,12 @@ rm -f %{_target_platform}/doc/html/unsupported/installdox %{_datadir}/cmake/Modules/*.cmake %files doc -%doc %{_target_platform}/doc/html +#doc %{_target_platform}/doc/html %changelog +* Thu Sep 06 2018 Rex Dieter - 3.3.5-2 +- backport upstream fix for step FTBFS (#1619860) + * Thu Jul 26 2018 Sandro Mani - 3.3.5-1 - Update to 3.3.5