diff --git a/mlpack-2.2.5-gcc8.patch b/mlpack-2.2.5-gcc8.patch new file mode 100644 index 0000000..c536a84 --- /dev/null +++ b/mlpack-2.2.5-gcc8.patch @@ -0,0 +1,11 @@ +--- mlpack-2.2.5/src/mlpack/methods/logistic_regression/logistic_regression_function.hpp 2017-08-25 17:08:44.000000000 -0700 ++++ mlpack-2.2.5/src/mlpack/methods/logistic_regression/logistic_regression_function.hpp.new 2018-03-12 16:19:57.903501783 -0700 +@@ -50,7 +50,7 @@ + //! Return the matrix of predictors. + const MatType& Predictors() const { return predictors; } + //! Return the vector of responses. +- const arma::vec& Responses() const { return responses; } ++ const arma::Row& Responses() const { return responses; } + + /** + * Evaluate the logistic regression log-likelihood function with the given diff --git a/mlpack.spec b/mlpack.spec index 5592bde..2586efd 100644 --- a/mlpack.spec +++ b/mlpack.spec @@ -20,6 +20,9 @@ Patch1: no_exclude_build.patch # Newer versions of Doxygen choke on the TreeTraits definitions for some reason. Patch2: doxygen.patch +# https://github.com/mlpack/mlpack/pull/1302 +# Fix build with GCC 8 (rediffed for 2.2.5) +Patch3: mlpack-2.2.5-gcc8.patch # Use cmake28 package on RHEL. %if 0%{?rhel} @@ -106,10 +109,7 @@ margins. This package provides the Doxygen-generated documentation for mlpack. %global our_docdir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} %prep -%setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 +%autosetup -p1 %build %if 0%{?rhel}