Fix roofit/roostats test failures with gcc 15

This commit is contained in:
Mattias Ellert 2025-02-19 08:36:52 +01:00
commit 450c67721a
2 changed files with 43 additions and 11 deletions

View file

@ -0,0 +1,35 @@
From 3280847501bfb354a3a9ff1e023c8fd3b74548f4 Mon Sep 17 00:00:00 2001
From: Stephan Hageboeck <stephan.hageboeck@cern.ch>
Date: Wed, 12 Feb 2025 14:42:43 +0100
Subject: [PATCH] [PyROOT] Add __hash_not_enabled to names from std namespace.
With gcc-15, the lookups of std::hash<xxx> lead to the following error:
input_line_50:1:16: error: explicit instantiation of 'std::__hash_not_enabled'
must occur in namespace 'std'
template class __hash_not_enabled<RooRealVar>;
Adding this class to the list of names that require "std::" fixes the
error.
Fix #17456.
---
.../cppyy/cppyy-backend/clingwrapper/src/clingwrapper.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/bindings/pyroot/cppyy/cppyy-backend/clingwrapper/src/clingwrapper.cxx b/bindings/pyroot/cppyy/cppyy-backend/clingwrapper/src/clingwrapper.cxx
index 3aa6704a0b..08972d1460 100644
--- a/bindings/pyroot/cppyy/cppyy-backend/clingwrapper/src/clingwrapper.cxx
+++ b/bindings/pyroot/cppyy/cppyy-backend/clingwrapper/src/clingwrapper.cxx
@@ -275,7 +275,8 @@ public:
"slice_array", "slice", "stack", "string", "strstream", "strstreambuf",
"time_get_byname", "time_get", "time_put_byname", "time_put", "unary_function",
"unary_negate", "unique_ptr", "underflow_error", "unordered_map", "unordered_multimap",
- "unordered_multiset", "unordered_set", "valarray", "vector", "weak_ptr", "wstring"};
+ "unordered_multiset", "unordered_set", "valarray", "vector", "weak_ptr", "wstring",
+ "__hash_not_enabled"};
for (auto& name : stl_names)
gSTLNames.insert(name);
--
2.48.1

View file

@ -39,7 +39,7 @@
Name: root
Version: 6.34.04
%global libversion %(cut -d. -f 1-2 <<< %{version})
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Numerical data analysis framework
License: LGPL-2.1-or-later
@ -86,6 +86,9 @@ Patch6: %{name}-gpad-Fix-Debug-Assertion-Failure-in-libGpad.patch
# Fix out of bounds errors reported with gcc 15
# https://github.com/root-project/root/pull/17551
Patch7: %{name}-Fix-out-of-bounds-error-in-pyroot.patch
# Fix roofit/roostats test failures with gcc 15
# https://github.com/root-project/root/pull/17702
Patch8: %{name}-PyROOT-Add-__hash_not_enabled-to-names-from-std-name.patch
BuildRequires: gcc-c++
BuildRequires: gcc-gfortran
@ -1972,6 +1975,7 @@ This package contains utility functions for ntuples.
%patch -P5 -p1
%patch -P6 -p1
%patch -P7 -p1
%patch -P8 -p1
# Remove bundled sources in order to be sure they are not used
# * afterimage
@ -2734,16 +2738,6 @@ excluded="${excluded}|\
gtest-math-matrix-testMatrixTSparse"
%endif
%if %{?fedora}%{!?fedora:0} >= 42
# Fail with gcc 15 due to changes in std::hash templates
# - tutorial-roofit-*-py
# - tutorial-roostats-*-py
# https://github.com/root-project/root/issues/17456
excluded="${excluded}|\
tutorial-roofit-.*-py|\
tutorial-roostats-.*-py"
%endif
# Filter out parts of tests that require remote network access
# RNTuple.StdAtomic fails on ix86 (different alignment 64 bit (non)atomic)
# TClingDataMemberInfo.Offset fails on s390x
@ -3666,6 +3660,9 @@ fi
%endif
%changelog
* Wed Feb 19 2025 Mattias Ellert <mattias.ellert@physics.uu.se> - 6.34.04-2
- Fix roofit/roostats test failures with gcc 15
* Fri Feb 14 2025 Mattias Ellert <mattias.ellert@physics.uu.se> - 6.34.04-1
- Update to 6.34.04
- Drop patches accepted upstream or previously backported