Compare commits

..

2 commits

Author SHA1 Message Date
Iñaki Úcar
108e712edc R-maint-sig mass rebuild 2025-04-19 18:53:41 +02:00
Mattias Ellert
03696fac62 Update to 6.30.08
Fixes for TUri class (PCRE2 compatibility)
Update ROOT's R interface for Rcpp 1.0.13
2024-07-23 01:46:15 +02:00
41 changed files with 2811 additions and 1741 deletions

View file

@ -1,7 +1,7 @@
From 55446dcd6eabc1fff218f266c11f31697fe99f09 Mon Sep 17 00:00:00 2001
From 70d941cd6ebbc3726e08ef7f52d0135453f0b840 Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Fri, 13 Mar 2020 16:21:55 +0100
Subject: [PATCH] Run tests on 32 bit
Subject: [PATCH 2/3] Run tests on 32 bit
---
test/stressGeometry.cxx | 8 --------
@ -9,7 +9,7 @@ Subject: [PATCH] Run tests on 32 bit
2 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/test/stressGeometry.cxx b/test/stressGeometry.cxx
index f8d78f4f54..617b9e1644 100644
index 5e81f5f2ca..18e41a6f45 100644
--- a/test/stressGeometry.cxx
+++ b/test/stressGeometry.cxx
@@ -257,14 +257,6 @@ void stressGeometry(const char *exp="*", Bool_t generate_ref=kFALSE, Bool_t vecg
@ -28,26 +28,26 @@ index f8d78f4f54..617b9e1644 100644
TString fname;
for (i=0; i<NG; i++) {
diff --git a/tree/tree/test/CMakeLists.txt b/tree/tree/test/CMakeLists.txt
index 5bb222edc5..f29a17801d 100644
index 0c1a39d01e..3bafe47934 100644
--- a/tree/tree/test/CMakeLists.txt
+++ b/tree/tree/test/CMakeLists.txt
@@ -17,13 +17,9 @@ endif()
@@ -12,13 +12,9 @@ ROOT_ADD_GTEST(testTOffsetGeneration TOffsetGeneration.cxx ElementStruct.cxx Ele
target_include_directories(testTOffsetGeneration PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
ROOT_STANDARD_LIBRARY_PACKAGE(SillyStruct NO_INSTALL_HEADERS HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/SillyStruct.h SOURCES SillyStruct.cxx LINKDEF SillyStructLinkDef.h DEPENDENCIES RIO)
ROOT_ADD_GTEST(testBulkApi BulkApi.cxx LIBRARIES RIO Tree TreePlayer)
-#FIXME: tests are having timeout on 32bit CERN VM (in docker container everything is fine),
-# to be reverted after investigation.
-if(NOT CMAKE_SIZEOF_VOID_P EQUAL 4)
- ROOT_ADD_GTEST(testBulkApiMultiple BulkApiMultiple.cxx LIBRARIES RIO Tree TreePlayer TIMEOUT 3000)
- ROOT_ADD_GTEST(testBulkApiMultiple BulkApiMultiple.cxx LIBRARIES RIO Tree TreePlayer)
- ROOT_ADD_GTEST(testBulkApiVarLength BulkApiVarLength.cxx LIBRARIES RIO Tree TreePlayer)
- ROOT_ADD_GTEST(testBulkApiSillyStruct BulkApiSillyStruct.cxx LIBRARIES RIO Tree TreePlayer SillyStruct)
-endif()
+ROOT_ADD_GTEST(testBulkApiMultiple BulkApiMultiple.cxx LIBRARIES RIO Tree TreePlayer TIMEOUT 3000)
+ROOT_ADD_GTEST(testBulkApiMultiple BulkApiMultiple.cxx LIBRARIES RIO Tree TreePlayer)
+ROOT_ADD_GTEST(testBulkApiVarLength BulkApiVarLength.cxx LIBRARIES RIO Tree TreePlayer)
+ROOT_ADD_GTEST(testBulkApiSillyStruct BulkApiSillyStruct.cxx LIBRARIES RIO Tree TreePlayer SillyStruct)
ROOT_ADD_GTEST(testTBasket TBasket.cxx LIBRARIES RIO Tree)
ROOT_ADD_GTEST(testTBranch TBranch.cxx LIBRARIES RIO Tree MathCore)
ROOT_ADD_GTEST(testTIOFeatures TIOFeatures.cxx LIBRARIES RIO Tree)
--
2.45.1
2.24.1

View file

@ -1,49 +0,0 @@
From f7bfa429deb9dbae9058998888bbcaa84af0ca08 Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Tue, 2 Dec 2025 05:33:31 +0100
Subject: [PATCH] Adjust test/stressGraphics.ref
---
test/stressGraphics.ref | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/test/stressGraphics.ref b/test/stressGraphics.ref
index 2498ec6d755..4520a5ab113 100644
--- a/test/stressGraphics.ref
+++ b/test/stressGraphics.ref
@@ -10,11 +10,11 @@ Test# PS1Ref# PS1Err# PDFRef# PDFErr# JPGRef# JPGErr# PNGRef# PN
9 9253 100 14377 150 19851 2400 12199 900 9283 100
10 8863 70 13645 100 24343 1100 23278 1700 8894 70
11 12971 100 14750 50 34063 2000 32033 1200 13070 150
- 12 7674 100 13533 50 83557 3000 38505 4000 7720 150
- 13 5600 400 13242 300 16881 400 15063 800 5638 400
+ 12 7674 100 13533 100 83557 3000 38505 4000 7720 150
+ 13 5600 400 13242 400 16881 400 15063 800 5638 400
14 14190539 4000000 12926 100 23076 9500 25987 3000 14190704 4000000
15 15690 5000 17179 200 23076 9500 14232 1500 10437 5000
- 16 28072 400 23520 200 44462 11000 30062 5000 38007 400
+ 16 28072 400 23520 250 44462 11000 30062 5000 38007 400
17 20444 400 21520 150 27511 11000 16867 600 20721 400
18 15894 100 19305 200 27187 10300 15925 350 15925 100
19 22521 300 42926 250 43868 17000 19232 11000 22729 300
@@ -44,7 +44,7 @@ Test# PS1Ref# PS1Err# PDFRef# PDFErr# JPGRef# JPGErr# PNGRef# PN
43 207729 750 87126 750 76094 38000 54717 11000 210497 800
44 401670 6500 156361 2000 62719 34100 45592 14000 410114 6500
45 566142 5000 225206 2000 65828 31800 53934 6500 573396 5000
- 46 3738751 35000 1292739 12000 60580 9900 133547 3500 3783013 35000
+ 46 3738751 35000 1292739 13000 60580 9900 133547 3500 3783013 35000
47 1466028 9000 853193 50000 38425 13500 91242 18100 1463263 7500
48 38312 200 56877 750 36524 11800 119641 8000 38121 200
49 19556 1000 31967 1000 36859 10000 37602 8000 19900 3000
@@ -53,7 +53,7 @@ Test# PS1Ref# PS1Err# PDFRef# PDFErr# JPGRef# JPGErr# PNGRef# PN
52 270825 10000 115500 1000 45496 11000 34685 5000 272950 10000
53 15025 3000 29289 500 42525 11300 33336 3900 14787 4000
54 254604 5000 383258 7000 55666 30400 46534 6500 259594 7000
- 55 4846 150 14075 150 33239 600 25303 500 4877 150
+ 55 4846 150 14075 200 33239 600 25303 500 4877 150
56 1435879 150000 12837 100 25830 100 365000 15000 1085792 250000
57 5884 500 16577 200 40706 14000 30026 4000 5884 500
58 5723 700 15720 200 32236 11000 16916 3200 5670 800
--
2.52.0

View file

@ -0,0 +1,42 @@
From defef44f15aebc5eca9e34df767f3f92688d594c Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Thu, 4 Jul 2024 18:21:06 +0200
Subject: [PATCH 2/2] [core] Correct the regular expression for the scheme part
in TUri class
RFC 3986 (https://datatracker.ietf.org/doc/html/rfc3986) defines the
scheme part of a URI as:
scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
The regular expression for finding the scheme part in the TUri class
was defined as
^[[:alpha:]][[:alpha:][:digit:]+-.]*$
This does not match the definition in the RFC, since +-. in regular
expression syntax is the range of ascii codes from '+' to '.', which
means '+', ',', '-' and '.'. I.e. the ',' is included in the regular
expression in error. This commit adds a backslash escape to the '-' so
that it is interpreted as a literal '-' sign instead of indicating a
range in the regular expression.
---
core/base/src/TUri.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/base/src/TUri.cxx b/core/base/src/TUri.cxx
index 9660470556..b324d0ffea 100644
--- a/core/base/src/TUri.cxx
+++ b/core/base/src/TUri.cxx
@@ -270,7 +270,7 @@ Bool_t TUri::SetScheme(const TString &scheme)
Bool_t TUri::IsScheme(const TString &string)
{
return TPRegexp(
- "^[[:alpha:]][[:alpha:][:digit:]+-.]*$"
+ "^[[:alpha:]][[:alpha:][:digit:]+\\-.]*$"
).Match(string);
}
--
2.45.2

View file

@ -1,32 +0,0 @@
From 40f8cd0adeb7257778c789e1ae639f260780402b Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Sun, 7 Dec 2025 19:30:55 +0100
Subject: [PATCH] Fix a numpy test for 32 bit archs
The default dtype used in numpy array is "int". This type has
different sizes on 32 and 64 bit architectures. The test tries to use
the numpy array as a Long64_t dataframe. On 32 bit architectures this
results in an error.
This commit explicitly changes the numpy array's dtype to "int64" to
match the Long64_t dataframe type on all architectyres.
---
bindings/pyroot/pythonizations/test/rdataframe_misc.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bindings/pyroot/pythonizations/test/rdataframe_misc.py b/bindings/pyroot/pythonizations/test/rdataframe_misc.py
index 1a1efd21b3e..150828613b3 100644
--- a/bindings/pyroot/pythonizations/test/rdataframe_misc.py
+++ b/bindings/pyroot/pythonizations/test/rdataframe_misc.py
@@ -132,7 +132,7 @@ class RDataFrameMisc(unittest.TestCase):
return
out_path = "dataframe_misc_regression_gh20291.root"
try:
- x, y = numpy.array([1, 2, 3]), numpy.array([4, 5, 6])
+ x, y = numpy.array([1, 2, 3], dtype='int64'), numpy.array([4, 5, 6], dtype='int64')
df = ROOT.RDF.FromNumpy({"x": x, "y": y})
df.Snapshot("tree", out_path)
--
2.52.0

View file

@ -0,0 +1,68 @@
From 638593e77b76895db85470a3303d5fe0366e8ec4 Mon Sep 17 00:00:00 2001
From: scott snyder <snyder@bnl.gov>
Date: Wed, 6 Mar 2024 04:06:50 +0100
Subject: [PATCH] Fix writing long strings.
In TBufferFile::WriteFastArrayString, we had
```
if (n < 255) {
*this << (UChar_t)n;
} else {
*this << (UChar_t)255;
*this << n;
}
```
A recent commit changed the type of the n parameter from Int_t to Long64_t.
This is effectively an incompatible change in the on-disk format, but only for strings
which are at least 255 characters long.
Further, ReadFastArrayString is still reading an Int_t, so this version of ROOT cannot
read files that it writes.
Resolve by changing WriteFastArrayString to explicitly write an Int_t.
Also move the bounds check on the length to before writing anything into the buffer.
Fixes a failure seen in the unit tests of the ATLAS EventInfo package
in the dev3LCG build.
---
io/io/src/TBufferFile.cxx | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/io/io/src/TBufferFile.cxx b/io/io/src/TBufferFile.cxx
index 7b1fe370bb..81e0f95e02 100644
--- a/io/io/src/TBufferFile.cxx
+++ b/io/io/src/TBufferFile.cxx
@@ -1995,13 +1995,6 @@ void TBufferFile::WriteFastArray(const Char_t *c, Long64_t n)
void TBufferFile::WriteFastArrayString(const Char_t *c, Long64_t n)
{
- if (n < 255) {
- *this << (UChar_t)n;
- } else {
- *this << (UChar_t)255;
- *this << n;
- }
-
constexpr Int_t dataWidth = static_cast<Int_t>(sizeof(Char_t));
const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth;
if (n < 0 || n > maxElements)
@@ -2010,6 +2003,13 @@ void TBufferFile::WriteFastArrayString(const Char_t *c, Long64_t n)
return; // In case the user re-routes the error handler to not die when Fatal is called
}
+ if (n < 255) {
+ *this << (UChar_t)n;
+ } else {
+ *this << (UChar_t)255;
+ *this << (Int_t)n;
+ }
+
Int_t l = sizeof(Char_t)*n;
if (fBufCur + l > fBufMax) AutoExpand(fBufSize+l);
--
2.45.2

View file

@ -1,63 +0,0 @@
From 0e1e1f0ba1908ae1020337ed7ec0565bf979b92c Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Tue, 2 Dec 2025 04:57:30 +0100
Subject: [PATCH] [Geom] Add missing includes of TMath.h
---
geom/geombuilder/src/TGeoParaEditor.cxx | 1 +
geom/geombuilder/src/TGeoPconEditor.cxx | 1 +
geom/geombuilder/src/TGeoPgonEditor.cxx | 1 +
geom/geombuilder/src/TGeoTrapEditor.cxx | 1 +
4 files changed, 4 insertions(+)
diff --git a/geom/geombuilder/src/TGeoParaEditor.cxx b/geom/geombuilder/src/TGeoParaEditor.cxx
index fdc344ba4d2..bd173607d2c 100644
--- a/geom/geombuilder/src/TGeoParaEditor.cxx
+++ b/geom/geombuilder/src/TGeoParaEditor.cxx
@@ -27,6 +27,7 @@ Editor for a TGeoPara.
#include "TVirtualGeoPainter.h"
#include "TVirtualPad.h"
#include "TView.h"
+#include "TMath.h"
#include "TGButton.h"
#include "TGTextEntry.h"
#include "TGNumberEntry.h"
diff --git a/geom/geombuilder/src/TGeoPconEditor.cxx b/geom/geombuilder/src/TGeoPconEditor.cxx
index a66359853be..50598d2cb90 100644
--- a/geom/geombuilder/src/TGeoPconEditor.cxx
+++ b/geom/geombuilder/src/TGeoPconEditor.cxx
@@ -27,6 +27,7 @@ Editor for a TGeoPcon.
#include "TVirtualGeoPainter.h"
#include "TVirtualPad.h"
#include "TView.h"
+#include "TMath.h"
#include "TGCanvas.h"
#include "TGButton.h"
#include "TGTextEntry.h"
diff --git a/geom/geombuilder/src/TGeoPgonEditor.cxx b/geom/geombuilder/src/TGeoPgonEditor.cxx
index 949d0045a66..33638d66b2b 100644
--- a/geom/geombuilder/src/TGeoPgonEditor.cxx
+++ b/geom/geombuilder/src/TGeoPgonEditor.cxx
@@ -27,6 +27,7 @@ Editor for a TGeoPgon.
#include "TVirtualGeoPainter.h"
#include "TVirtualPad.h"
#include "TView.h"
+#include "TMath.h"
#include "TGTextEntry.h"
#include "TGNumberEntry.h"
#include "TGLabel.h"
diff --git a/geom/geombuilder/src/TGeoTrapEditor.cxx b/geom/geombuilder/src/TGeoTrapEditor.cxx
index d9c2916d075..459e0191117 100644
--- a/geom/geombuilder/src/TGeoTrapEditor.cxx
+++ b/geom/geombuilder/src/TGeoTrapEditor.cxx
@@ -27,6 +27,7 @@ Editor for a TGeoTrap.
#include "TVirtualGeoPainter.h"
#include "TVirtualPad.h"
#include "TView.h"
+#include "TMath.h"
#include "TGButton.h"
#include "TGTextEntry.h"
#include "TGNumberEntry.h"
--
2.52.0

View file

@ -0,0 +1,56 @@
From 9f696986449451d9df951891eb930231e718989b Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Thu, 4 Jul 2024 18:08:32 +0200
Subject: [PATCH 1/2] [core] Make TUri class PCRE2 compatible
PCRE2 has a stricter regular expression syntax parsing than PCRE.
Some non-conforming regular expressions that were accepted by PCRE are
correcrly rejected by PCRE2.
Some of the regular expressions used by the TUri class do not follow
the syntax rules and were relying on them being acceped by PCRE
anyway. This commit corrects the syntax of these expressions so that
they are now accepted by PCRE2. The corrected expressions still work
correctly with the old PCRE.
---
core/base/src/TUri.cxx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/core/base/src/TUri.cxx b/core/base/src/TUri.cxx
index 04aab1edb3..9660470556 100644
--- a/core/base/src/TUri.cxx
+++ b/core/base/src/TUri.cxx
@@ -27,10 +27,10 @@ a validating parser.
//RFC3986:
// pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
-const char* const kURI_pchar = "(?:[[:alpha:][:digit:]-._~!$&'()*+,;=:@]|%[0-9A-Fa-f][0-9A-Fa-f])";
+const char* const kURI_pchar = "(?:[[:alpha:][:digit:]\\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f][0-9A-Fa-f])";
//unreserved characters, see chapter 2.3
-const char* const kURI_unreserved = "[[:alpha:][:digit:]-._~]";
+const char* const kURI_unreserved = "[[:alpha:][:digit:]\\-._~]";
// reserved characters, see chapter
// reserved = gen-delims / sub-delims
@@ -900,7 +900,7 @@ Bool_t TUri::IsPathAbsolute(const TString &string)
Bool_t TUri::IsPathNoscheme(const TString &string)
{
return (TPRegexp(
- TString("^(([[:alpha:][:digit:]-._~!$&'()*+,;=@]|%[0-9A-Fa-f][0-9A-Fa-f])+)(/") + TString(kURI_pchar) + "*)*$"
+ TString("^(([[:alpha:][:digit:]\\-._~!$&'()*+,;=@]|%[0-9A-Fa-f][0-9A-Fa-f])+)(/") + TString(kURI_pchar) + "*)*$"
).Match(string) > 0);
}
@@ -950,7 +950,7 @@ Bool_t TUri::IsPort(const TString &string)
Bool_t TUri::IsRegName(const TString &string)
{
return (TPRegexp(
- "^([[:alpha:][:digit:]-._~!$&'()*+,;=]|%[0-9A-Fa-f][0-9A-Fa-f])*$").Match(string) > 0);
+ "^([[:alpha:][:digit:]\\-._~!$&'()*+,;=]|%[0-9A-Fa-f][0-9A-Fa-f])*$").Match(string) > 0);
}
////////////////////////////////////////////////////////////////////////////////
--
2.45.2

View file

@ -1,70 +0,0 @@
From f09b4ce027b31dcd19ea8a398c35c5dfbcc0507f Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Thu, 18 Dec 2025 11:49:12 +0100
Subject: [PATCH] [PyROOT] Don't install the python modules twice
The binary python modules were moved one directory level down into the
ROOT and cppyy directories, so that they reside alongside the python
files in the same directories. The install rule for the python files
must therefore be extended to exclude the binary modules (PATTERN *.so
EXCLUDE) so that these are not installed a second time overwriting the
files installed by the install rule for the binary modules with another
copy with the wrong file permissions.
Also use the no-version option for the cppyy binary module as is
already done for the pythonization binary module, since it is now
installed in the python directory. Before it was installed in the
library directory with an unversioned symlink in the python directory.
---
bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt | 2 +-
bindings/pyroot/cppyy/cppyy/CMakeLists.txt | 5 +++--
bindings/pyroot/pythonizations/CMakeLists.txt | 3 ++-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt b/bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt
index bb48c032974..065a89348ff 100644
--- a/bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt
+++ b/bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt
@@ -73,7 +73,7 @@ endif()
add_library(cppyy SHARED src/CPyCppyyPyModule.cxx)
# Set the suffix to '.so' and the prefix to 'lib'
-set_target_properties(cppyy PROPERTIES ${ROOT_LIBRARY_PROPERTIES}
+set_target_properties(cppyy PROPERTIES ${ROOT_LIBRARY_PROPERTIES_NO_VERSION}
LIBRARY_OUTPUT_DIRECTORY ${localruntimedir}/cppyy)
if(MSVC)
target_link_libraries(cppyy PRIVATE CPyCppyy)
diff --git a/bindings/pyroot/cppyy/cppyy/CMakeLists.txt b/bindings/pyroot/cppyy/cppyy/CMakeLists.txt
index 3a29b4525f7..842ad12df97 100644
--- a/bindings/pyroot/cppyy/cppyy/CMakeLists.txt
+++ b/bindings/pyroot/cppyy/cppyy/CMakeLists.txt
@@ -31,8 +31,9 @@ endforeach()
# Install Python sources and bytecode
install(DIRECTORY ${localruntimedir}/cppyy
DESTINATION ${CMAKE_INSTALL_PYTHONDIR}
- COMPONENT libraries)
+ COMPONENT libraries
+ PATTERN *.so EXCLUDE)
if(NOT MSVC)
ROOT_ADD_TEST_SUBDIRECTORY(test)
-endif()
\ No newline at end of file
+endif()
diff --git a/bindings/pyroot/pythonizations/CMakeLists.txt b/bindings/pyroot/pythonizations/CMakeLists.txt
index 1230f18ca47..b415ba13697 100644
--- a/bindings/pyroot/pythonizations/CMakeLists.txt
+++ b/bindings/pyroot/pythonizations/CMakeLists.txt
@@ -239,7 +239,8 @@ install(TARGETS ${libname} EXPORT ${CMAKE_PROJECT_NAME}Exports
# Install Python sources and bytecode
install(DIRECTORY ${localruntimedir}/ROOT
DESTINATION ${CMAKE_INSTALL_PYTHONDIR}
- COMPONENT libraries)
+ COMPONENT libraries
+ PATTERN *.so EXCLUDE)
# Install headers required by pythonizations
install(FILES ${PYROOT_EXTRA_HEADERS}
--
2.52.0

View file

@ -1,82 +0,0 @@
From d5135f7869406396b3ba8e944c71dbdd67d3ea01 Mon Sep 17 00:00:00 2001
From: Jonas Rembser <jonas.rembser@cern.ch>
Date: Tue, 23 Dec 2025 19:04:45 +0100
Subject: [PATCH] [Python] Fix TF1 Pythonization test for NumPy 2.4.0
The new NumPy 2.4.0 is more strict when implicitly converting 1-element
arrays to scalars. It doesn't do that anymore, causing the TF1
Pythonization tests to fail (see log below).
This actually pointed to a real mistake in setting up the test, where a
2D array was used to define the TFormula parameters while it should be a
1D array.
```txt
962/3718 Test #93: pyunittests-bindings-pyroot-pythonizations-pyroot-pyz-tf-pycallables ..............................***Failed 3.05 sec
test_callable (tf_pycallables.TF1.test_callable)
Test function provided as callable ... ok
test_evalpar (tf_pycallables.TF1.test_evalpar)
Test the 2D Numpy array pythonizations for TF1::EvalPar ... ERROR
test_evalpar_dynamic (tf_pycallables.TF1.test_evalpar_dynamic)
Test the 2D NumPy pythonizations with dynamic TF1 data dimensions ... ok
test_fitgauss (tf_pycallables.TF1.test_fitgauss)
Test fitting a histogram to a Python function ... ok
test_identity (tf_pycallables.TF1.test_identity)
Test simple function without parameters ... ok
test_params (tf_pycallables.TF1.test_params)
Test function with parameters ... ok
test_params (tf_pycallables.TF2.test_params)
Test function with parameters ... ok
test_params (tf_pycallables.TF3.test_params)
Test function with parameters ... ok
======================================================================
ERROR: test_evalpar (tf_pycallables.TF1.test_evalpar)
Test the 2D Numpy array pythonizations for TF1::EvalPar
----------------------------------------------------------------------
Traceback (most recent call last):
File "/github/home/ROOT-CI/src/bindings/pyroot/pythonizations/test/tf_pycallables.py", line 129, in test_evalpar
expected_value = pyf_tf1_coulomb(x[i, ::2], params)
File "/github/home/ROOT-CI/src/bindings/pyroot/pythonizations/test/tf_pycallables.py", line 33, in pyf_tf1_coulomb
return p[1] * x[0] * x[1] / (p[0]**2) * math.exp(-p[2] / p[0])
~~~~~~~~^^^^^^^^^^^^^^
TypeError: only 0-dimensional arrays can be converted to Python scalars
----------------------------------------------------------------------
Ran 8 tests in 1.469s
FAILED (errors=1)
CMake Error at /github/home/ROOT-CI/src/cmake/modules/RootTestDriver.cmake:232 (message):
error code: 1
```
---
.../pyroot/pythonizations/test/tf_pycallables.py | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/bindings/pyroot/pythonizations/test/tf_pycallables.py b/bindings/pyroot/pythonizations/test/tf_pycallables.py
index 2a7d6b72462..5a223030ec9 100644
--- a/bindings/pyroot/pythonizations/test/tf_pycallables.py
+++ b/bindings/pyroot/pythonizations/test/tf_pycallables.py
@@ -116,11 +116,13 @@ class TF1(unittest.TestCase):
[3.0, 10, 4.0]
])
- params = np.array([
- [1.0], # Distance between charges r
- [8.99e9], # Coulomb constant k (in N·m²/C²)
- [0.1] # Additional factor for modulation
- ])
+ params = np.array(
+ [
+ 1.0, # Distance between charges r
+ 8.99e9, # Coulomb constant k (in N·m²/C²)
+ 0.1, # Additional factor for modulation
+ ]
+ )
# Slice to avoid the dummy column of 10's
res = rtf1_coulomb.EvalPar(x[:, ::2], params)
--
2.52.0

View file

@ -1,50 +0,0 @@
From e1f42658629ad67ce7cb224a1379d133f61f2e35 Mon Sep 17 00:00:00 2001
From: Jonas Rembser <jonas.rembser@cern.ch>
Date: Sun, 11 Jan 2026 10:25:51 +0100
Subject: [PATCH] [RF] Use TRandom3 in test RooFuncWrapper
Use TRandom3 instead of the `<random>` to get compiler-independent,
reproducible behavior.
---
roofit/roofitcore/test/testRooFuncWrapper.cxx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/roofit/roofitcore/test/testRooFuncWrapper.cxx b/roofit/roofitcore/test/testRooFuncWrapper.cxx
index 2ebdf95333f..189e8f2e266 100644
--- a/roofit/roofitcore/test/testRooFuncWrapper.cxx
+++ b/roofit/roofitcore/test/testRooFuncWrapper.cxx
@@ -34,12 +34,12 @@
#include <RooWorkspace.h>
#include <ROOT/StringUtils.hxx>
+#include <TMath.h>
#include <TROOT.h>
+#include <TRandom3.h>
#include <TSystem.h>
-#include <TMath.h>
#include <functional>
-#include <random>
#include "gtest_wrapper.h"
@@ -66,13 +66,13 @@ double getNumDerivative(const RooAbsReal &pdf, RooRealVar &var, const RooArgSet
void randomizeParameters(const RooArgSet &parameters)
{
+ TRandom3 rng(1337);
+
double lowerBound = -0.1;
double upperBound = 0.1;
- std::uniform_real_distribution<double> unif(lowerBound, upperBound);
- std::default_random_engine re;
for (auto *param : parameters) {
- double mul = unif(re);
+ double mul = rng.Uniform(lowerBound, upperBound);
auto par = dynamic_cast<RooAbsRealLValue *>(param);
if (!par)
--
2.52.0

View file

@ -1,60 +0,0 @@
From 4da50ef374cd231163dff77493f9367cd62583d9 Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Sun, 30 Mar 2025 21:23:14 +0200
Subject: [PATCH] Revert "[test] Fetch the geometries from EOS and not from the
website"
This reverts commit a8a879ce252e45405452db38d9178c7883582a7d.
---
test/stressGeometry.cxx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/test/stressGeometry.cxx b/test/stressGeometry.cxx
index 7fb6bf97e7..f8d78f4f54 100644
--- a/test/stressGeometry.cxx
+++ b/test/stressGeometry.cxx
@@ -1,6 +1,6 @@
// Program to check a TGeo geometry
// The first time you run this program, the geometry files will be taken
-// from /eos/root-eos/testfiles/ (previously from http://root.cern/files)
+// from http://root.cern/files
//
// How the program works
// If the file <geom_name>_ref.root does not exist, it is generated. The file
@@ -274,13 +274,13 @@ void stressGeometry(const char *exp="*", Bool_t generate_ref=kFALSE, Bool_t vecg
delete gGeoManager;
gGeoManager = 0;
}
- TGeoManager::Import(Form("root://eospublic.cern.ch//eos/root-eos/testfiles/%s",fname.Data()));
+ TGeoManager::Import(Form("http://root.cern/files/%s",fname.Data()));
if (!gGeoManager) return;
if (vecgeom) TVirtualGeoConverter::Instance()->ConvertGeometry();
fname = TString::Format("files/%s_ref_%d.root", exps[i],versions[i]);
- if (gen_ref || !TFile::Open(Form("root://eospublic.cern.ch//eos/root-eos/testfiles//%s_ref_%d.root",exps[i],versions[i]),"CACHEREAD")) {
+ if (gen_ref || !TFile::Open(Form("http://root.cern/files/%s_ref_%d.root",exps[i],versions[i]),"CACHEREAD")) {
if (!gen_ref) fprintf(stderr,"File: %s does not exist, generating it\n", fname.Data());
else fprintf(stderr,"Generating reference file %s\n", fname.Data());
WriteRef(i);
@@ -320,7 +320,7 @@ void ReadRef(Int_t kexp) {
TFile *f = 0;
//use ref_[version[i]] files
if (!gen_ref)
- fname = TString::Format("root://eospublic.cern.ch//eos/root-eos/testfiles//%s_ref_%d.root", exps[kexp],versions[kexp]);
+ fname = TString::Format("http://root.cern/files/%s_ref_%d.root", exps[kexp],versions[kexp]);
else
fname.Format("files/%s_ref_%d.root", exps[kexp],versions[kexp]);
@@ -546,7 +546,7 @@ void InspectDiff(const char* exp="alice",Long64_t ientry=-1) {
Float_t rad = 0.;
TString fname(TString::Format("%s.root",exp));
if (gSystem->AccessPathName(fname)) {
- TGeoManager::Import(Form("root://eospublic.cern.ch//eos/root-eos/testfiles//%s",fname.Data()));
+ TGeoManager::Import(Form("http://root.cern/files/%s",fname.Data()));
} else {
TGeoManager::Import(fname);
}
--
2.49.0

View file

@ -1,47 +0,0 @@
From 98a5042a02dd7c1aaa9fbd5e54c8620c6b72484f Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Mon, 2 Jun 2025 21:22:39 +0200
Subject: [PATCH] Save memory. Do not link to LLVM libraries in parallel
---
core/clingutils/test/CMakeLists.txt | 3 +++
interpreter/CppInterOp/unittests/CppInterOp/CMakeLists.txt | 6 ++++++
2 files changed, 9 insertions(+)
diff --git a/core/clingutils/test/CMakeLists.txt b/core/clingutils/test/CMakeLists.txt
index a6c7aedac99..90ac0139c24 100644
--- a/core/clingutils/test/CMakeLists.txt
+++ b/core/clingutils/test/CMakeLists.txt
@@ -36,3 +36,6 @@ if(NOT builtin_clang)
endif()
ROOT_ADD_UNITTEST_DIR(Core ${CLING_LIBRARIES} $<TARGET_OBJECTS:ClingUtils>)
+
+# Save memory. Do not link to LLVM libraries in parallel
+add_dependencies(coreclingutilstestUnit CppInterOpTests)
diff --git a/interpreter/CppInterOp/unittests/CppInterOp/CMakeLists.txt b/interpreter/CppInterOp/unittests/CppInterOp/CMakeLists.txt
index 4b4b43bdd29..a028802fedc 100644
--- a/interpreter/CppInterOp/unittests/CppInterOp/CMakeLists.txt
+++ b/interpreter/CppInterOp/unittests/CppInterOp/CMakeLists.txt
@@ -66,6 +66,9 @@ target_link_libraries(CppInterOpTests
clangCppInterOp
)
+# Save memory. Do not link to LLVM libraries in parallel
+add_dependencies(CppInterOpTests DynamicLibraryManagerTests)
+
set_output_directory(CppInterOpTests
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${EXTRA_PATH_TEST_BINARIES}
LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${EXTRA_PATH_TEST_BINARIES}
@@ -129,5 +132,8 @@ set_output_directory(DynamicLibraryManagerTests
add_dependencies(DynamicLibraryManagerTests TestSharedLib)
+# Save memory. Do not link to LLVM libraries in parallel
+add_dependencies(DynamicLibraryManagerTests Cling)
+
#export_executable_symbols_for_plugins(TestSharedLib)
add_subdirectory(TestSharedLib)
--
2.52.0

View file

@ -1,34 +0,0 @@
From fd18e83ae79760f7e8cca6f28b6d0f89d912b152 Mon Sep 17 00:00:00 2001
From: Jonas Rembser <jonas.rembser@cern.ch>
Date: Wed, 26 Nov 2025 12:40:03 +0100
Subject: [PATCH] [VecOps] Remove outdated `IsSmall` helper function in tests
The commit 2605710bea7b1 changed from using the `ROOT::Detail::VecOps::`
namespace explicitly for `IsSmall` to a `using` statement. However,
there was also a remnant `IsSmall` function with an outdated
implementation in the test file itself, which we can now remove.
---
math/vecops/test/vecops_rvec.cxx | 7 -------
1 file changed, 7 deletions(-)
diff --git a/math/vecops/test/vecops_rvec.cxx b/math/vecops/test/vecops_rvec.cxx
index 034f06ca211..432c673a553 100644
--- a/math/vecops/test/vecops_rvec.cxx
+++ b/math/vecops/test/vecops_rvec.cxx
@@ -1493,13 +1493,6 @@ TEST(VecOps, Construct)
EXPECT_TRUE(fourVects[2] == ref2);
}
-bool IsSmall(const RVec<int> &v)
-{
- // the first array element is right after the 3 data members of SmallVectorBase
- return reinterpret_cast<std::uintptr_t>(v.begin()) - reinterpret_cast<std::uintptr_t>(&v) ==
- sizeof(void *) + 2 * sizeof(int);
-}
-
// this is a regression test for https://github.com/root-project/root/issues/6796
TEST(VecOps, MemoryAdoptionAndClear)
{
--
2.52.0

View file

@ -0,0 +1,40 @@
From 8dc4654de6d569e5040313065fd5cd04d651fb92 Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Fri, 12 Jul 2024 00:20:04 +0200
Subject: [PATCH] [pyroot] Whitelist libtbbmalloc in library import test
6/1344 Test #12: pyunittests-pyroot-import-load-libs .......................................***Failed 1.35 sec
test_import (import_load_libs.ImportLoadLibs.test_import)
Test libraries loaded after importing ROOT ... ERROR
======================================================================
ERROR: test_import (import_load_libs.ImportLoadLibs.test_import)
Test libraries loaded after importing ROOT
----------------------------------------------------------------------
Exception: Found not whitelisted libraries after importing ROOT:
- libtbbmalloc
If the test fails with a library that is loaded on purpose, please add it to the whitelist.
----------------------------------------------------------------------
Ran 1 test in 1.186s
FAILED (errors=1)
This failure is seen in Fedora 41 after tbb was updated from version
2021.11.0 to version 2021.13.0 in the distribution.
---
bindings/pyroot/pythonizations/test/import_load_libs.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/bindings/pyroot/pythonizations/test/import_load_libs.py b/bindings/pyroot/pythonizations/test/import_load_libs.py
index 179c76f6fd..c370a3cd42 100644
--- a/bindings/pyroot/pythonizations/test/import_load_libs.py
+++ b/bindings/pyroot/pythonizations/test/import_load_libs.py
@@ -40,6 +40,7 @@ class ImportLoadLibs(unittest.TestCase):
'libssl',
'libcrypt.*', # by libssl
'libtbb',
+ 'libtbbmalloc',
'liburing', # by libRIO if uring option is enabled
# On centos7 libssl links against kerberos pulling in all dependencies below, removed with libssl1.1.0
'libgssapi_krb5',
--
2.45.2

View file

@ -0,0 +1,30 @@
From 6952dd5ca51e7be8a8ae74b446ac268949f5f383 Mon Sep 17 00:00:00 2001
From: Sergey Linev <S.Linev@gsi.de>
Date: Mon, 10 Jun 2024 09:19:47 +0200
Subject: [PATCH] [http] Allow to use any of openssl 3.x with civetweb
civetweb was designed when only openssl 3.0 was existing.
Therefore name of define is `OPENSSL_API_3_0`
Meanwhile there is openssl 3.1 and 3.2.
While seems to be there is no changes in API both can
be used with civetweb.
---
net/http/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/http/CMakeLists.txt b/net/http/CMakeLists.txt
index 02d7514400..6ef98a604b 100644
--- a/net/http/CMakeLists.txt
+++ b/net/http/CMakeLists.txt
@@ -78,7 +78,7 @@ if(ssl)
MESSAGE(STATUS "Use SSL API VERSION 1.1 for civetweb")
target_compile_definitions(RHTTP PUBLIC -DOPENSSL_API_1_1)
set(link_ssl ON)
- elseif((${ssl_major} EQUAL "3") AND ((${ssl_minor} EQUAL "0") OR (${ssl_minor} EQUAL "1")))
+ elseif(${ssl_major} EQUAL "3")
MESSAGE(STATUS "Use SSL API VERSION 3.${ssl_minor} for civetweb")
target_compile_definitions(RHTTP PUBLIC -DOPENSSL_API_3_0)
set(link_ssl ON)
--
2.45.2

View file

@ -0,0 +1,30 @@
From 51b84e7bc21f8729de8d3e8f9ff08b337af33b78 Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Fri, 17 Nov 2023 17:15:15 +0100
Subject: [PATCH] Avoid out of memory during linking regardless of build type
---
core/metacling/src/CMakeLists.txt | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/core/metacling/src/CMakeLists.txt b/core/metacling/src/CMakeLists.txt
index e750480eb3..dd50793d29 100644
--- a/core/metacling/src/CMakeLists.txt
+++ b/core/metacling/src/CMakeLists.txt
@@ -111,11 +111,8 @@ ROOT_LINKER_LIBRARY(Cling
$<TARGET_OBJECTS:MetaCling>
LIBRARIES ${CLING_LIBRARIES} ${LINK_LIBS} ${CLING_PLUGIN_LINK_LIBS})
-string(TOUPPER "${LLVM_BUILD_TYPE}" THE_BUILD_TYPE)
-if("${THE_BUILD_TYPE}" STREQUAL DEBUG OR "${THE_BUILD_TYPE}" STREQUAL RELWITHDEBINFO)
- # When these two link at the same time, they can exhaust the RAM on many machines, since they both link against llvm.
- add_dependencies(Cling rootcling_stage1)
-endif()
+# When these two link at the same time, they can exhaust the RAM on many machines, since they both link against llvm.
+add_dependencies(Cling rootcling_stage1)
if(MSVC)
set_target_properties(Cling PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
--
2.43.0

View file

@ -0,0 +1,58 @@
From b32c7a1b080cb5d14f242070bf906ea6929d604d Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Fri, 25 Mar 2022 11:13:12 +0100
Subject: [PATCH] Byte swap values read from the protobuf raw data stream on
big endian
---
tmva/sofie_parsers/src/RModelParser_ONNX.cxx | 23 +++++++++++++++-----
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/tmva/sofie_parsers/src/RModelParser_ONNX.cxx b/tmva/sofie_parsers/src/RModelParser_ONNX.cxx
index ab457dcddc..d701fb3299 100644
--- a/tmva/sofie_parsers/src/RModelParser_ONNX.cxx
+++ b/tmva/sofie_parsers/src/RModelParser_ONNX.cxx
@@ -1,3 +1,4 @@
+#include "Byteswap.h"
#include "TMVA/RModelParser_ONNX.hxx"
#include "onnx_proto3.pb.h"
@@ -335,9 +336,14 @@ RModel RModelParser_ONNX::Parse(std::string filename, bool verbose)
case ETensorType::FLOAT: {
std::shared_ptr<void> data(malloc(fLength * sizeof(float)), free);
- if (tensorproto->raw_data().empty() == false) {
- auto raw_data_ptr = reinterpret_cast<float *>(const_cast<char *>(tensorproto->raw_data().c_str()));
- std::memcpy(data.get(), raw_data_ptr, fLength * sizeof(float));
+ if (!tensorproto->raw_data().empty()) {
+#ifdef R__BYTESWAP
+ std::memcpy(data.get(), tensorproto->raw_data().c_str(), fLength * sizeof(float));
+#else
+ for (std::size_t k = 0; k < fLength; ++k)
+ (reinterpret_cast<uint32_t *>(data.get()))[k] =
+ Rbswap_32((reinterpret_cast<const uint32_t *>(tensorproto->raw_data().c_str()))[k]);
+#endif
} else {
tensorproto->mutable_float_data()->ExtractSubrange(0, tensorproto->float_data_size(),
static_cast<float *>(data.get()));
@@ -350,9 +356,14 @@ RModel RModelParser_ONNX::Parse(std::string filename, bool verbose)
case ETensorType::INT64: {
std::shared_ptr<void> data(malloc(fLength * sizeof(int64_t)), free);
- if (tensorproto->raw_data().empty() == false) {
- auto raw_data_ptr = reinterpret_cast<int64_t *>(const_cast<char *>(tensorproto->raw_data().c_str()));
- std::memcpy(data.get(), raw_data_ptr, fLength * sizeof(int64_t));
+ if (!tensorproto->raw_data().empty()) {
+#ifdef R__BYTESWAP
+ std::memcpy(data.get(), tensorproto->raw_data().c_str(), fLength * sizeof(int64_t));
+#else
+ for (std::size_t k = 0; k < fLength; ++k)
+ (reinterpret_cast<uint64_t *>(data.get()))[k] =
+ Rbswap_64((reinterpret_cast<const uint64_t *>(tensorproto->raw_data().c_str()))[k]);
+#endif
} else {
tensorproto->mutable_int64_data()->ExtractSubrange(0, tensorproto->int64_data_size(),
static_cast<int64_t *>(data.get()));
--
2.39.2

26
root-clad.patch Normal file
View file

@ -0,0 +1,26 @@
From fae9b92742c5e991ad33769d1357a721838e93f9 Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Fri, 17 Nov 2023 11:37:23 +0100
Subject: [PATCH 1/3] Add fit/exampleFit3D.C to clad veto
---
tutorials/CMakeLists.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tutorials/CMakeLists.txt b/tutorials/CMakeLists.txt
index 5cba95407b..81f6539f03 100644
--- a/tutorials/CMakeLists.txt
+++ b/tutorials/CMakeLists.txt
@@ -74,7 +74,8 @@ if(NOT ROOT_minuit2_FOUND)
#---Tutorials disabled depending on the build components-------------
if(NOT clad)
- set(clad_veto fit/minuit2GausFit.C)
+ set(clad_veto fit/minuit2GausFit.C
+ fit/exampleFit3D.C)
endif()
# RBatchGenerator tutorials need Python 3.8+.
--
2.42.0

View file

@ -1,109 +0,0 @@
From 251de0f8b237ce041df4960f831fe4a1fade6d92 Mon Sep 17 00:00:00 2001
From: Jonas Rembser <jonas.rembser@cern.ch>
Date: Sat, 6 Dec 2025 17:39:40 +0100
Subject: [PATCH] [cppyy] Remove code related to finding CPyCppyy API header
path
This is not needed for ROOT, because the CPyCppyy API headers are
installed with the other ROOT headers anyway, and ROOT knows where to
find them already.
---
.../cppyy/cppyy/python/cppyy/__init__.py | 82 -------------------
1 file changed, 82 deletions(-)
diff --git a/bindings/pyroot/cppyy/cppyy/python/cppyy/__init__.py b/bindings/pyroot/cppyy/cppyy/python/cppyy/__init__.py
index 68e3c49e5fe..c8dd458bfdd 100644
--- a/bindings/pyroot/cppyy/cppyy/python/cppyy/__init__.py
+++ b/bindings/pyroot/cppyy/cppyy/python/cppyy/__init__.py
@@ -297,88 +297,6 @@ elif ispypy:
if os.path.exists(apipath) and os.path.exists(os.path.join(apipath, 'Python.h')):
add_include_path(apipath)
-# add access to extra headers for dispatcher (CPyCppyy only (?))
-if not ispypy:
- try:
- apipath_extra = os.environ['CPPYY_API_PATH']
- if os.path.basename(apipath_extra) == 'CPyCppyy':
- apipath_extra = os.path.dirname(apipath_extra)
- except KeyError:
- apipath_extra = None
-
- if apipath_extra is None:
- try:
- if 0x30a0000 <= sys.hexversion:
- import importlib.metadata as m
-
- for p in m.files('CPyCppyy'):
- if p.match('API.h'):
- ape = p.locate()
- break
- del p, m
- else:
- import pkg_resources as pr
-
- d = pr.get_distribution('CPyCppyy')
- for line in d.get_metadata_lines('RECORD'):
- if 'API.h' in line:
- ape = os.path.join(d.location, line[0:line.find(',')])
- break
- del line, d, pr
-
- if os.path.exists(ape):
- apipath_extra = os.path.dirname(os.path.dirname(ape))
- del ape
- except Exception:
- pass
-
- if apipath_extra is None:
- ldversion = sysconfig.get_config_var('LDVERSION')
- if not ldversion:
- ldversion = sys.version[:3]
-
- apipath_extra = os.path.join(os.path.dirname(apipath), 'site', 'python'+ldversion)
- if not os.path.exists(os.path.join(apipath_extra, 'CPyCppyy')):
- import glob
- import platform
-
- if platform.system() == "Windows":
- # Install locations are handled differently on Windows
- import libcppyy
-
- ape = os.path.dirname(libcppyy.__file__)
- else:
- import cppyy.libcppyy as libcppyy
-
- ape = os.path.dirname(libcppyy.__file__)
- # a "normal" structure finds the include directory up to 3 levels up,
- # ie. dropping lib/pythonx.y[md]/site-packages
- for i in range(3):
- if os.path.exists(os.path.join(ape, 'include')):
- break
- ape = os.path.dirname(ape)
-
- ape = os.path.join(ape, 'include')
- if os.path.exists(os.path.join(ape, 'CPyCppyy')):
- apipath_extra = ape
- else:
- # add back pythonx.y or site/pythonx.y if present
- for p in glob.glob(os.path.join(ape, 'python'+sys.version[:3]+'*'))+\
- glob.glob(os.path.join(ape, '*', 'python'+sys.version[:3]+'*')):
- if os.path.exists(os.path.join(p, 'CPyCppyy')):
- apipath_extra = p
- break
-
- if apipath_extra.lower() != 'none':
- if not os.path.exists(os.path.join(apipath_extra, 'CPyCppyy')):
- warnings.warn("CPyCppyy API not found (tried: %s); "
- "set CPPYY_API_PATH envar to the 'CPyCppyy' API directory to fix"
- % apipath_extra)
- else:
- add_include_path(apipath_extra)
-
- del apipath_extra
-
if os.getenv('CONDA_PREFIX'):
# MacOS, Linux
include_path = os.path.join(os.getenv('CONDA_PREFIX'), 'include')
--
2.52.0

View file

@ -1,46 +0,0 @@
From f4577e76a5dc23842d6be0a82df804f71fc820ef Mon Sep 17 00:00:00 2001
From: Jonas Rembser <jonas.rembser@cern.ch>
Date: Mon, 1 Dec 2025 16:51:36 +0100
Subject: [PATCH] [cppyy] Remove now irrelevant `load_cpp_backend()` call
As we don't have a separate `cppyy_backend` anymore (neither as a Python
package, nor as a shared library), trying to load the backend library
will always give an exception that will be caught as an `ImportError`.
It would be cleaner if this code branch is not even taken.
---
.../cppyy/cppyy/python/cppyy/_cpython_cppyy.py | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/bindings/pyroot/cppyy/cppyy/python/cppyy/_cpython_cppyy.py b/bindings/pyroot/cppyy/cppyy/python/cppyy/_cpython_cppyy.py
index bac078ea7c9..f98a34a697c 100644
--- a/bindings/pyroot/cppyy/cppyy/python/cppyy/_cpython_cppyy.py
+++ b/bindings/pyroot/cppyy/cppyy/python/cppyy/_cpython_cppyy.py
@@ -19,24 +19,12 @@ __all__ = [
'_end_capture_stderr'
]
-# First load the dependency libraries of the backend, then pull in the libcppyy
-# extension module. If the backed can't be loaded, it was probably linked
-# statically into the extension module, so we don't error out at this point.
-try:
- from cppyy_backend import loader
- c = loader.load_cpp_backend()
-except ImportError:
- c = None
-
if platform.system() == "Windows":
# On Windows, the library has to be searched without prefix
import libcppyy as _backend
else:
import cppyy.libcppyy as _backend
-if c is not None:
- _backend._cpp_backend = c
-
# explicitly expose APIs from libcppyy
_w = ctypes.CDLL(_backend.__file__, ctypes.RTLD_GLOBAL)
--
2.52.0

View file

@ -0,0 +1,44 @@
From 15f50c71b4d89bfbf06ce817dee38e843f0f55cd Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Mon, 17 Jan 2022 23:50:47 +0100
Subject: [PATCH] Fix test failure on ppc64le and aarch64 with gcc 12
.../hist/hist/test/test_tprofile2poly.cxx:61: Failure
The difference between cont1 and cont2 is 1.4551915228366852e-11, which exceeds delta, where
cont1 evaluates to 54886.064319363642,
cont2 evaluates to 54886.064319363628, and
delta evaluates to 9.999999960041972e-12.
.../hist/hist/test/test_tprofile2poly.cxx:61: Failure
The difference between cont1 and cont2 is 1.4551915228366852e-11, where
cont1 evaluates to 109868.61342004745,
cont2 evaluates to 109868.61342004743.
The abs_error parameter delta evaluates to 9.999999960041972e-12 which is smaller than the minimum distance between doubles for numbers of this magnitude which is 1.4551915228366852e-11, thus making this EXPECT_NEAR check equivalent to EXPECT_EQUAL. Consider using EXPECT_DOUBLE_EQ instead.
---
hist/hist/test/test_tprofile2poly.cxx | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/hist/hist/test/test_tprofile2poly.cxx b/hist/hist/test/test_tprofile2poly.cxx
index 40cb3052a2..ecf559a4b3 100644
--- a/hist/hist/test/test_tprofile2poly.cxx
+++ b/hist/hist/test/test_tprofile2poly.cxx
@@ -58,15 +58,14 @@ void binEntriesCompare(TProfile2D* tp2d, TProfile2Poly* tpp) {
for(Double_t x=0.5; x<10; x+=2.0) {
cont1 = tp2d->GetBinEffectiveEntries(tp2d->FindBin(x,y));
cont2 = tpp->GetBinEffectiveEntries(tpp->FindBin(x,y));
- ASSERT_NEAR(cont1, cont2, delta);
+ ASSERT_NEAR(cont1, cont2, 2 * delta);
}
}
// test overflow
cont1 = tp2d->GetBinEffectiveEntries(tp2d->FindBin(11,11));
cont2 = tpp->GetBinEffectiveEntries(tpp->FindBin(11,11));
- ASSERT_NEAR(cont1, cont2, delta);
-
+ ASSERT_NEAR(cont1, cont2, 2 * delta);
}
void binErrorCompare(TProfile2D* tp2d, TProfile2Poly* tpp) {
--
2.39.2

133
root-fix-typo.patch Normal file
View file

@ -0,0 +1,133 @@
From 1df0dc67beb8053926f39b69e4a4393322de63ed Mon Sep 17 00:00:00 2001
From: ferdymercury <ferdymercury@users.noreply.github.com>
Date: Sun, 25 Feb 2024 18:36:40 +0100
Subject: [PATCH] [skip-ci] fix typo
---
io/io/src/TBufferFile.cxx | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/io/io/src/TBufferFile.cxx b/io/io/src/TBufferFile.cxx
index 8d2f36cfc9..7b1fe370bb 100644
--- a/io/io/src/TBufferFile.cxx
+++ b/io/io/src/TBufferFile.cxx
@@ -1953,7 +1953,7 @@ void TBufferFile::WriteFastArray(const Bool_t *b, Long64_t n)
if (n < 0 || n > maxElements)
{
Fatal("WriteFastArray", "Not enough space left in the buffer (1GB limit). %lld elements is greater than the max left of %d", n, maxElements);
- return; // In case the user re-route the error handler to not die when Fatal is called
+ return; // In case the user re-routes the error handler to not die when Fatal is called
}
Int_t l = sizeof(UChar_t)*n;
@@ -1979,7 +1979,7 @@ void TBufferFile::WriteFastArray(const Char_t *c, Long64_t n)
if (n < 0 || n > maxElements)
{
Fatal("WriteFastArray", "Not enough space left in the buffer (1GB limit). %lld elements is greater than the max left of %d", n, maxElements);
- return; // In case the user re-route the error handler to not die when Fatal is called
+ return; // In case the user re-routes the error handler to not die when Fatal is called
}
Int_t l = sizeof(Char_t)*n;
@@ -2007,7 +2007,7 @@ void TBufferFile::WriteFastArrayString(const Char_t *c, Long64_t n)
if (n < 0 || n > maxElements)
{
Fatal("WriteFastArray", "Not enough space left in the buffer (1GB limit). %lld elements is greater than the max left of %d", n, maxElements);
- return; // In case the user re-route the error handler to not die when Fatal is called
+ return; // In case the user re-routes the error handler to not die when Fatal is called
}
Int_t l = sizeof(Char_t)*n;
@@ -2028,7 +2028,7 @@ void TBufferFile::WriteFastArray(const Short_t *h, Long64_t n)
if (n < 0 || n > maxElements)
{
Fatal("WriteFastArray", "Not enough space left in the buffer (1GB limit). %lld elements is greater than the max left of %d", n, maxElements);
- return; // In case the user re-route the error handler to not die when Fatal is called
+ return; // In case the user re-routes the error handler to not die when Fatal is called
}
Int_t l = sizeof(Short_t)*n;
@@ -2060,7 +2060,7 @@ void TBufferFile::WriteFastArray(const Int_t *ii, Long64_t n)
if (n < 0 || n > maxElements)
{
Fatal("WriteFastArray", "Not enough space left in the buffer (1GB limit). %lld elements is greater than the max left of %d", n, maxElements);
- return; // In case the user re-route the error handler to not die when Fatal is called
+ return; // In case the user re-routes the error handler to not die when Fatal is called
}
Int_t l = sizeof(Int_t)*n;
@@ -2091,7 +2091,7 @@ void TBufferFile::WriteFastArray(const Long_t *ll, Long64_t n)
if (n < 0 || n > maxElements)
{
Fatal("WriteFastArray", "Not enough space left in the buffer (1GB limit). %lld elements is greater than the max left of %d", n, maxElements);
- return; // In case the user re-route the error handler to not die when Fatal is called
+ return; // In case the user re-routes the error handler to not die when Fatal is called
}
Int_t l = 8*n;
@@ -2113,7 +2113,7 @@ void TBufferFile::WriteFastArray(const ULong_t *ll, Long64_t n)
if (n < 0 || n > maxElements)
{
Fatal("WriteFastArray", "Not enough space left in the buffer (1GB limit). %lld elements is greater than the max left of %d", n, maxElements);
- return; // In case the user re-route the error handler to not die when Fatal is called
+ return; // In case the user re-routes the error handler to not die when Fatal is called
}
Int_t l = 8*n;
@@ -2133,7 +2133,7 @@ void TBufferFile::WriteFastArray(const Long64_t *ll, Long64_t n)
if (n < 0 || n > maxElements)
{
Fatal("WriteFastArray", "Not enough space left in the buffer (1GB limit). %lld elements is greater than the max left of %d", n, maxElements);
- return; // In case the user re-route the error handler to not die when Fatal is called
+ return; // In case the user re-routes the error handler to not die when Fatal is called
}
Int_t l = sizeof(Long64_t)*n;
@@ -2159,7 +2159,7 @@ void TBufferFile::WriteFastArray(const Float_t *f, Long64_t n)
if (n < 0 || n > maxElements)
{
Fatal("WriteFastArray", "Not enough space left in the buffer (1GB limit). %lld elements is greater than the max left of %d", n, maxElements);
- return; // In case the user re-route the error handler to not die when Fatal is called
+ return; // In case the user re-routes the error handler to not die when Fatal is called
}
Int_t l = sizeof(Float_t)*n;
@@ -2190,7 +2190,7 @@ void TBufferFile::WriteFastArray(const Double_t *d, Long64_t n)
if (n < 0 || n > maxElements)
{
Fatal("WriteFastArray", "Not enough space left in the buffer (1GB limit). %lld elements is greater than the max left of %d", n, maxElements);
- return; // In case the user re-route the error handler to not die when Fatal is called
+ return; // In case the user re-routes the error handler to not die when Fatal is called
}
Int_t l = sizeof(Double_t)*n;
@@ -2217,7 +2217,7 @@ void TBufferFile::WriteFastArrayFloat16(const Float_t *f, Long64_t n, TStreamerE
if (n < 0 || n > maxElements)
{
Fatal("WriteFastArray", "Not enough space left in the buffer (1GB limit). %lld elements is greater than the max left of %d", n, maxElements);
- return; // In case the user re-route the error handler to not die when Fatal is called
+ return; // In case the user re-routes the error handler to not die when Fatal is called
}
Int_t l = sizeof(Float_t)*n;
@@ -2275,7 +2275,7 @@ void TBufferFile::WriteFastArrayDouble32(const Double_t *d, Long64_t n, TStreame
if (n < 0 || n > maxElements)
{
Fatal("WriteFastArray", "Not enough space left in the buffer (1GB limit). %lld elements is greater than the max left of %d", n, maxElements);
- return; // In case the user re-route the error handler to not die when Fatal is called
+ return; // In case the user re-routes the error handler to not die when Fatal is called
}
Int_t l = sizeof(Float_t)*n;
@@ -2346,7 +2346,7 @@ void TBufferFile::WriteFastArray(void *start, const TClass *cl, Long64_t n,
else if (n < 0)
{
Fatal("WriteFastArray", "Negative number of elements %lld", n);
- return; // In case the user re-route the error handler to not die when Fatal is called
+ return; // In case the user re-routes the error handler to not die when Fatal is called
}
int size = cl->Size();
--
2.45.2

View file

@ -1,4 +1,4 @@
From 4d450f306a8ab8220f43675c70f399d89e5a4a03 Mon Sep 17 00:00:00 2001
From c5f13cb25c3b803346d1a6cac483badbcf2ced62 Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Sat, 11 May 2024 20:09:47 +0200
Subject: [PATCH] Use system fonts via fontconfig
@ -9,19 +9,20 @@ Subject: [PATCH] Use system fonts via fontconfig
graf2d/asimage/src/TASImage.cxx | 91 +++++++-
graf2d/graf/CMakeLists.txt | 1 +
graf2d/graf/inc/TTF.h | 3 +-
graf2d/graf/src/TTF.cxx | 295 +++++++++++++++++---------
graf2d/graf/src/TTF.cxx | 291 +++++++++++++++++---------
graf2d/postscript/CMakeLists.txt | 1 +
graf2d/postscript/src/TPostScript.cxx | 106 ++++-----
graf2d/postscript/src/TPostScript.cxx | 106 +++++-----
graf3d/gl/CMakeLists.txt | 1 +
graf3d/gl/src/TGLFontManager.cxx | 123 ++++++++++-
graf3d/gl/src/TGLText.cxx | 56 +++--
11 files changed, 495 insertions(+), 194 deletions(-)
gui/gui/src/TGApplication.cxx | 10 +-
12 files changed, 494 insertions(+), 201 deletions(-)
diff --git a/core/base/src/TApplication.cxx b/core/base/src/TApplication.cxx
index f0d2124a8f6..41ad4c73020 100644
index 992713264a..32bfc0bbb9 100644
--- a/core/base/src/TApplication.cxx
+++ b/core/base/src/TApplication.cxx
@@ -253,18 +253,12 @@ void TApplication::InitializeGraphics(Bool_t only_web)
@@ -251,18 +251,12 @@ void TApplication::InitializeGraphics(Bool_t only_web)
LoadGraphicsLibs();
// Try to load TrueType font renderer. Only try to load if not in batch
@ -42,7 +43,7 @@ index f0d2124a8f6..41ad4c73020 100644
if (gClassTable->GetDict("TGX11TTF")) {
// in principle we should not have linked anything against libGX11TTF
// but with ACLiC this can happen, initialize TGX11TTF by hand
@@ -278,7 +272,6 @@ void TApplication::InitializeGraphics(Bool_t only_web)
@@ -276,7 +270,6 @@ void TApplication::InitializeGraphics(Bool_t only_web)
}
}
#endif
@ -51,10 +52,10 @@ index f0d2124a8f6..41ad4c73020 100644
if (!only_web || !fAppImp) {
diff --git a/graf2d/asimage/CMakeLists.txt b/graf2d/asimage/CMakeLists.txt
index b5ccf983473..8ee57c1fac0 100644
index 31114ad45d..be95419491 100644
--- a/graf2d/asimage/CMakeLists.txt
+++ b/graf2d/asimage/CMakeLists.txt
@@ -28,6 +28,7 @@ ROOT_STANDARD_LIBRARY_PACKAGE(ASImage
@@ -30,6 +30,7 @@ ROOT_STANDARD_LIBRARY_PACKAGE(ASImage
${FREETYPE_LIBRARIES}
${X11_LIBRARIES}
ZLIB::ZLIB
@ -63,7 +64,7 @@ index b5ccf983473..8ee57c1fac0 100644
Core
Graf
diff --git a/graf2d/asimage/src/TASImage.cxx b/graf2d/asimage/src/TASImage.cxx
index 6ea60a78801..e85d804b7ec 100644
index 7e046f4724..137265bd4a 100644
--- a/graf2d/asimage/src/TASImage.cxx
+++ b/graf2d/asimage/src/TASImage.cxx
@@ -117,6 +117,8 @@ extern "C" {
@ -75,7 +76,7 @@ index 6ea60a78801..e85d804b7ec 100644
// auxiliary functions for general polygon filling
#include "TASPolyUtils.c"
@@ -2620,11 +2622,88 @@ void TASImage::DrawText(Int_t x, Int_t y, const char *text, Int_t size,
@@ -2595,11 +2597,88 @@ void TASImage::DrawText(Int_t x, Int_t y, const char *text, Int_t size,
// This is for backward compatibility...
if (fn.Last('/') == 0) fn = fn(1, fn.Length() - 1);
@ -169,7 +170,7 @@ index 6ea60a78801..e85d804b7ec 100644
if (fn.EndsWith(".pfa") || fn.EndsWith(".PFA") || fn.EndsWith(".pfb") || fn.EndsWith(".PFB") || fn.EndsWith(".ttf") || fn.EndsWith(".TTF") || fn.EndsWith(".otf") || fn.EndsWith(".OTF")) {
ttfont = kTRUE;
@@ -2648,7 +2727,7 @@ void TASImage::DrawText(Int_t x, Int_t y, const char *text, Int_t size,
@@ -2623,7 +2702,7 @@ void TASImage::DrawText(Int_t x, Int_t y, const char *text, Int_t size,
return;
}
@ -179,7 +180,7 @@ index 6ea60a78801..e85d804b7ec 100644
if (!font) {
font = get_asfont(gFontManager, "fixed", 0, size, ASF_GuessWho);
diff --git a/graf2d/graf/CMakeLists.txt b/graf2d/graf/CMakeLists.txt
index d7d1b77c21a..c4ebb994a4a 100644
index d7d1b77c21..c4ebb994a4 100644
--- a/graf2d/graf/CMakeLists.txt
+++ b/graf2d/graf/CMakeLists.txt
@@ -91,6 +91,7 @@ ROOT_STANDARD_LIBRARY_PACKAGE(Graf
@ -191,7 +192,7 @@ index d7d1b77c21a..c4ebb994a4a 100644
Hist
Matrix
diff --git a/graf2d/graf/inc/TTF.h b/graf2d/graf/inc/TTF.h
index 864ce06b4f0..050796d1ded 100644
index 0bef9dcb95..ea96fe47ce 100644
--- a/graf2d/graf/inc/TTF.h
+++ b/graf2d/graf/inc/TTF.h
@@ -76,9 +76,10 @@ protected:
@ -207,7 +208,7 @@ index 864ce06b4f0..050796d1ded 100644
static TTF::TTGlyph fgGlyphs[kMaxGlyphs]; ///< glyphs
static Bool_t fgHinting; ///< use hinting (true by default)
diff --git a/graf2d/graf/src/TTF.cxx b/graf2d/graf/src/TTF.cxx
index 758bb98c192..c90d0ac70a9 100644
index ca38ed1f9c..8f1d62686b 100644
--- a/graf2d/graf/src/TTF.cxx
+++ b/graf2d/graf/src/TTF.cxx
@@ -25,6 +25,8 @@ Interface to the freetype 2 library.
@ -232,7 +233,7 @@ index 758bb98c192..c90d0ac70a9 100644
FT_Matrix *TTF::fgRotMatrix = nullptr;
FT_Library TTF::fgLibrary;
FT_BBox TTF::fgCBox;
@@ -71,6 +74,11 @@ void TTF::Init()
@@ -72,6 +75,11 @@ void TTF::Init()
return;
}
@ -244,7 +245,7 @@ index 758bb98c192..c90d0ac70a9 100644
// load default font (arialbd)
SetTextFont(62);
}
@@ -108,12 +116,15 @@ Short_t TTF::CharToUnicode(UInt_t code)
@@ -109,12 +117,15 @@ Short_t TTF::CharToUnicode(UInt_t code)
charmap = fgFace[fgCurFontIdx]->charmaps[i];
platform = charmap->platform_id;
encoding = charmap->encoding_id;
@ -264,7 +265,7 @@ index 758bb98c192..c90d0ac70a9 100644
{
fgCharMap[fgCurFontIdx] = charmap;
if (FT_Set_Charmap(fgFace[fgCurFontIdx], fgCharMap[fgCurFontIdx]))
@@ -392,21 +403,145 @@ Int_t TTF::SetTextFont(const char *fontname, Int_t italic)
@@ -387,21 +398,145 @@ Int_t TTF::SetTextFont(const char *fontname, Int_t italic)
}
const char *basename = gSystem->BaseName(fontname);
@ -422,7 +423,7 @@ index 758bb98c192..c90d0ac70a9 100644
}
}
@@ -416,28 +551,13 @@ Int_t TTF::SetTextFont(const char *fontname, Int_t italic)
@@ -411,28 +546,13 @@ Int_t TTF::SetTextFont(const char *fontname, Int_t italic)
kTTMaxFonts);
Warning("TTF::SetTextFont", "using default font %s", fgFontName[0]);
fgCurFontIdx = 0; // use font 0 (default font, set in ctor)
@ -436,7 +437,7 @@ index 758bb98c192..c90d0ac70a9 100644
- char *ttfont = gSystem->Which(ttpath, fontname, kReadPermission);
-
- if (!ttfont) {
- Error("TTF::SetTextFont", "font file %s not found in path %s", fontname, ttpath);
- Error("TTF::SetTextFont", "font file %s not found in path", fontname);
- if (fgFontCount) {
- Warning("TTF::SetTextFont", "using default font %s", fgFontName[0]);
- fgCurFontIdx = 0; // use font 0 (default font, set in ctor)
@ -453,12 +454,9 @@ index 758bb98c192..c90d0ac70a9 100644
Error("TTF::SetTextFont", "error loading font %s", ttfont);
delete [] ttfont;
if (tface) FT_Done_Face(tface);
@@ -450,24 +570,25 @@ Int_t TTF::SetTextFont(const char *fontname, Int_t italic)
}
}
@@ -448,19 +568,20 @@ Int_t TTF::SetTextFont(const char *fontname, Int_t italic)
delete [] ttfont;
- delete [] ttfont;
-
fgFontName[fgFontCount] = StrDup(basename);
+ fgFontIdx[fgFontCount] = ttindex;
+ fgFontIta[fgFontCount] = italic;
@ -479,12 +477,8 @@ index 758bb98c192..c90d0ac70a9 100644
+ FT_Set_Transform( fgFace[fgCurFontIdx], &slantMat, nullptr );
}
+ delete [] ttfont;
+
return 0;
}
@@ -494,70 +615,50 @@ Int_t TTF::SetTextFont(const char *fontname, Int_t italic)
@@ -489,70 +610,50 @@ Int_t TTF::SetTextFont(const char *fontname, Int_t italic)
void TTF::SetTextFont(Font_t fontnumber)
{
@ -496,10 +490,10 @@ index 758bb98c192..c90d0ac70a9 100644
- { "Root.TTFont.1", "FreeSerifItalic.otf" },
- { "Root.TTFont.2", "FreeSerifBold.otf" },
- { "Root.TTFont.3", "FreeSerifBoldItalic.otf" },
- { "Root.TTFont.4", "texgyreheros-regular.otf" },
- { "Root.TTFont.5", "texgyreheros-italic.otf" },
- { "Root.TTFont.6", "texgyreheros-bold.otf" },
- { "Root.TTFont.7", "texgyreheros-bolditalic.otf" },
- { "Root.TTFont.4", "FreeSans.otf" },
- { "Root.TTFont.5", "FreeSansOblique.otf" },
- { "Root.TTFont.6", "FreeSansBold.otf" },
- { "Root.TTFont.7", "FreeSansBoldOblique.otf" },
- { "Root.TTFont.8", "FreeMono.otf" },
- { "Root.TTFont.9", "FreeMonoOblique.otf" },
- { "Root.TTFont.10", "FreeMonoBold.otf" },
@ -594,7 +588,7 @@ index 758bb98c192..c90d0ac70a9 100644
////////////////////////////////////////////////////////////////////////////////
diff --git a/graf2d/postscript/CMakeLists.txt b/graf2d/postscript/CMakeLists.txt
index eb091bbb396..a05023a3f41 100644
index eb091bbb39..a05023a3f4 100644
--- a/graf2d/postscript/CMakeLists.txt
+++ b/graf2d/postscript/CMakeLists.txt
@@ -27,6 +27,7 @@ ROOT_STANDARD_LIBRARY_PACKAGE(Postscript
@ -606,7 +600,7 @@ index eb091bbb396..a05023a3f41 100644
Graf
)
diff --git a/graf2d/postscript/src/TPostScript.cxx b/graf2d/postscript/src/TPostScript.cxx
index df9e3ae16ea..1e353e1ca53 100644
index 09ea7ffa9c..180fd5e3c1 100644
--- a/graf2d/postscript/src/TPostScript.cxx
+++ b/graf2d/postscript/src/TPostScript.cxx
@@ -234,6 +234,7 @@ To change the color model use `gStyle->SetColorModelPS(c)`.
@ -617,7 +611,7 @@ index df9e3ae16ea..1e353e1ca53 100644
#include "strlcpy.h"
#include "snprintf.h"
@@ -1584,56 +1585,60 @@ Bool_t TPostScript::FontEmbedType42(const char *filename)
@@ -1585,56 +1586,60 @@ Bool_t TPostScript::FontEmbedType42(const char *filename)
void TPostScript::FontEmbed(void)
{
@ -721,7 +715,7 @@ index df9e3ae16ea..1e353e1ca53 100644
} else {
if (FontEmbedType2(ttfont)) {
// nothing
@@ -1642,12 +1647,13 @@ void TPostScript::FontEmbed(void)
@@ -1643,12 +1648,13 @@ void TPostScript::FontEmbed(void)
} else if(FontEmbedType42(ttfont)) {
// nothing
} else {
@ -739,7 +733,7 @@ index df9e3ae16ea..1e353e1ca53 100644
}
}
PrintStr("%%IncludeResource: font Times-Roman@");
@@ -2836,10 +2842,10 @@ void TPostScript::Text(Double_t xx, Double_t yy, const wchar_t *chars)
@@ -2837,10 +2843,10 @@ void TPostScript::Text(Double_t xx, Double_t yy, const wchar_t *chars)
{ "Root.PSFont.9", "/FreeMonoOblique" },
{ "Root.PSFont.10", "/FreeMonoBold" },
{ "Root.PSFont.11", "/FreeMonoBoldOblique" },
@ -754,10 +748,10 @@ index df9e3ae16ea..1e353e1ca53 100644
{ "Root.PSFont.STIXGenIt", "/STIXGeneral-Italic" },
{ "Root.PSFont.STIXGenBd", "/STIXGeneral-Bold" },
diff --git a/graf3d/gl/CMakeLists.txt b/graf3d/gl/CMakeLists.txt
index e759473ca0f..c453397fc52 100644
index a874da9e1d..5454469606 100644
--- a/graf3d/gl/CMakeLists.txt
+++ b/graf3d/gl/CMakeLists.txt
@@ -211,6 +211,7 @@ ROOT_STANDARD_LIBRARY_PACKAGE(RGL
@@ -208,6 +208,7 @@ ROOT_STANDARD_LIBRARY_PACKAGE(RGL
${GL2PS_LIBRARIES}
${X11_LIBRARIES}
RGlew
@ -766,7 +760,7 @@ index e759473ca0f..c453397fc52 100644
Hist
Gui
diff --git a/graf3d/gl/src/TGLFontManager.cxx b/graf3d/gl/src/TGLFontManager.cxx
index 58ea1188d59..647642de615 100644
index 776e9d286f..c4134c5980 100644
--- a/graf3d/gl/src/TGLFontManager.cxx
+++ b/graf3d/gl/src/TGLFontManager.cxx
@@ -36,6 +36,7 @@
@ -777,7 +771,7 @@ index 58ea1188d59..647642de615 100644
/** \class TGLFont
\ingroup opengl
@@ -448,16 +449,120 @@ void TGLFontManager::RegisterFont(Int_t sizeIn, Int_t fileID, TGLFont::EMode mod
@@ -450,16 +451,120 @@ void TGLFontManager::RegisterFont(Int_t sizeIn, Int_t fileID, TGLFont::EMode mod
FontMap_i it = fFontMap.find(TGLFont(size, fileID, mode));
if (it == fFontMap.end())
{
@ -908,7 +902,7 @@ index 58ea1188d59..647642de615 100644
FTFont* ftfont = 0;
switch (mode)
diff --git a/graf3d/gl/src/TGLText.cxx b/graf3d/gl/src/TGLText.cxx
index 2ed3ee0917a..03feb0ee0a4 100644
index f84f5193d2..8a672c787c 100644
--- a/graf3d/gl/src/TGLText.cxx
+++ b/graf3d/gl/src/TGLText.cxx
@@ -32,6 +32,8 @@
@ -920,7 +914,7 @@ index 2ed3ee0917a..03feb0ee0a4 100644
#define FTGL_BITMAP 0
#define FTGL_PIXMAP 1
#define FTGL_OUTLINE 2
@@ -175,27 +177,35 @@ void TGLText::SetGLTextFont(Font_t fontnumber)
@@ -176,27 +178,35 @@ void TGLText::SetGLTextFont(Font_t fontnumber)
{
int fontid = fontnumber / 10;
@ -977,7 +971,7 @@ index 2ed3ee0917a..03feb0ee0a4 100644
if (fGLTextFont) delete fGLTextFont;
@@ -203,7 +213,9 @@ void TGLText::SetGLTextFont(Font_t fontnumber)
@@ -204,7 +214,9 @@ void TGLText::SetGLTextFont(Font_t fontnumber)
fGLTextFont = new FTGLPolygonFont(ttfont);
@ -988,6 +982,32 @@ index 2ed3ee0917a..03feb0ee0a4 100644
Error("SetGLTextFont","Cannot set FTGL::FaceSize");
- delete [] ttfont;
}
diff --git a/gui/gui/src/TGApplication.cxx b/gui/gui/src/TGApplication.cxx
index 72d7dbbf95..73a44fdd7f 100644
--- a/gui/gui/src/TGApplication.cxx
+++ b/gui/gui/src/TGApplication.cxx
@@ -81,20 +81,12 @@ TGApplication::TGApplication(const char *appClassName,
gROOT->SetBatch(kFALSE);
if (strcmp(appClassName, "proofserv")) {
- const char *ttpath = gEnv->GetValue("Root.TTFontPath",
- TROOT::GetTTFFontDir());
- char *ttfont = gSystem->Which(ttpath, "arialbd.ttf", kReadPermission);
- // Added by cholm for use of DFSG - fonts - based on fix by Kevin
- if (!ttfont)
- ttfont = gSystem->Which(ttpath, "FreeSansBold.ttf", kReadPermission);
- if (ttfont && gEnv->GetValue("Root.UseTTFonts", 1)) {
+ if (gEnv->GetValue("Root.UseTTFonts", 1)) {
TPluginHandler *h;
if ((h = gROOT->GetPluginManager()->FindHandler("TVirtualX", "x11ttf")))
if (h->LoadPlugin() == -1)
Info("TGApplication", "no TTF support");
}
-
- delete [] ttfont;
}
// Create the canvas colors early so they are allocated before
--
2.52.0
2.45.0

View file

@ -0,0 +1,73 @@
From 8592c5e065b8cf46480f5a1efe0363fcf2150551 Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Tue, 4 Jun 2024 08:47:04 +0200
Subject: [PATCH] Correct format - warnings seen on 32 bit architectures
---
core/clib/src/mmapsup.c | 2 +-
roofit/xroofit/src/xRooNode.cxx | 2 +-
tree/dataframe/src/RDFDisplay.cxx | 4 ++--
tree/dataframe/src/RDFHelpers.cxx | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/core/clib/src/mmapsup.c b/core/clib/src/mmapsup.c
index 81f68a2059..da46dc7ba5 100644
--- a/core/clib/src/mmapsup.c
+++ b/core/clib/src/mmapsup.c
@@ -174,7 +174,7 @@ PTR __mmalloc_mmap_morecore(struct mdesc *mdp, int size)
if (mdp -> top != PAGE_ALIGN(mdp -> top)) {
fprintf(stderr,
"mmap_morecore error: base memory location (%p) is not aligned with %zu as required.\n",
- mdp -> top, (long)pagesize);
+ mdp -> top, pagesize);
return result;
}
mapto = mmap (mdp -> top, mapbytes, PROT_READ | PROT_WRITE,
diff --git a/roofit/xroofit/src/xRooNode.cxx b/roofit/xroofit/src/xRooNode.cxx
index f8c96fbf62..852e6997c0 100644
--- a/roofit/xroofit/src/xRooNode.cxx
+++ b/roofit/xroofit/src/xRooNode.cxx
@@ -11075,7 +11075,7 @@ std::string cling::printValue(const xRooNode *v)
if(!out.empty()) out += ","; else out += "{";
out += n->GetName();
if(out.length()>100 && left > 0) {
- out += TString::Format(",... and %lu more",left);
+ out += TString::Format(",... and %zu more",left);
break;
}
}
diff --git a/tree/dataframe/src/RDFDisplay.cxx b/tree/dataframe/src/RDFDisplay.cxx
index 9dc555fc1d..2ef7de7ddc 100644
--- a/tree/dataframe/src/RDFDisplay.cxx
+++ b/tree/dataframe/src/RDFDisplay.cxx
@@ -232,12 +232,12 @@ void RDisplay::Print() const
// Thus, the first column is only the Row column and the actual first column is printed
columnsToPrint = 2;
}
- Info("Print", "Only showing %lu columns out of %lu\n", columnsToPrint, fNColumns);
+ Info("Print", "Only showing %zu columns out of %zu\n", columnsToPrint, fNColumns);
allColumnsFit = false;
}
if (fNMaxCollectionElements < 1)
- Info("Print", "No collections shown since fNMaxCollectionElements is %lu\n", fNMaxCollectionElements);
+ Info("Print", "No collections shown since fNMaxCollectionElements is %zu\n", fNMaxCollectionElements);
auto nrRows = fTable.size();
std::cout << DashesBetweenLines(columnsToPrint, allColumnsFit); // Print dashes in the top of the table
diff --git a/tree/dataframe/src/RDFHelpers.cxx b/tree/dataframe/src/RDFHelpers.cxx
index 4891454cc0..3490901b5d 100644
--- a/tree/dataframe/src/RDFHelpers.cxx
+++ b/tree/dataframe/src/RDFHelpers.cxx
@@ -74,7 +74,7 @@ unsigned int ROOT::RDF::RunGraphs(std::vector<RResultHandle> handles)
const unsigned int nToRun =
std::count_if(handles.begin(), handles.end(), [](const auto &h) { return !h.IsReady(); });
if (nToRun < handles.size()) {
- Warning("RunGraphs", "Got %lu handles from which %lu link to results which are already ready.", handles.size(),
+ Warning("RunGraphs", "Got %zu handles from which %zu link to results which are already ready.", handles.size(),
handles.size() - nToRun);
}
if (nToRun == 0u)
--
2.45.1

View file

@ -1,32 +0,0 @@
From 7b1632f5602a1bb6e6278d66c25640349c852ab1 Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Fri, 9 Jan 2026 00:32:27 +0100
Subject: [PATCH] Starting with gcc 16, libstdc++ links to libatomic. Add to
whitelist.
$ ldd /lib64/libstdc++.so.6
linux-vdso.so.1 (0x00007f3cb4c13000)
libm.so.6 => /lib64/libm.so.6 (0x00007f3cb4afc000)
libatomic.so.1 => /lib64/libatomic.so.1 (0x00007f3cb4af1000)
libc.so.6 => /lib64/libc.so.6 (0x00007f3cb460d000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f3cb4ac5000)
/lib64/ld-linux-x86-64.so.2 (0x00007f3cb4c15000)
---
bindings/pyroot/pythonizations/test/import_load_libs.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/bindings/pyroot/pythonizations/test/import_load_libs.py b/bindings/pyroot/pythonizations/test/import_load_libs.py
index 63feeca89ba..18906ff921e 100644
--- a/bindings/pyroot/pythonizations/test/import_load_libs.py
+++ b/bindings/pyroot/pythonizations/test/import_load_libs.py
@@ -77,6 +77,7 @@ class ImportLoadLibs(unittest.TestCase):
"ld.*",
"libffi",
"libgcc_s",
+ "libatomic",
# AddressSanitizer runtime and ROOT configuration
"libclang_rt.asan-.*",
"libROOTSanitizerConfig",
--
2.52.0

25
root-gtest-back.patch Normal file
View file

@ -0,0 +1,25 @@
From 1942f5569b1d101f2c89341765ea37850e3de669 Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Fri, 17 Nov 2023 11:43:46 +0100
Subject: [PATCH 2/3] Add old gtest compat for SetUpTestSuite/TearDownTestSuite
---
tree/tree/test/friendinfo.cxx | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tree/tree/test/friendinfo.cxx b/tree/tree/test/friendinfo.cxx
index 141a495052..6e94056946 100644
--- a/tree/tree/test/friendinfo.cxx
+++ b/tree/tree/test/friendinfo.cxx
@@ -14,6 +14,8 @@
// Backward compatibility for gtest version < 1.10.0
#ifndef INSTANTIATE_TEST_SUITE_P
#define INSTANTIATE_TEST_SUITE_P INSTANTIATE_TEST_CASE_P
+#define SetUpTestSuite SetUpTestCase
+#define TearDownTestSuite TearDownTestCase
#endif
namespace {
--
2.42.0

View file

@ -0,0 +1,33 @@
From ba0dc65e558fd916dbe18f8dbe8208a3be932c25 Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Mon, 28 Mar 2022 09:20:18 +0200
Subject: [PATCH] Ignore warnings about RooNaNPacker not being implemented for
big endian
This warning is triggered in many tests, so it makes sense to put it
in the default ignored set.
---
core/testsupport/src/TestSupport.cxx | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/core/testsupport/src/TestSupport.cxx b/core/testsupport/src/TestSupport.cxx
index 259ab4e09c..79cd476950 100644
--- a/core/testsupport/src/TestSupport.cxx
+++ b/core/testsupport/src/TestSupport.cxx
@@ -73,6 +73,13 @@ static struct ForbidDiagnostics {
return;
}
+ // FIXME: RooNaNPacker warns about not being implemented for big endian
+ if (level == kWarning
+ && strcmp(msg, "Fast recovery from undefined function values only implemented for little-endian machines. If necessary, request an extension of functionality on https://root.cern") == 0) {
+ std::cerr << "Warning in " << location << " " << msg << std::endl;
+ return;
+ }
+
FAIL() << "Received unexpected diagnostic of severity "
<< level
<< " at '" << location << "' reading '" << msg << "'.\n"
--
2.42.0

36
root-jsmva-static.patch Normal file
View file

@ -0,0 +1,36 @@
diff -ur root-6.24.02.orig/bindings/jsmva/python/JsMVA/JPyInterface.py root-6.24.02/bindings/jsmva/python/JsMVA/JPyInterface.py
--- root-6.24.02.orig/bindings/jsmva/python/JsMVA/JPyInterface.py 2021-06-28 11:17:14.000000000 +0200
+++ root-6.24.02/bindings/jsmva/python/JsMVA/JPyInterface.py 2021-08-11 09:06:21.894746090 +0200
@@ -188,7 +188,7 @@
## Class for creating the output scripts and inserting them to cell output
class JsDraw:
## Base repository
- __jsMVARepo = "https://root.cern.ch/js/jsmva/latest"
+ __jsMVARepo = "/static/JsMVA"
## String containing the link to JavaScript files
__jsMVASourceDir = __jsMVARepo + "/js"
diff -ur root-6.24.02.orig/bindings/pyroot_legacy/JsMVA/JPyInterface.py root-6.24.02/bindings/pyroot_legacy/JsMVA/JPyInterface.py
--- root-6.24.02.orig/bindings/pyroot_legacy/JsMVA/JPyInterface.py 2021-06-28 11:17:14.000000000 +0200
+++ root-6.24.02/bindings/pyroot_legacy/JsMVA/JPyInterface.py 2021-08-11 09:06:21.925746168 +0200
@@ -188,7 +188,7 @@
## Class for creating the output scripts and inserting them to cell output
class JsDraw:
## Base repository
- __jsMVARepo = "https://root.cern.ch/js/jsmva/latest"
+ __jsMVARepo = "/static/JsMVA"
## String containing the link to JavaScript files
__jsMVASourceDir = __jsMVARepo + "/js"
diff -ur root-6.24.02.orig/etc/notebook/JsMVA/js/JsMVA.js root-6.24.02/etc/notebook/JsMVA/js/JsMVA.js
--- root-6.24.02.orig/etc/notebook/JsMVA/js/JsMVA.js 2021-06-28 11:17:14.000000000 +0200
+++ root-6.24.02/etc/notebook/JsMVA/js/JsMVA.js 2021-08-11 09:10:45.638410266 +0200
@@ -16,7 +16,7 @@
(function(factory){
- var JSROOT_source_dir = "https://root.cern/js/5.9.1/scripts/";
+ var JSROOT_source_dir = "/static/scripts/";
var url = "";
if (requirejs.s.contexts.hasOwnProperty("_")) {

89
root-new-zlib.patch Normal file
View file

@ -0,0 +1,89 @@
From 260fc202a1387cfc3f3ef756f584923ab5b0a198 Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Thu, 21 Dec 2023 17:58:49 +0100
Subject: [PATCH] Adapt tests to work with zlib-ng
Fedora 40 has replaced zlib with a zlib compatible version of zlib-ng
---
test/stress.cxx | 2 +-
test/stressGraphics.ref | 28 ++++++++++++++--------------
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/test/stress.cxx b/test/stress.cxx
index de8061a9fc..77f48d43b8 100644
--- a/test/stress.cxx
+++ b/test/stress.cxx
@@ -406,7 +406,7 @@ void stress3()
#else
constexpr Long64_t lastgood = 52090;
#endif
- constexpr Long64_t tolerance = 150;
+ constexpr Long64_t tolerance = 300;
#ifdef R__HAS_DEFAULT_LZ4
constexpr Long64_t difflastgoodlz4 = 5500;
if (last < lastgood - tolerance || last > lastgood + difflastgoodlz4 + tolerance || comp < 1.5 || comp > 2.1)
diff --git a/test/stressGraphics.ref b/test/stressGraphics.ref
index 16d06e33fa..a21068927d 100644
--- a/test/stressGraphics.ref
+++ b/test/stressGraphics.ref
@@ -2,12 +2,12 @@ Test# PS1Ref# PS1Err# PDFRef# PDFErr# JPGRef# JPGErr# PNGRef# PN
1 529 50 12767 50 23848 3700 3937 100 569 60
2 4627 600 14506 100 13368 7900 9208 3000 4690 600
3 452 50 12694 50 11232 4200 3796 10700 492 50
- 4 23617 1500 19386 100 143320 123000 45665 11000 24908 1500
+ 4 23617 1500 19386 200 143320 123000 45665 11000 24908 1500
5 1025 150 12802 200 33468 9900 30846 5000 1072 200
6 430 50 12669 50 9558 100 5325 700 471 50
7 4980 50 13893 50 16143 1300 12230 500 5011 70
8 5442 80 13473 50 18430 700 12398 300 5469 80
- 9 9253 100 14377 50 19851 2400 12199 900 9449 100
+ 9 9253 100 14377 100 19851 2400 12199 900 9449 100
10 8863 70 13645 100 24343 1100 23278 1700 8894 70
11 12971 100 14444 50 34063 2000 32033 1200 12864 150
12 7674 100 13533 50 83557 3000 38505 4000 7720 150
@@ -15,30 +15,30 @@ Test# PS1Ref# PS1Err# PDFRef# PDFErr# JPGRef# JPGErr# PNGRef# PN
14 14190539 4000000 12926 100 23076 9500 25987 3000 14190704 4000000
15 15690 5000 17179 200 23076 9500 15202 900 10437 5000
16 28072 400 23287 200 44462 11000 30062 5000 38007 400
- 17 20444 400 21520 100 27511 11000 16867 600 20721 400
- 18 15894 100 19305 100 27187 10300 15925 350 15925 100
- 19 22521 300 42926 150 43868 17000 19232 11000 22729 300
+ 17 20444 400 21520 150 27511 11000 16867 600 20721 400
+ 18 15894 100 19305 200 27187 10300 15925 350 15925 100
+ 19 22521 300 42926 200 43868 17000 19232 11000 22729 300
20 3664 600 14437 100 19824 6300 10396 900 4220 600
21 17608 600 13900 150 49440 6300 37586 9000 5938 600
22 4866 600 14162 100 30889 10050 21311 1800 4845 600
- 23 4131 40 15272 50 34038 2500 12258 1400 4162 40
+ 23 4131 40 15272 100 34038 2500 12258 1400 4162 40
24 7813 300 23739 100 11085 6000 6973 3100 8081 300
25 28422 150 29391 300 14104 14800 7386 2800 14493 150
26 4545 150 14541 100 27602 14800 13094 2800 4467 150
27 6141 200 15967 100 39594 21600 19331 7000 6596 500
28 9110 500 16584 200 21346 21600 10645 7000 8869 500
29 7419 500 15112 200 18872 21600 7928 7000 7296 500
- 30 17016 5500 18198 100 32434 17400 22157 5000 20823 5500
- 31 30615 8200 27176 150 50520 18200 35724 5400 36690 8200
- 32 3304592 100 712308 500 62688 19000 123056 7000 0 0
+ 30 17016 5500 18198 250 32434 17400 22157 5000 20823 5500
+ 31 30615 8200 27176 200 50520 18200 35724 5400 36690 8200
+ 32 3304592 100 712308 3000 62688 19000 123056 7000 0 0
33 89233 500 47975 300 65532 27800 37314 12000 90600 500
34 36514 300 16815 200 47408 12700 33739 3700 36399 300
- 35 207729 750 87126 100 76094 38000 54717 11000 210497 800
- 36 401670 6500 156361 500 62719 34100 45592 14000 410114 6500
- 37 566142 5000 225206 750 65828 31800 53934 6500 573396 5000
- 38 3738751 35000 1292739 8000 60580 9900 133547 3500 3783013 35000
+ 35 207729 750 87126 750 76094 38000 54717 11000 210497 800
+ 36 401670 6500 156361 2000 62719 34100 45592 14000 410114 6500
+ 37 566142 5000 225206 2000 65828 31800 53934 6500 573396 5000
+ 38 3738751 35000 1292739 12000 60580 9900 133547 3500 3783013 35000
39 1466028 9000 853193 50000 38425 13500 91242 18100 1463263 7500
- 40 38312 200 56877 250 36524 11800 119641 8000 38121 200
+ 40 38312 200 56877 750 36524 11800 119641 8000 38121 200
41 15025 3000 29289 500 42525 11300 33336 3900 14787 4000
42 254604 5000 383258 7000 55666 30400 46534 6500 259594 7000
43 4846 150 14075 150 33239 600 25303 300 4877 150
--
2.43.0

View file

@ -1,53 +1,30 @@
From b4e57c8ccd59d69fe61fa5f6470b3a99ba52aeeb Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Thu, 4 Dec 2025 23:13:28 +0100
Subject: [PATCH] Dont export Python modules
---
bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt | 3 +--
bindings/pyroot/pythonizations/CMakeLists.txt | 8 +-------
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt b/bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt
index bb48c032974..c34069855b2 100644
--- a/bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt
+++ b/bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt
@@ -119,8 +119,7 @@ install(TARGETS CPyCppyy EXPORT ${CMAKE_PROJECT_NAME}Exports
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries)
diff -ur root-6.24.02.orig/bindings/jupyroot/CMakeLists.txt root-6.24.02/bindings/jupyroot/CMakeLists.txt
--- root-6.24.02.orig/bindings/jupyroot/CMakeLists.txt 2021-06-28 11:17:14.000000000 +0200
+++ root-6.24.02/bindings/jupyroot/CMakeLists.txt 2021-08-11 10:53:03.272202496 +0200
@@ -70,8 +70,7 @@
endforeach()
-install(TARGETS cppyy EXPORT ${CMAKE_PROJECT_NAME}Exports
- RUNTIME DESTINATION ${CMAKE_INSTALL_PYTHONDIR}/cppyy COMPONENT libraries # Windows
+install(TARGETS cppyy RUNTIME DESTINATION ${CMAKE_INSTALL_PYTHONDIR}/cppyy COMPONENT libraries # Windows
LIBRARY DESTINATION ${CMAKE_INSTALL_PYTHONDIR}/cppyy COMPONENT libraries
ARCHIVE DESTINATION ${CMAKE_INSTALL_PYTHONDIR}/cppyy COMPONENT libraries)
# Install library
- install(TARGETS ${libname} EXPORT ${CMAKE_PROJECT_NAME}Exports
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries
+ install(TARGETS ${libname} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries
LIBRARY DESTINATION ${CMAKE_INSTALL_PYTHONDIR} COMPONENT libraries
ARCHIVE DESTINATION ${CMAKE_INSTALL_PYTHONDIR} COMPONENT libraries)
diff --git a/bindings/pyroot/pythonizations/CMakeLists.txt b/bindings/pyroot/pythonizations/CMakeLists.txt
index 1230f18ca47..2df4b733320 100644
--- a/bindings/pyroot/pythonizations/CMakeLists.txt
+++ b/bindings/pyroot/pythonizations/CMakeLists.txt
@@ -202,11 +202,6 @@ foreach(py_source ${py_sources})
COMMENT "Compiling PyROOT source ${py_source} for Python ${Python3_VERSION}")
endforeach()
diff -ur root-6.24.02.orig/bindings/pyroot/pythonizations/CMakeLists.txt root-6.24.02/bindings/pyroot/pythonizations/CMakeLists.txt
--- root-6.24.02.orig/bindings/pyroot/pythonizations/CMakeLists.txt 2021-06-28 11:17:14.000000000 +0200
+++ root-6.24.02/bindings/pyroot/pythonizations/CMakeLists.txt 2021-08-11 10:53:03.272202496 +0200
@@ -137,11 +137,10 @@
# Create meta-target PyROOT2 and PyROOT3 (INTERFACE library)
# Export of targets are not supported for custom targets(add_custom_targets())
add_library(PyROOT${python_major_version_string} INTERFACE)
- target_link_libraries(PyROOT${python_major_version_string} INTERFACE cppyy_backend${python_under_version_string} cppyy${python_under_version_string} ROOTPythonizations${python_under_version_string})
+ target_link_libraries(PyROOT${python_major_version_string} INTERFACE cppyy_backend${python_under_version_string} cppyy${python_under_version_string})
-# Create meta-target PyROOT3 (INTERFACE library)
-# Export of targets are not supported for custom targets(add_custom_targets())
-add_library(PyROOT INTERFACE)
-target_link_libraries(PyROOT INTERFACE cppyy_backend cppyy ROOTPythonizations)
-
# Define library output directories for build and install trees
set(pymoduledir_build "${localruntimedir}/ROOT")
set(pymoduledir_install "${CMAKE_INSTALL_PYTHONDIR}/ROOT")
@@ -231,8 +226,7 @@ if(NOT MSVC)
endif()
# Install library
- install(TARGETS ${libname} EXPORT ${CMAKE_PROJECT_NAME}Exports
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries
+ install(TARGETS ${libname} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libraries
LIBRARY DESTINATION ${CMAKE_INSTALL_PYTHONDIR} COMPONENT libraries
ARCHIVE DESTINATION ${CMAKE_INSTALL_PYTHONDIR} COMPONENT libraries)
# Install library
-install(TARGETS ${libname} EXPORT ${CMAKE_PROJECT_NAME}Exports
- RUNTIME DESTINATION ${pymoduledir_install} COMPONENT libraries
+install(TARGETS ${libname} RUNTIME DESTINATION ${pymoduledir_install} COMPONENT libraries
LIBRARY DESTINATION ${pymoduledir_install} COMPONENT libraries
ARCHIVE DESTINATION ${pymoduledir_install} COMPONENT libraries)
--
2.52.0

111
root-np32.patch Normal file
View file

@ -0,0 +1,111 @@
From 42b9c691fdd2d0001c61f78cc8adfbb9c994f6b4 Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Fri, 17 Nov 2023 11:46:14 +0100
Subject: [PATCH 3/3] Fix pythonizations test errors on ix86 Linux
======================================================================
ERROR: test_sliced_array (rdataframe_makenumpy.DataFrameFromNumpy.test_sliced_array)
Test correct reading of a sliced numpy array (#13690)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builddir/build/BUILD/root-6.30.00/bindings/pyroot/pythonizations/test/rdataframe_makenumpy.py", line 153, in test_sliced_array
x_col = df.Take['Long64_t']("x")
^^^^^^^^^^^^^^^^^^^^^^^^
cppyy.gbl.std.runtime_error: Could not instantiate Take<Long64_t>:
ROOT::RDF::RResultPtr<vector<Long64_t> > ROOT::RDF::RInterface<ROOT::Detail::RDF::RLoopManager,void>::Take(basic_string_view<char,char_traits<char> > column = "") =>
runtime_error: Column x has type int while the id specified is associated to type Long64_t
----------------------------------------------------------------------
======================================================================
ERROR: test_dtypes (rtensor.AsRTensor.test_dtypes)
Test adoption of numpy arrays with different data types
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builddir/build/BUILD/root-6.30.00/bindings/pyroot/pythonizations/test/rtensor.py", line 45, in test_dtypes
root_obj = ROOT.TMVA.Experimental.RTensor(self.cpptypes[i])(np_obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/builddir/build/BUILD/root-6.30.00/redhat-linux-build/lib/ROOT/_pythonization/_tmva/_rtensor.py", line 131, in RTensorInit
return self._original_init_(data,shape,layout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: none of the 6 overloaded methods succeeded. Full details:
RTensor<long,vector<long> >::RTensor<long,vector<long> >(TMVA::Experimental::RTensor<long,vector<long> >&&) =>
TypeError: takes at most 1 arguments (3 given)
RTensor<long,vector<long> >::RTensor<long,vector<long> >(const TMVA::Experimental::RTensor<long,vector<long> >&) =>
TypeError: takes at most 1 arguments (3 given)
RTensor<long,vector<long> >::RTensor<long,vector<long> >(shared_ptr<vector<long> > container, vector<unsigned int> shape, TMVA::Experimental::MemoryLayout layout = MemoryLayout::RowMajor) =>
TypeError: could not convert argument 1
RTensor<long,vector<long> >::RTensor<long,vector<long> >(vector<unsigned int> shape, TMVA::Experimental::MemoryLayout layout = MemoryLayout::RowMajor) =>
TypeError: takes at most 2 arguments (3 given)
RTensor<long,vector<long> >::RTensor<long,vector<long> >(long* data, vector<unsigned int> shape, vector<unsigned int> strides, TMVA::Experimental::MemoryLayout layout = MemoryLayout::RowMajor) =>
TypeError: could not convert argument 1 (could not convert argument to buffer or nullptr)
RTensor<long,vector<long> >::RTensor<long,vector<long> >(long* data, vector<unsigned int> shape, TMVA::Experimental::MemoryLayout layout = MemoryLayout::RowMajor) =>
TypeError: could not convert argument 1 (could not convert argument to buffer or nullptr)
----------------------------------------------------------------------
---
.../pyroot/pythonizations/test/rdataframe_makenumpy.py | 8 ++++----
bindings/pyroot/pythonizations/test/rtensor.py | 8 +-------
2 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/bindings/pyroot/pythonizations/test/rdataframe_makenumpy.py b/bindings/pyroot/pythonizations/test/rdataframe_makenumpy.py
index cd2ebc9b5b..cc46f5bea1 100644
--- a/bindings/pyroot/pythonizations/test/rdataframe_makenumpy.py
+++ b/bindings/pyroot/pythonizations/test/rdataframe_makenumpy.py
@@ -142,19 +142,19 @@ class DataFrameFromNumpy(unittest.TestCase):
gc.collect()
ref4 = sys.getrefcount(x)
self.assertEqual(ref1, ref4)
-
+
def test_sliced_array(self):
"""
Test correct reading of a sliced numpy array (#13690)
"""
- table = np.array([[1,2], [3,4]])
+ table = np.array([[1,2], [3,4]], dtype="int64")
columns = {'x': table[:,0], 'y': table[:,1]}
df = ROOT.RDF.FromNumpy(columns)
x_col = df.Take['Long64_t']("x")
y_col = df.Take['Long64_t']("y")
- self.assertEqual(list(x_col.GetValue()), [1,3])
+ self.assertEqual(list(x_col.GetValue()), [1,3])
self.assertEqual(list(y_col.GetValue()), [2,4])
-
+
if __name__ == '__main__':
unittest.main()
diff --git a/bindings/pyroot/pythonizations/test/rtensor.py b/bindings/pyroot/pythonizations/test/rtensor.py
index 99b458cfa9..ca119f0b41 100644
--- a/bindings/pyroot/pythonizations/test/rtensor.py
+++ b/bindings/pyroot/pythonizations/test/rtensor.py
@@ -2,7 +2,6 @@ import unittest
import ROOT
RTensor = ROOT.TMVA.Experimental.RTensor
import numpy as np
-import platform
def check_shape(root_obj, np_obj):
@@ -21,18 +20,13 @@ class AsRTensor(unittest.TestCase):
dtypes = [
"int32", "int64", "uint32", "uint64", "float32", "float64"
]
- cpptypes = ["int", "long", "unsigned int", "unsigned long", "float", "double"]
+ cpptypes = ["int32_t", "int64_t", "uint32_t", "uint64_t", "float", "double"]
# Tests
def test_dtypes(self):
"""
Test adoption of numpy arrays with different data types
"""
- #using long long on Linux does not work although it is same size as long
- if (platform.system() == "Windows") :
- self.cpptypes[1] = "long long"
- self.cpptypes[3] = "unsigned long long"
-
i = 0
for dtype in self.dtypes:
np_obj = np.array([[1, 2], [3, 4], [5, 6]], dtype=dtype)
--
2.43.0

83
root-old-gtest.patch Normal file
View file

@ -0,0 +1,83 @@
From 8b7369a527aa52204e1ce529c8cb206cfee4c61b Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Fri, 17 Nov 2023 16:18:12 +0100
Subject: [PATCH] Disable tests that don't compile with old gtest (EPEL 8)
---
core/metacling/test/TClingLoadUnloadFileTests.cxx | 2 ++
roofit/histfactory/test/testHistFactory.cxx | 2 ++
roofit/roofitcore/test/testRooProdPdf.cxx | 2 ++
roofit/roofitcore/test/testTestStatistics.cxx | 2 ++
4 files changed, 8 insertions(+)
diff --git a/core/metacling/test/TClingLoadUnloadFileTests.cxx b/core/metacling/test/TClingLoadUnloadFileTests.cxx
index 7f97f3f441..d1b7a65fbc 100644
--- a/core/metacling/test/TClingLoadUnloadFileTests.cxx
+++ b/core/metacling/test/TClingLoadUnloadFileTests.cxx
@@ -73,6 +73,7 @@ void remove_n_library_artifacts(const std::string &basename, unsigned int n)
}
}
+/*
TEST(TClingLoadUnloadFile, ConcurrentLoadUnloadSameLib)
{
GTEST_SKIP() << "fails sporadically, see "
@@ -125,3 +126,4 @@ TEST(TClingLoadUnloadFile, ConcurrentLoadUnloadOneLibPerThread)
remove_n_library_artifacts(basename, n_libraries);
}
+*/
diff --git a/roofit/histfactory/test/testHistFactory.cxx b/roofit/histfactory/test/testHistFactory.cxx
index 7553ba4e4a..fefdca8e97 100644
--- a/roofit/histfactory/test/testHistFactory.cxx
+++ b/roofit/histfactory/test/testHistFactory.cxx
@@ -752,6 +752,7 @@ std::string getNameFromInfo(testing::TestParamInfo<HFFixture::ParamType> const &
return getName(paramInfo.param, false);
}
+/*
INSTANTIATE_TEST_SUITE_P(
HistFactory, HFFixture,
testing::Combine(testing::Values(MakeModelMode::OverallSyst, MakeModelMode::HistoSyst, MakeModelMode::StatSyst,
@@ -784,3 +785,4 @@ INSTANTIATE_TEST_SUITE_P(HistFactoryCodeGen, HFFixtureFit,
testing::Values(RooFit::EvalBackend::Codegen())),
getNameFromInfo);
#endif
+*/
diff --git a/roofit/roofitcore/test/testRooProdPdf.cxx b/roofit/roofitcore/test/testRooProdPdf.cxx
index 34fb559cd1..09734f5c5d 100644
--- a/roofit/roofitcore/test/testRooProdPdf.cxx
+++ b/roofit/roofitcore/test/testRooProdPdf.cxx
@@ -64,6 +64,7 @@ TEST_P(TestProdPdf, CachingOpt)
<< "b=" << b.getVal() << " +- " << b.getError() << " doesn't match truth value with O" << _optimize << ".";
}
+/*
INSTANTIATE_TEST_SUITE_P(RooProdPdf, TestProdPdf,
testing::Combine(testing::Values(0, 1, 2),
testing::Values(ROOFIT_EVAL_BACKENDS)),
@@ -72,6 +73,7 @@ INSTANTIATE_TEST_SUITE_P(RooProdPdf, TestProdPdf,
ss << "opt" << std::get<0>(paramInfo.param) << std::get<1>(paramInfo.param).name();
return ss.str();
});
+*/
TEST(RooProdPdf, TestGetPartIntList)
{
diff --git a/roofit/roofitcore/test/testTestStatistics.cxx b/roofit/roofitcore/test/testTestStatistics.cxx
index 3099d82060..5846353043 100644
--- a/roofit/roofitcore/test/testTestStatistics.cxx
+++ b/roofit/roofitcore/test/testTestStatistics.cxx
@@ -585,6 +585,7 @@ INSTANTIATE_TEST_SUITE_P(RooNLLVar, TestStatisticTest, testing::Values(ROOFIT_EV
return ss.str();
});
+/*
INSTANTIATE_TEST_SUITE_P(RooNLLVar, OffsetBinTest,
testing::Combine(testing::Values(ROOFIT_EVAL_BACKENDS), // EvalBackend
testing::Values(false, true), // unbinned or binned
@@ -622,3 +623,4 @@ INSTANTIATE_TEST_SUITE_P(RooNLLVarBinnedL, OffsetBinTest,
ss << (std::get<5>(paramInfo.param) ? "BinnedL" : "");
return ss.str();
});
+*/

456
root-pcre2.patch Normal file
View file

@ -0,0 +1,456 @@
From f89fc640f9ca1b2cccf0dc496b0b7ea434b53fad Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Mon, 2 Oct 2023 09:25:13 +0200
Subject: [PATCH] Support PCRE2
---
.../pythonizations/test/import_load_libs.py | 1 +
cmake/modules/FindPCRE2.cmake | 106 ++++++++++++++++++
cmake/modules/SearchInstalledSoftware.cmake | 17 +--
core/base/CMakeLists.txt | 9 +-
core/base/src/TPRegexp.cxx | 99 +++++++++++++++-
tutorials/legacy/regexp/regexp.C | 6 +-
6 files changed, 223 insertions(+), 15 deletions(-)
create mode 100644 cmake/modules/FindPCRE2.cmake
diff --git a/bindings/pyroot/pythonizations/test/import_load_libs.py b/bindings/pyroot/pythonizations/test/import_load_libs.py
index 087db7da5c..179c76f6fd 100644
--- a/bindings/pyroot/pythonizations/test/import_load_libs.py
+++ b/bindings/pyroot/pythonizations/test/import_load_libs.py
@@ -23,6 +23,7 @@ class ImportLoadLibs(unittest.TestCase):
'libc',
'libdl',
'libpcre',
+ 'libpcre2-8',
# libCling and dependencies
'libCling.*',
'librt',
diff --git a/cmake/modules/FindPCRE2.cmake b/cmake/modules/FindPCRE2.cmake
new file mode 100644
index 0000000000..2417453e8b
--- /dev/null
+++ b/cmake/modules/FindPCRE2.cmake
@@ -0,0 +1,106 @@
+# Copyright (C) 1995-2019, Rene Brun and Fons Rademakers.
+# All rights reserved.
+#
+# For the licensing terms see $ROOTSYS/LICENSE.
+# For the list of contributors see $ROOTSYS/README/CREDITS.
+
+#.rst:
+# FindPCRE2
+# --------
+#
+# Find PCRE2 library
+#
+# Imported Targets
+# ^^^^^^^^^^^^^^^^
+#
+# This module defines :prop_tgt:`IMPORTED` target:
+#
+# ``PCRE2::PCRE2``
+# The pcre2 library, if found.
+#
+# Result Variables
+# ^^^^^^^^^^^^^^^^
+# This module will set the following variables in your project:
+#
+# ``PCRE2_FOUND``
+# True if PCRE2 has been found.
+# ``PCRE2_INCLUDE_DIRS``
+# Where to find pcre2.h
+# ``PCRE2_LIBRARIES``
+# The libraries to link against to use PCRE2.
+# ``PCRE2_VERSION``
+# The version of the PCRE2 found (e.g. 10.42)
+#
+# Obsolete variables
+# ^^^^^^^^^^^^^^^^^^
+#
+# The following variables may also be set, for backwards compatibility:
+#
+# ``PCRE2_PCRE2_LIBRARY``
+# where to find the PCRE2_PCRE2 library.
+# ``PCRE2_INCLUDE_DIR``
+# where to find the pcre2.h header (same as PCRE2_INCLUDE_DIRS)
+#
+
+foreach(var PCRE2_FOUND PCRE2_INCLUDE_DIR PCRE2_PCRE2_LIBRARY PCRE2_LIBRARIES)
+ unset(${var} CACHE)
+endforeach()
+
+find_path(PCRE2_INCLUDE_DIR NAMES pcre2.h PATH_SUFFIXES include)
+mark_as_advanced(PCRE2_INCLUDE_DIR)
+
+if (PCRE2_INCLUDE_DIR AND EXISTS "${PCRE2_INCLUDE_DIR}/pcre2.h")
+ file(STRINGS "${PCRE2_INCLUDE_DIR}/pcre2.h" PCRE2_H REGEX "^#define PCRE2_(MAJOR|MINOR).*$")
+ string(REGEX REPLACE "^.*PCRE2_MAJOR[ ]+([0-9]+).*$" "\\1" PCRE2_VERSION_MAJOR "${PCRE2_H}")
+ string(REGEX REPLACE "^.*PCRE2_MINOR[ ]+([0-9]+).*$" "\\1" PCRE2_VERSION_MINOR "${PCRE2_H}")
+ set(PCRE2_VERSION "${PCRE2_VERSION_MAJOR}.${PCRE2_VERSION_MINOR}")
+endif()
+
+if(NOT PCRE2_PCRE2_LIBRARY)
+ find_library(PCRE2_PCRE2_LIBRARY_RELEASE NAMES pcre2-8)
+ find_library(PCRE2_PCRE2_LIBRARY_DEBUG NAMES pcre2-8${CMAKE_DEBUG_POSTFIX} pcre2-8d)
+ include(SelectLibraryConfigurations)
+ select_library_configurations(PCRE2_PCRE2)
+endif()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(PCRE2
+ REQUIRED_VARS
+ PCRE2_INCLUDE_DIR
+ PCRE2_PCRE2_LIBRARY
+ VERSION_VAR
+ PCRE2_VERSION
+)
+
+if(PCRE2_FOUND)
+ set(PCRE2_INCLUDE_DIRS "${PCRE2_INCLUDE_DIR}")
+
+ if (NOT PCRE2_LIBRARIES)
+ set(PCRE2_LIBRARIES "${PCRE2_PCRE2_LIBRARY}")
+ endif()
+
+ if(NOT TARGET PCRE2::PCRE2)
+ add_library(PCRE2::PCRE2 UNKNOWN IMPORTED)
+ set_target_properties(PCRE2::PCRE2 PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "${PCRE2_INCLUDE_DIRS}")
+
+ if(PCRE2_PCRE2_LIBRARY_DEBUG)
+ set_property(TARGET PCRE2::PCRE2 APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS DEBUG)
+ set_target_properties(PCRE2::PCRE2 PROPERTIES
+ IMPORTED_LOCATION_DEBUG "${PCRE2_PCRE2_LIBRARY_DEBUG}")
+ endif()
+
+ if(PCRE2_PCRE2_LIBRARY_RELEASE)
+ set_property(TARGET PCRE2::PCRE2 APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS RELEASE)
+ set_target_properties(PCRE2::PCRE2 PROPERTIES
+ IMPORTED_LOCATION_RELEASE "${PCRE2_PCRE2_LIBRARY_RELEASE}")
+ endif()
+
+ if(NOT PCRE2_PCRE2_LIBRARY_DEBUG AND NOT PCRE2_PCRE2_LIBRARY_RELEASE)
+ set_property(TARGET PCRE2::PCRE2 APPEND PROPERTY
+ IMPORTED_LOCATION "${PCRE2_PCRE2_LIBRARY}")
+ endif()
+ endif()
+endif()
diff --git a/cmake/modules/SearchInstalledSoftware.cmake b/cmake/modules/SearchInstalledSoftware.cmake
index 464155fd50..252aa56737 100644
--- a/cmake/modules/SearchInstalledSoftware.cmake
+++ b/cmake/modules/SearchInstalledSoftware.cmake
@@ -204,13 +204,16 @@ if(NOT builtin_pcre)
foreach(suffix FOUND INCLUDE_DIR PCRE_LIBRARY)
unset(PCRE_${suffix} CACHE)
endforeach()
- if(fail-on-missing)
- find_package(PCRE REQUIRED)
- else()
- find_package(PCRE)
- if(NOT PCRE_FOUND)
- message(STATUS "PCRE not found. Switching on builtin_pcre option")
- set(builtin_pcre ON CACHE BOOL "Enabled because PCRE not found (${builtin_pcre_description})" FORCE)
+ find_package(PCRE2)
+ if(NOT PCRE2_FOUND)
+ if(fail-on-missing)
+ find_package(PCRE REQUIRED)
+ else()
+ find_package(PCRE)
+ if(NOT PCRE_FOUND)
+ message(STATUS "PCRE not found. Switching on builtin_pcre option")
+ set(builtin_pcre ON CACHE BOOL "Enabled because PCRE not found (${builtin_pcre_description})" FORCE)
+ endif()
endif()
endif()
endif()
diff --git a/core/base/CMakeLists.txt b/core/base/CMakeLists.txt
index df701fedea..5798c93775 100644
--- a/core/base/CMakeLists.txt
+++ b/core/base/CMakeLists.txt
@@ -214,7 +214,14 @@ target_include_directories(Core PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/v7/inc>
)
-target_link_libraries(Core PRIVATE PCRE::PCRE)
+if(PCRE2_FOUND)
+ target_link_libraries(Core PRIVATE PCRE2::PCRE2)
+ set_source_files_properties(src/TPRegexp.cxx
+ TARGET_DIRECTORY Core
+ PROPERTIES COMPILE_DEFINITIONS USE_PCRE2)
+else()
+ target_link_libraries(Core PRIVATE PCRE::PCRE)
+endif()
ROOT_INSTALL_HEADERS(${BASE_HEADER_DIRS})
diff --git a/core/base/src/TPRegexp.cxx b/core/base/src/TPRegexp.cxx
index 949b8cc8e9..d70f3e5b8b 100644
--- a/core/base/src/TPRegexp.cxx
+++ b/core/base/src/TPRegexp.cxx
@@ -25,19 +25,36 @@ found at : http://perldoc.perl.org/perlre.html
#include "TObjString.h"
#include "TError.h"
+#ifdef USE_PCRE2
+#ifdef R__WIN32
+#define PCRE2_STATIC
+#endif
+#define PCRE2_CODE_UNIT_WIDTH 8
+#include <pcre2.h>
+#define PCRE_CASELESS PCRE2_CASELESS
+#define PCRE_MULTILINE PCRE2_MULTILINE
+#define PCRE_DOTALL PCRE2_DOTALL
+#define PCRE_EXTENDED PCRE2_EXTENDED
+#define PCRE_ERROR_NOMATCH PCRE2_ERROR_NOMATCH
+#else
#ifdef R__WIN32
#define PCRE_STATIC
#endif
#include <pcre.h>
+#endif
#include <vector>
#include <stdexcept>
struct PCREPriv_t {
+#ifdef USE_PCRE2
+ pcre2_code *fPCRE;
+ PCREPriv_t() { fPCRE = nullptr; }
+#else
pcre *fPCRE;
pcre_extra *fPCREExtra;
-
PCREPriv_t() { fPCRE = nullptr; fPCREExtra = nullptr; }
+#endif
};
@@ -79,10 +96,15 @@ TPRegexp::TPRegexp(const TPRegexp &p)
TPRegexp::~TPRegexp()
{
+#ifdef USE_PCRE2
+ if (fPriv->fPCRE)
+ pcre2_code_free(fPriv->fPCRE);
+#else
if (fPriv->fPCRE)
pcre_free(fPriv->fPCRE);
if (fPriv->fPCREExtra)
pcre_free(fPriv->fPCREExtra);
+#endif
delete fPriv;
}
@@ -93,12 +115,18 @@ TPRegexp &TPRegexp::operator=(const TPRegexp &p)
{
if (this != &p) {
fPattern = p.fPattern;
+#ifdef USE_PCRE2
+ if (fPriv->fPCRE)
+ pcre2_code_free(fPriv->fPCRE);
+ fPriv->fPCRE = nullptr;
+#else
if (fPriv->fPCRE)
pcre_free(fPriv->fPCRE);
fPriv->fPCRE = nullptr;
if (fPriv->fPCREExtra)
pcre_free(fPriv->fPCREExtra);
fPriv->fPCREExtra = nullptr;
+#endif
fPCREOpts = p.fPCREOpts;
}
return *this;
@@ -197,31 +225,50 @@ TString TPRegexp::GetModifiers() const
void TPRegexp::Compile()
{
+#ifdef USE_PCRE2
+ if (fPriv->fPCRE)
+ pcre2_code_free(fPriv->fPCRE);
+#else
if (fPriv->fPCRE)
pcre_free(fPriv->fPCRE);
+#endif
if (fPCREOpts & kPCRE_DEBUG_MSGS)
Info("Compile", "PREGEX compiling %s", fPattern.Data());
+#ifdef USE_PCRE2
+ int errcode;
+ PCRE2_SIZE patIndex;
+ fPriv->fPCRE = pcre2_compile((PCRE2_SPTR)fPattern.Data(), fPattern.Length(),
+ fPCREOpts & kPCRE_INTMASK,
+ &errcode, &patIndex, nullptr);
+#else
const char *errstr;
Int_t patIndex;
fPriv->fPCRE = pcre_compile(fPattern.Data(), fPCREOpts & kPCRE_INTMASK,
&errstr, &patIndex, nullptr);
+#endif
if (!fPriv->fPCRE) {
+#ifdef USE_PCRE2
+ PCRE2_UCHAR errstr[256];
+ pcre2_get_error_message(errcode, errstr, 256);
+#endif
if (fgThrowAtCompileError) {
throw std::runtime_error
(TString::Format("TPRegexp::Compile() compilation of TPRegexp(%s) failed at: %d because %s",
- fPattern.Data(), patIndex, errstr).Data());
+ fPattern.Data(), (int)patIndex, errstr).Data());
} else {
Error("Compile", "compilation of TPRegexp(%s) failed at: %d because %s",
- fPattern.Data(), patIndex, errstr);
+ fPattern.Data(), (int)patIndex, errstr);
return;
}
}
+#ifndef USE_PCRE2
if (fPriv->fPCREExtra || (fPCREOpts & kPCRE_OPTIMIZE))
Optimize();
+#endif
}
////////////////////////////////////////////////////////////////////////////////
@@ -229,6 +276,7 @@ void TPRegexp::Compile()
void TPRegexp::Optimize()
{
+#ifndef USE_PCRE2
if (fPriv->fPCREExtra)
pcre_free(fPriv->fPCREExtra);
@@ -243,6 +291,7 @@ void TPRegexp::Optimize()
Error("Optimize", "Optimization of TPRegexp(%s) failed: %s",
fPattern.Data(), errstr);
}
+#endif
}
////////////////////////////////////////////////////////////////////////////////
@@ -308,21 +357,43 @@ Int_t TPRegexp::MatchInternal(const TString &s, Int_t start,
Int_t nMaxMatch, TArrayI *pos) const
{
Int_t *offVec = new Int_t[3*nMaxMatch];
+
+#ifdef USE_PCRE2
+ pcre2_match_data *match_data;
+ match_data = pcre2_match_data_create_from_pattern(fPriv->fPCRE, nullptr);
+ Int_t nrMatch = pcre2_match(fPriv->fPCRE, (PCRE2_SPTR8)s.Data(),
+ s.Length(), start, 0,
+ match_data, nullptr);
+#else
// pcre_exec allows less options - see pcre_internal.h PUBLIC_EXEC_OPTIONS.
Int_t nrMatch = pcre_exec(fPriv->fPCRE, fPriv->fPCREExtra, s.Data(),
s.Length(), start, 0,
offVec, 3*nMaxMatch);
+#endif
if (nrMatch == PCRE_ERROR_NOMATCH)
nrMatch = 0;
else if (nrMatch <= 0) {
Error("Match","pcre_exec error = %d", nrMatch);
+#ifdef USE_PCRE2
+ pcre2_match_data_free(match_data);
+#endif
delete [] offVec;
return 0;
}
- if (pos)
+ if (pos) {
+#ifdef USE_PCRE2
+ PCRE2_SIZE *oVec = pcre2_get_ovector_pointer(match_data);
+ for (int i = 0; i < 2 * nrMatch; ++i)
+ offVec[i] = oVec[i];
+#endif
pos->Set(2*nrMatch, offVec);
+ }
+
+#ifdef USE_PCRE2
+ pcre2_match_data_free(match_data);
+#endif
delete [] offVec;
return nrMatch;
@@ -404,13 +475,24 @@ Int_t TPRegexp::SubstituteInternal(TString &s, const TString &replacePattern,
Int_t offset = start;
Int_t last = 0;
+#ifdef USE_PCRE2
+ pcre2_match_data *match_data;
+ match_data = pcre2_match_data_create_from_pattern(fPriv->fPCRE, nullptr);
+#endif
+
while (kTRUE) {
// find next matching subs
// pcre_exec allows less options - see pcre_internal.h PUBLIC_EXEC_OPTIONS.
+#ifdef USE_PCRE2
+ Int_t nrMatch = pcre2_match(fPriv->fPCRE, (PCRE2_SPTR)s.Data(),
+ s.Length(), offset, 0,
+ match_data, nullptr);
+#else
Int_t nrMatch = pcre_exec(fPriv->fPCRE, fPriv->fPCREExtra, s.Data(),
s.Length(), offset, 0,
offVec, 3*nMaxMatch);
+#endif
if (nrMatch == PCRE_ERROR_NOMATCH) {
break;
@@ -419,6 +501,12 @@ Int_t TPRegexp::SubstituteInternal(TString &s, const TString &replacePattern,
break;
}
+#ifdef USE_PCRE2
+ PCRE2_SIZE *oVec = pcre2_get_ovector_pointer(match_data);
+ for (int i = 0; i < 2 * nrMatch; ++i)
+ offVec[i] = oVec[i];
+#endif
+
// append anything previously unmatched, but not substituted
if (last <= offVec[0]) {
fin += s(last,offVec[0]-last);
@@ -446,6 +534,9 @@ Int_t TPRegexp::SubstituteInternal(TString &s, const TString &replacePattern,
}
}
+#ifdef USE_PCRE2
+ pcre2_match_data_free(match_data);
+#endif
delete [] offVec;
fin += s(last,s.Length()-last);
diff --git a/tutorials/legacy/regexp/regexp.C b/tutorials/legacy/regexp/regexp.C
index 995b823bce..f38ed6799e 100644
--- a/tutorials/legacy/regexp/regexp.C
+++ b/tutorials/legacy/regexp/regexp.C
@@ -94,11 +94,11 @@ void regexp()
// criteria:
// 1) It should be of the form string1@string2 . The "^" and "$" ensure that we compare the complete
// email string
- // 2) ([\\w-\\.]+) :
+ // 2) ([\\w\\-\\.]+) :
// string1 is only allowed to be composed out of the alphanumeric characters, "-" and "." .
// The "+" ensures that string1 can not be empty .
// 3) string2 is matched against three different parts :
- // a. ((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([\\w-]+\\.)+)) :
+ // a. ((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([\\w\\-]+\\.)+)) :
// This regular expression ensures that EITHER the string starts with "[" followed by three groups
// of numbers, separated by "." , where each group has 1 to 3 numbers, OR alphanumeric strings,
// possibly containing "-" characters, separated by "." .
@@ -108,7 +108,7 @@ void regexp()
// At most one "]" character .
TString s5("fons.rademakers@cern.ch");
- TPRegexp r5("^([\\w-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([\\w-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$");
+ TPRegexp r5("^([\\w\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([\\w\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$");
cout << "Check if the email address \"" << s5 << "\" is valid: " << (r5.MatchB(s5) ? "TRUE" : "FALSE") << endl;
// Substitute Example with pattern modifier :
--
2.41.0

View file

@ -0,0 +1,62 @@
From 4d1486b95cd8c7850b12bd1777ea4463529f0b96 Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Sat, 8 Jun 2024 17:08:48 +0200
Subject: [PATCH] [pyroot] Add __firstlineno__ and __static_attributes__ to
blacklist
For compatibility with Python 3.13
See: https://docs.python.org/3.13/whatsnew/3.13.html
From the above page:
* Classes have a new __firstlineno__ attribute, populated by the
compiler, with the line number of the first line of the class
definition. (Contributed by Serhiy Storchaka in gh-118465.)
* Classes have a new __static_attributes__ attribute, populated by the
compiler, with a tuple of names of attributes of this class which
are accessed through self.X from any function in its
body. (Contributed by Irit Katriel in gh-115775.)
Without adding the new attributes to the blacklist there are errors:
AttributeError: 'int' object attribute 'doc' is read-only
from the __firstlineno__ attribute.
AttributeError: 'tuple' object attribute 'doc' is read-only
from the __static_attributes__ attribute.
---
.../python/ROOT/_pythonization/_roofit/__init__.py | 2 +-
.../pythonizations/python/ROOT/_pythonization/_tmva/__init__.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/bindings/pyroot/pythonizations/python/ROOT/_pythonization/_roofit/__init__.py b/bindings/pyroot/pythonizations/python/ROOT/_pythonization/_roofit/__init__.py
index 83b3b69e3b..4ebd53736d 100644
--- a/bindings/pyroot/pythonizations/python/ROOT/_pythonization/_roofit/__init__.py
+++ b/bindings/pyroot/pythonizations/python/ROOT/_pythonization/_roofit/__init__.py
@@ -122,7 +122,7 @@ def get_defined_attributes(klass, consider_base_classes=False):
any of its base classes (except for `object`).
"""
- blacklist = ["__dict__", "__doc__", "__hash__", "__module__", "__weakref__"]
+ blacklist = ["__dict__", "__doc__", "__hash__", "__module__", "__weakref__", "__firstlineno__", "__static_attributes__"]
if not consider_base_classes:
return sorted([attr for attr in klass.__dict__.keys() if attr not in blacklist])
diff --git a/bindings/pyroot/pythonizations/python/ROOT/_pythonization/_tmva/__init__.py b/bindings/pyroot/pythonizations/python/ROOT/_pythonization/_tmva/__init__.py
index b2dea5b541..72c210663d 100644
--- a/bindings/pyroot/pythonizations/python/ROOT/_pythonization/_tmva/__init__.py
+++ b/bindings/pyroot/pythonizations/python/ROOT/_pythonization/_tmva/__init__.py
@@ -69,7 +69,7 @@ def get_defined_attributes(klass, consider_base_classes=False):
any of its base classes (except for `object`).
"""
- blacklist = ["__dict__", "__doc__", "__hash__", "__module__", "__weakref__"]
+ blacklist = ["__dict__", "__doc__", "__hash__", "__module__", "__weakref__", "__firstlineno__", "__static_attributes__"]
if not consider_base_classes:
return sorted([attr for attr in klass.__dict__.keys() if attr not in blacklist])
--
2.45.2

32
root-r.patch Normal file
View file

@ -0,0 +1,32 @@
From 141f62e800bfc54d2fdf76c0750dc6082d00910d Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Sun, 21 Jul 2024 23:09:54 +0200
Subject: [PATCH] Update ROOT's R interface for Rcpp 1.0.13
---
bindings/r/inc/TRInternalFunction.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/bindings/r/inc/TRInternalFunction.h b/bindings/r/inc/TRInternalFunction.h
index d9bf532205..fa77cbddbc 100644
--- a/bindings/r/inc/TRInternalFunction.h
+++ b/bindings/r/inc/TRInternalFunction.h
@@ -31,7 +31,15 @@ public:
RCPP_GENERATE_CTOR_ASSIGN(TRInternalFunction_Impl)
+#if RCPP_VERSION >= Rcpp_Version(1,0,13)
+ template <typename OUT, typename... T>
+ TRInternalFunction_Impl(OUT(*fun)(T...))
+ {
+ set(Rcpp::XPtr< Rcpp::CppFunctionN<OUT, T...> >(new Rcpp::CppFunctionN<OUT, T...>(fun), false));
+ }
+#else
#include <TRInternalFunction__ctors.h>
+#endif
void update(SEXP) {}
private:
--
2.45.2

View file

@ -72,7 +72,14 @@ wget -N ${SITE}/tesla.root
wget -N ${SITE}/wa91_ref_3.root
wget -N ${SITE}/wa91.root
wget -N ${SITE}/AtlasGraphs.root
wget -N ${SITE}/europe.root
wget -N ${SITE}/Higgs_data.root
wget -N ${SITE}/linearIO.root
wget -N ${SITE}/stressHistogram.5.18.00.root
wget -N ${SITE}/tmva_class_example.root
wget -N ${SITE}/tmva_multiclass_example.root
wget -N ${SITE}/tmva_reg_example.root
wget -N ${SITE}/usa.root
for f in *.root ; do ln -s $f $f.ROOT.cachefile ; done

View file

@ -0,0 +1,86 @@
From e6928c405fe1647a0ee6ea32543b18ebc3828227 Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Thu, 23 Feb 2023 22:10:46 +0100
Subject: [PATCH] Use consistent wording of the comments in the different TMVA
classification tests to avoid confusion.
---
tutorials/tmva/TMVA_CNN_Classification.C | 2 +-
tutorials/tmva/TMVA_CNN_Classification.py | 4 ++--
tutorials/tmva/TMVA_RNN_Classification.C | 6 ++++--
tutorials/tmva/TMVA_RNN_Classification.py | 5 +++--
4 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/tutorials/tmva/TMVA_CNN_Classification.C b/tutorials/tmva/TMVA_CNN_Classification.C
index cc6829a24d..db5af784d4 100644
--- a/tutorials/tmva/TMVA_CNN_Classification.C
+++ b/tutorials/tmva/TMVA_CNN_Classification.C
@@ -134,7 +134,7 @@ void TMVA_CNN_Classification(int nevts = 1000, std::vector<bool> opt = {1, 1, 1,
bool writeOutputFile = true;
- int num_threads = 4; // use by default 4 threads if value is not set before
+ int num_threads = 4; // use max 4 threads
// switch off MT in OpenBLAS to avoid conflict with tbb
gSystem->Setenv("OMP_NUM_THREADS", "1");
diff --git a/tutorials/tmva/TMVA_CNN_Classification.py b/tutorials/tmva/TMVA_CNN_Classification.py
index 85fde20763..5d3c6e7220 100644
--- a/tutorials/tmva/TMVA_CNN_Classification.py
+++ b/tutorials/tmva/TMVA_CNN_Classification.py
@@ -25,7 +25,7 @@
import ROOT
-#switch off MT in OpenMP (BLAS)
+# switch off MT in OpenBLAS to avoid conflict with tbb
ROOT.gSystem.Setenv("OMP_NUM_THREADS", "1")
TMVA = ROOT.TMVA
@@ -145,7 +145,7 @@ if not useTMVACNN:
writeOutputFile = True
-num_threads = 4 # use default threads
+num_threads = 4 # use max 4 threads
max_epochs = 10 # maximum number of epochs used for training
diff --git a/tutorials/tmva/TMVA_RNN_Classification.C b/tutorials/tmva/TMVA_RNN_Classification.C
index 8701ba6c19..d4bb7a4e4a 100644
--- a/tutorials/tmva/TMVA_RNN_Classification.C
+++ b/tutorials/tmva/TMVA_RNN_Classification.C
@@ -191,8 +191,10 @@ void TMVA_RNN_Classification(int nevts = 2000, int use_type = 1)
useKeras = false;
#endif
- int num_threads = 4; // use by default all threads
- gSystem->Setenv("OMP_NUM_THREADS", "1"); // switch off MT in OpenBLAS
+ int num_threads = 4; // use max 4 threads
+ // switch off MT in OpenBLAS to avoid conflict with tbb
+ gSystem->Setenv("OMP_NUM_THREADS", "1");
+
// do enable MT running
if (num_threads >= 0) {
ROOT::EnableImplicitMT(num_threads);
diff --git a/tutorials/tmva/TMVA_RNN_Classification.py b/tutorials/tmva/TMVA_RNN_Classification.py
index 625a120b3d..65aa83c070 100644
--- a/tutorials/tmva/TMVA_RNN_Classification.py
+++ b/tutorials/tmva/TMVA_RNN_Classification.py
@@ -26,10 +26,11 @@ num_threads = 4 # use max 4 threads
# do enable MT running
if ROOT.gSystem.GetFromPipe("root-config --has-imt") == "yes":
ROOT.EnableImplicitMT(num_threads)
- ROOT.gSystem.Setenv("OMP_NUM_THREADS", "1") # switch OFF MT in OpenBLAS
+ # switch off MT in OpenBLAS to avoid conflict with tbb
+ ROOT.gSystem.Setenv("OMP_NUM_THREADS", "1")
print("Running with nthreads = {}".format(ROOT.GetThreadPoolSize()))
else:
- print("Running in serail mode since ROOT does not support MT")
+ print("Running in serial mode since ROOT does not support MT")
TMVA = ROOT.TMVA
--
2.39.2

View file

@ -1,135 +0,0 @@
From 44c501ac9fdb9049783d9738a9603eec572f52f0 Mon Sep 17 00:00:00 2001
From: Jonas Rembser <jonas.rembser@cern.ch>
Date: Wed, 26 Nov 2025 18:11:25 +0100
Subject: [PATCH] [vecops] Adaptive size of long RVec instances in RVec test
For the tests to make sense, some vectors need to be longer than the
maximum small vector size. This maximum size is compiler and
architecture dependent. For `RVec<int>` on ARM64 with gcc 14, the
small vector capacity turns out to be 60, which is larger than the
current test vector size of 18.
Therefore, the test is refactored to adapt the large vector size
automatically, according to the maximum small vector size.
---
math/vecops/test/vecops_rvec.cxx | 81 +++++++++++++++++++++++++-------
1 file changed, 63 insertions(+), 18 deletions(-)
diff --git a/math/vecops/test/vecops_rvec.cxx b/math/vecops/test/vecops_rvec.cxx
index 432c673a553..8cbe36ee6d8 100644
--- a/math/vecops/test/vecops_rvec.cxx
+++ b/math/vecops/test/vecops_rvec.cxx
@@ -1672,15 +1672,35 @@ TEST_P(VecOpsSwap, BothSmallVectors)
TEST_P(VecOpsSwap, BothRegularVectors)
{
- RVec<int> fixed_vreg1{1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3};
- RVec<int> fixed_vreg2{4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6};
- RVec<int> fixed_vreg3{7, 8, 9, 7, 8, 9, 7, 8, 9, 7, 8, 9, 7, 8, 9, 7, 8, 9, 7};
+ constexpr std::size_t smallVecSize = ROOT::Internal::VecOps::RVecInlineStorageSize<int>::value;
+
+ // The number of elemens in the large RVecs will be the smallest multiple of
+ // three that larger than smallVecSize.
+ constexpr int nCycle = 3;
+ constexpr std::size_t nElems = ((smallVecSize / nCycle) + 1) * nCycle;
+
+ RVec<int> fixed_vreg1(nElems);
+ RVec<int> fixed_vreg2(nElems);
+ RVec<int> fixed_vreg3(nElems + 1);
RVec<int> fixed_vmocksmall{0, 7};
- RVec<int> vreg1{1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3};
- RVec<int> vreg2{4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6};
- RVec<int> vreg3{7, 8, 9, 7, 8, 9, 7, 8, 9, 7, 8, 9, 7, 8, 9, 7, 8, 9, 7};
- RVec<int> vmocksmall{0, 7, 8, 9, 7, 8, 9, 7, 8, 9, 7, 8, 7, 8, 9, 7, 8, 9};
+ RVec<int> vreg1(nElems);
+ RVec<int> vreg2(nElems);
+ RVec<int> vreg3(nElems + 1);
+ RVec<int> vmocksmall(nElems + 1);
+
+ for (std::size_t i = 0; i < nElems; ++i) {
+ vreg1[i] = (i % nCycle) + 1;
+ vreg2[i] = vreg1[i] + nCycle;
+ vreg3[i] = vreg2[i] + nCycle;
+ fixed_vreg1[i] = vreg1[i];
+ fixed_vreg2[i] = vreg2[i];
+ fixed_vreg3[i] = vreg3[i];
+ vmocksmall[i + 1] = vreg3[i];
+ }
+ fixed_vreg3[nElems] = fixed_vreg3[0];
+ vreg3[nElems] = vreg3[0];
+
vmocksmall.erase(vmocksmall.begin() + 2, vmocksmall.end());
// vmocksmall is a regular vector of size 2
@@ -1798,11 +1818,22 @@ TEST_P(VecOpsSwap, BothAdoptingVectors)
// in cases where ROOT::VecOps::swap produces 1 regular and 1 adopting vector
TEST_P(VecOpsSwap, SmallRegularVectors)
{
+ constexpr std::size_t smallVecSize = ROOT::Internal::VecOps::RVecInlineStorageSize<int>::value;
+
+ // The number of elemens in the large RVecs will be the smallest multiple of
+ // three that larger than smallVecSize.
+ constexpr int nCycle = 3;
+ constexpr std::size_t nElems1 = ((smallVecSize / nCycle) + 1) * nCycle;
+ constexpr std::size_t nElems2 = nElems1 + nCycle; // some vectors should be larger than others
+
RVec<int> fixed_vsmall{1, 2, 3};
RVec<int> fixed_vreg1{4, 5, 6};
RVec<int> fixed_vreg2{7, 8};
RVec<int> fixed_vreg3{9, 10, 11, 12, 13, 14};
- RVec<int> fixed_vreg4{15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30};
+ RVec<int> fixed_vreg4(nElems1);
+ for (std::size_t i = 0; i < nElems1; ++i) {
+ fixed_vreg4[i] = i + 15;
+ }
// need multiple hard copies since after swap of a small and a regular,
// there is no fixed policy whether 2 regular vectors are produced or 1 small and 1 regular
@@ -1815,19 +1846,33 @@ TEST_P(VecOpsSwap, SmallRegularVectors)
RVec<int> vsmall7{1, 2, 3};
RVec<int> vsmall8{1, 2, 3};
- RVec<int> vreg1{4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6};
- vreg1.erase(vreg1.begin() + 3, vreg1.end()); // regular vector of size 3
- RVec<int> vreg10{4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6};
+ RVec<int> vreg1;
+ RVec<int> vreg10;
+ RVec<int> vreg2{7, 8};
+ RVec<int> vreg20{7, 8};
+ RVec<int> vreg3{9, 10, 11, 12, 13, 14};
+ RVec<int> vreg30{9, 10, 11, 12, 13, 14};
+ RVec<int> vreg4(nElems1);
+
+ for (std::size_t i = 0; i < nElems2; ++i) {
+ double val = (i % nCycle) + 4;
+ vreg1.push_back(val);
+ vreg10.push_back(vreg1.back());
+ vreg2.push_back(val);
+ vreg20.push_back(vreg2.back());
+ vreg3.push_back(val);
+ vreg30.push_back(vreg3.back());
+ }
+ for (std::size_t i = 0; i < nElems1; ++i) {
+ vreg4[i] = i + 15;
+ }
+
+ vreg1.erase(vreg1.begin() + 3, vreg1.end()); // regular vector of size 3
vreg10.erase(vreg10.begin() + 3, vreg10.end()); // regular vector of size 3
- RVec<int> vreg2{7, 8, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6};
- vreg2.erase(vreg2.begin() + 2, vreg2.end()); // regular vector of size 2
- RVec<int> vreg20{7, 8, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6};
+ vreg2.erase(vreg2.begin() + 2, vreg2.end()); // regular vector of size 2
vreg20.erase(vreg20.begin() + 2, vreg20.end()); // regular vector of size 2
- RVec<int> vreg3{9, 10, 11, 12, 13, 14, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6};
- vreg3.erase(vreg3.begin() + 6, vreg3.end()); // regular vector of size 6
- RVec<int> vreg30{9, 10, 11, 12, 13, 14, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6, 4, 5, 6};
+ vreg3.erase(vreg3.begin() + 6, vreg3.end()); // regular vector of size 6
vreg30.erase(vreg30.begin() + 6, vreg30.end()); // regular vector of size 6
- RVec<int> vreg4{15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30};
// vreg4 is a regular vector that cannot "fit" to small vector
// verify that initially vectors are not small
--
2.52.0

125
root-write-array.patch Normal file
View file

@ -0,0 +1,125 @@
From a7be6f726b13a7ccf1c46dec35f53520781159df Mon Sep 17 00:00:00 2001
From: Mattias Ellert <mattias.ellert@physics.uu.se>
Date: Fri, 7 Jun 2024 06:49:39 +0200
Subject: [PATCH] Put back check for n = 0
---
io/io/src/TBufferFile.cxx | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/io/io/src/TBufferFile.cxx b/io/io/src/TBufferFile.cxx
index 81e0f95e02..b5b7ef9831 100644
--- a/io/io/src/TBufferFile.cxx
+++ b/io/io/src/TBufferFile.cxx
@@ -1948,6 +1948,8 @@ void TBufferFile::WriteArrayDouble32(const Double_t *d, Int_t n, TStreamerElemen
void TBufferFile::WriteFastArray(const Bool_t *b, Long64_t n)
{
+ if (n == 0) return;
+
constexpr Int_t dataWidth = static_cast<Int_t>(sizeof(UChar_t));
const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth;
if (n < 0 || n > maxElements)
@@ -1974,6 +1976,8 @@ void TBufferFile::WriteFastArray(const Bool_t *b, Long64_t n)
void TBufferFile::WriteFastArray(const Char_t *c, Long64_t n)
{
+ if (n == 0) return;
+
constexpr Int_t dataWidth = static_cast<Int_t>(sizeof(Char_t));
const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth;
if (n < 0 || n > maxElements)
@@ -1995,6 +1999,8 @@ void TBufferFile::WriteFastArray(const Char_t *c, Long64_t n)
void TBufferFile::WriteFastArrayString(const Char_t *c, Long64_t n)
{
+ if (n == 0) return;
+
constexpr Int_t dataWidth = static_cast<Int_t>(sizeof(Char_t));
const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth;
if (n < 0 || n > maxElements)
@@ -2023,6 +2029,8 @@ void TBufferFile::WriteFastArrayString(const Char_t *c, Long64_t n)
void TBufferFile::WriteFastArray(const Short_t *h, Long64_t n)
{
+ if (n == 0) return;
+
constexpr Int_t dataWidth = static_cast<Int_t>(sizeof(Short_t));
const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth;
if (n < 0 || n > maxElements)
@@ -2054,7 +2062,8 @@ void TBufferFile::WriteFastArray(const Short_t *h, Long64_t n)
void TBufferFile::WriteFastArray(const Int_t *ii, Long64_t n)
{
-
+ if (n == 0) return;
+
constexpr Int_t dataWidth = 4;
const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth;
if (n < 0 || n > maxElements)
@@ -2086,6 +2095,8 @@ void TBufferFile::WriteFastArray(const Int_t *ii, Long64_t n)
void TBufferFile::WriteFastArray(const Long_t *ll, Long64_t n)
{
+ if (n == 0) return;
+
constexpr Int_t dataWidth = 8;
const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth;
if (n < 0 || n > maxElements)
@@ -2108,6 +2119,8 @@ void TBufferFile::WriteFastArray(const Long_t *ll, Long64_t n)
void TBufferFile::WriteFastArray(const ULong_t *ll, Long64_t n)
{
+ if (n == 0) return;
+
constexpr Int_t dataWidth = 8;
const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth;
if (n < 0 || n > maxElements)
@@ -2128,6 +2141,8 @@ void TBufferFile::WriteFastArray(const ULong_t *ll, Long64_t n)
void TBufferFile::WriteFastArray(const Long64_t *ll, Long64_t n)
{
+ if (n == 0) return;
+
constexpr Int_t dataWidth = static_cast<Int_t>(sizeof(Long64_t));
const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth;
if (n < 0 || n > maxElements)
@@ -2154,6 +2169,8 @@ void TBufferFile::WriteFastArray(const Long64_t *ll, Long64_t n)
void TBufferFile::WriteFastArray(const Float_t *f, Long64_t n)
{
+ if (n == 0) return;
+
constexpr Int_t dataWidth = static_cast<Int_t>(sizeof(Float_t));
const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth;
if (n < 0 || n > maxElements)
@@ -2185,6 +2202,8 @@ void TBufferFile::WriteFastArray(const Float_t *f, Long64_t n)
void TBufferFile::WriteFastArray(const Double_t *d, Long64_t n)
{
+ if (n == 0) return;
+
constexpr Int_t dataWidth = static_cast<Int_t>(sizeof(Double_t));
const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth;
if (n < 0 || n > maxElements)
@@ -2212,6 +2231,8 @@ void TBufferFile::WriteFastArray(const Double_t *d, Long64_t n)
void TBufferFile::WriteFastArrayFloat16(const Float_t *f, Long64_t n, TStreamerElement *ele)
{
+ if (n == 0) return;
+
constexpr Int_t dataWidth = static_cast<Int_t>(sizeof(Float_t));
const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth;
if (n < 0 || n > maxElements)
@@ -2270,6 +2291,8 @@ void TBufferFile::WriteFastArrayFloat16(const Float_t *f, Long64_t n, TStreamerE
void TBufferFile::WriteFastArrayDouble32(const Double_t *d, Long64_t n, TStreamerElement *ele)
{
+ if (n == 0) return;
+
constexpr Int_t dataWidth = static_cast<Int_t>(sizeof(Float_t));
const Int_t maxElements = (std::numeric_limits<Int_t>::max() - Length())/dataWidth;
if (n < 0 || n > maxElements)
--
2.45.2

1788
root.spec

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,2 @@
SHA512 (root-6.38.00.tar.xz) = 7c452b509e8171a0cbb7c102a3d4c07333fc8535f1b2c2ab0b9f7434604f098989a78bb71c41039dd41dbbd3438ea8703939826092f075d9d730b6b53c84ac55
SHA512 (root-testfiles.tar.xz) = 4bb7f8ca00b1427ba49f6428e9cfe5908a2ffdd2ce4134d3bc169a0629198352b5500fe0cf92c121d148e5af41f7016c96038a77794a4d37d94e6ec0a9d75670
SHA512 (clad-2.2.tar.gz) = 6f76d706a829901fc0fcdb38b5ddad6ea8ad9186ea48a4b6b585fc62974a2cda11b96a448c25daaba0586962d6428773e7ab751236c6afa72a91d12f30f2d05e
SHA512 (root-6.30.08.tar.xz) = a0cded2407c84553b5226cc3032a3e6c6aad1db4cb543c22c4e6f129632047e6edee78bd9fd03835ff6801b1e2c0d109d45a2af4884e48d95d1669915baf4aa2
SHA512 (root-testfiles.tar.xz) = 945aef1a0cf5af672d4ab84b0ac00b76118e93008ff72447658ee82d9e955a1540af3ff7126e701418872f1d91b92ee96d4985840a519036c42732023a13f00f