]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
spns #38031: compilation of root and URANIE on DB12
authorGuytri KASTANE <guytri.kastane@cea.fr>
Fri, 22 Mar 2024 14:32:09 +0000 (15:32 +0100)
committerGuytri KASTANE <guytri.kastane@cea.fr>
Mon, 22 Apr 2024 09:24:05 +0000 (11:24 +0200)
applications/SALOME-master-native.pyconf
products/patches/root-6.22-numeric_limits.patch [new file with mode: 0644]
products/patches/root-6.22-python-11.patch [new file with mode: 0644]
products/patches/root-include_limits.patch [new file with mode: 0644]
products/root.pyconf

index 8dc8cc992ab7c8a264805db6702660e58374f1f5..1d0f5c354bc83d57a434a39b2f6929c14081b5a3 100644 (file)
@@ -261,10 +261,10 @@ __overwrite__ :
     {
         __condition__ : "VARS.dist in ['DB12']"
         'APPLICATION.products.CONFIGURATION'    : 'master'
-        'APPLICATION.rm_products'               : ['root', 'URANIE']
         'APPLICATION.products.cmake'            : 'native' # TTK requires cmake > 3.21
         'APPLICATION.products.opencv'           : {tag: '3.2.0',     base: 'no', section: 'version_3_2_0_DB12'}
         'APPLICATION.products.cminpack'         : 'native'
+        'APPLICATION.products.root'             : {tag: '6.22.02', base: 'no', section: 'version_6_22_02_DB12'}
         'APPLICATION.products.swig'             : '4.0.2'
         'APPLICATION.products.tbb'              : '2021.9.0'
         'APPLICATION.products.PyFMI'            : {tag: '2.6',       base: 'no', section: 'version_2_6_DB12'          }
diff --git a/products/patches/root-6.22-numeric_limits.patch b/products/patches/root-6.22-numeric_limits.patch
new file mode 100644 (file)
index 0000000..b40911f
--- /dev/null
@@ -0,0 +1,13 @@
+
+diff -Naur root/core/foundation/inc/ROOT/libcpp_string_view.h root_dev/core/foundation/inc/ROOT/libcpp_string_view.h
+--- root/core/foundation/inc/ROOT/libcpp_string_view.h 2020-08-17 14:41:56.000000000 +0200
++++ root_dev/core/foundation/inc/ROOT/libcpp_string_view.h     2024-03-22 11:00:07.359412709 +0100
+@@ -8,6 +8,8 @@
+ //
+ //===----------------------------------------------------------------------===//
++#include <limits>
++
+ #ifndef _LIBCPP_LFTS_STRING_VIEW
+ #define _LIBCPP_LFTS_STRING_VIEW
+
diff --git a/products/patches/root-6.22-python-11.patch b/products/patches/root-6.22-python-11.patch
new file mode 100644 (file)
index 0000000..2cf6516
--- /dev/null
@@ -0,0 +1,82 @@
+diff -Naur root/bindings/pyroot/cppyy/CPyCppyy/src/CPPConstructor.cxx root_dev/bindings/pyroot/cppyy/CPyCppyy/src/CPPConstructor.cxx
+--- root/bindings/pyroot/cppyy/CPyCppyy/src/CPPConstructor.cxx 2020-08-17 14:41:56.000000000 +0200
++++ root_dev/bindings/pyroot/cppyy/CPyCppyy/src/CPPConstructor.cxx     2024-03-22 12:43:13.311091738 +0100
+@@ -11,6 +11,12 @@
+ // Standard
+ #include <string>
++// https://bugzilla.redhat.com/show_bug.cgi?id=2021796
++#if PY_VERSION_HEX < 0x030900A4 && !defined(Py_SET_TYPE)
++static inline void _Py_SET_TYPE(PyObject *ob, PyTypeObject *type)
++{ ob->ob_type = type; }
++#define Py_SET_TYPE(ob, type) _Py_SET_TYPE((PyObject*)(ob), type)
++#endif
+ //- protected members --------------------------------------------------------
+ bool CPyCppyy::CPPConstructor::InitExecutor_(Executor*& executor, CallContext*)
+@@ -123,7 +129,7 @@
+             if (pyclass) {
+                 self->SetSmart((PyObject*)Py_TYPE(self));
+                 Py_DECREF((PyObject*)Py_TYPE(self));
+-                Py_TYPE(self) = (PyTypeObject*)pyclass;
++                Py_SET_TYPE(self,(PyTypeObject*)pyclass);
+             }
+         }
+diff -Naur root/bindings/pyroot/cppyy/CPyCppyy/src/CPPInstance.cxx root_dev/bindings/pyroot/cppyy/CPyCppyy/src/CPPInstance.cxx
+--- root/bindings/pyroot/cppyy/CPyCppyy/src/CPPInstance.cxx    2020-08-17 14:41:56.000000000 +0200
++++ root_dev/bindings/pyroot/cppyy/CPyCppyy/src/CPPInstance.cxx        2024-03-22 13:35:13.353430656 +0100
+@@ -764,7 +764,6 @@
+     0,                             // tp_as_buffer
+     Py_TPFLAGS_DEFAULT |
+         Py_TPFLAGS_BASETYPE |
+-        Py_TPFLAGS_HAVE_GC |
+         Py_TPFLAGS_CHECKTYPES,     // tp_flags
+     (char*)"cppyy object proxy (internal)", // tp_doc
+     0,                             // tp_traverse
+diff -Naur root/bindings/pyroot/cppyy/CPyCppyy/src/CPPOverload.cxx root_dev/bindings/pyroot/cppyy/CPyCppyy/src/CPPOverload.cxx
+--- root/bindings/pyroot/cppyy/CPyCppyy/src/CPPOverload.cxx    2020-08-17 14:41:56.000000000 +0200
++++ root_dev/bindings/pyroot/cppyy/CPyCppyy/src/CPPOverload.cxx        2024-03-22 11:20:59.002747612 +0100
+@@ -1,7 +1,7 @@
+ // Bindings
+ #include "CPyCppyy.h"
+ #include "structmember.h"    // from Python
+-#if PY_VERSION_HEX >= 0x02050000
++#if PY_VERSION_HEX >= 0x02050000 && PY_VERSION_HEX < 0x030B0000
+ #include "code.h"            // from Python
+ #else
+ #include "compile.h"         // from Python
+diff -Naur root/bindings/pyroot/cppyy/CPyCppyy/src/CustomPyTypes.cxx root_dev/bindings/pyroot/cppyy/CPyCppyy/src/CustomPyTypes.cxx
+--- root/bindings/pyroot/cppyy/CPyCppyy/src/CustomPyTypes.cxx  2020-08-17 14:41:56.000000000 +0200
++++ root_dev/bindings/pyroot/cppyy/CPyCppyy/src/CustomPyTypes.cxx      2024-03-22 13:36:53.326012656 +0100
+@@ -78,8 +78,7 @@
+     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+     (ternaryfunc)tpc_call,        // tp_call
+     0, 0, 0, 0,
+-    Py_TPFLAGS_DEFAULT |
+-        Py_TPFLAGS_HAVE_GC,       // tp_flags
++    Py_TPFLAGS_DEFAULT,       // tp_flags
+     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ #if PY_VERSION_HEX >= 0x02030000
+     , 0                           // tp_del
+diff -Naur root/bindings/pyroot/cppyy/CPyCppyy/src/MemoryRegulator.cxx root_dev/bindings/pyroot/cppyy/CPyCppyy/src/MemoryRegulator.cxx
+--- root/bindings/pyroot/cppyy/CPyCppyy/src/MemoryRegulator.cxx        2020-08-17 14:41:56.000000000 +0200
++++ root_dev/bindings/pyroot/cppyy/CPyCppyy/src/MemoryRegulator.cxx    2024-03-22 13:42:08.271843845 +0100
+@@ -45,7 +45,7 @@
+         ((PyVarObject&)CPyCppyy_NoneType).ob_size = 0;
+         CPyCppyy_NoneType.tp_name        = const_cast<char*>("CPyCppyy_NoneType");
+-        CPyCppyy_NoneType.tp_flags       = Py_TPFLAGS_HAVE_RICHCOMPARE | Py_TPFLAGS_HAVE_GC;
++        CPyCppyy_NoneType.tp_flags       = Py_TPFLAGS_HAVE_RICHCOMPARE;
+         CPyCppyy_NoneType.tp_traverse    = (traverseproc)0;
+         CPyCppyy_NoneType.tp_clear       = (inquiry)0;
+@@ -135,6 +135,7 @@
+             CPyCppyy_NoneType.tp_traverse   = Py_TYPE(pyobj)->tp_traverse;
+             CPyCppyy_NoneType.tp_clear      = Py_TYPE(pyobj)->tp_clear;
+             CPyCppyy_NoneType.tp_free       = Py_TYPE(pyobj)->tp_free;
++            CPyCppyy_NoneType.tp_flags      = Py_TYPE(pyobj)->tp_flags;
+         } else if (CPyCppyy_NoneType.tp_traverse != Py_TYPE(pyobj)->tp_traverse) {
+         // TODO: SystemError?
+             std::cerr << "in CPyCppyy::MemoryRegulater, unexpected object of type: "
diff --git a/products/patches/root-include_limits.patch b/products/patches/root-include_limits.patch
new file mode 100644 (file)
index 0000000..3c0c86d
--- /dev/null
@@ -0,0 +1,11 @@
+--- root.ref/core/foundation/inc/ROOT/libcpp_string_view.h     2020-08-17 14:41:56.000000000 +0200
++++ root.dev/core/foundation/inc/ROOT/libcpp_string_view.h     2023-10-13 14:49:56.207768679 +0200
+@@ -186,7 +186,7 @@
+ #include <ostream>
+ #include <iomanip>
+ #include <stdexcept>
+-
++#include <limits>
+ //#include <__debug>
+ #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) && !defined(_MSC_VER)
index 649e3446be74d033ad0ea0b30ba77c02996abf88..7cdb7b51107b9bbd494bad3392cbd9654db15457 100644 (file)
@@ -66,10 +66,16 @@ version_6_22_02:
     patches : ['root-6.22.02.patch']
 }
 
+version_6_22_02_DB12:
+{
+    get_source : "archive"
+    patches : ['root-6.22.02.patch', 'root-6.22-python-11.patch', 'root-include_limits.patch']
+}
+
 version_6_22_02_CO9:
 {
     get_source : "archive"
-    patches : ['root-6.22.02.patch', 'root-include_limits_CO9.patch']
+    patches : ['root-6.22.02.patch', 'root-include_limits.patch']
 }
 
 version_6_22_02_UB22_04: