From 8dc216ba15f19afc228cf54f6579eefc26c5c86d Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Tue, 18 Feb 2025 14:05:04 +0100 Subject: [PATCH 01/34] [legacy] boost: Bump 1.87.0 --- cmake/legacy.cmake | 5 ++--- legacy/README.md | 2 +- legacy/boost/support-numpy-2.patch | 28 ---------------------------- 3 files changed, 3 insertions(+), 32 deletions(-) delete mode 100644 legacy/boost/support-numpy-2.patch diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index 5c89f7cc..ea5915a4 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -143,7 +143,7 @@ ExternalProject_Add(faircmakemodules ) list(APPEND packages boost) -set(boost_version "83") +set(boost_version "87") set(boost_features "cxxstd=${CMAKE_CXX_STANDARD}" "link=shared" @@ -164,9 +164,8 @@ endif() ExternalProject_Add(boost URL "https://archives.boost.io/release/1.${boost_version}.0/source/boost_1_${boost_version}_0.tar.bz2" - URL_HASH SHA256=6478edfe2f3305127cffe8caf73ea0176c53769f4bf1585be237eb30798c3b8e + URL_HASH SHA256=af57be25cb4c4f4b413ed692fe378affb4352ea50fbe294a11ef548f4d527d89 BUILD_IN_SOURCE ON - PATCH_COMMAND ${patch} -d libs/python -p1 -i "${CMAKE_SOURCE_DIR}/legacy/boost/support-numpy-2.patch" CONFIGURE_COMMAND "./bootstrap.sh" "--prefix=${CMAKE_INSTALL_PREFIX}" ${boost_python_config_bootstrap} diff --git a/legacy/README.md b/legacy/README.md index b900930e..abd629c4 100644 --- a/legacy/README.md +++ b/legacy/README.md @@ -101,7 +101,7 @@ please contact us. | **Package** | **Version** | **URL** | | --- | --- | --- | -| boost | 1.83.0 | https://www.boost.org/ | +| boost | 1.87.0 | https://www.boost.org/ | | clhep | 2.4.7.1 | http://proj-clhep.web.cern.ch | | dds | 3.8 | http://dds.gsi.de | | faircmakemodules | 1.0.0 | https://github.com/FairRootGroup/FairCMakeModules | diff --git a/legacy/boost/support-numpy-2.patch b/legacy/boost/support-numpy-2.patch deleted file mode 100644 index f4f029ab..00000000 --- a/legacy/boost/support-numpy-2.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 33ac06ca59a68266d3d26edf08205d31ddab4a6c Mon Sep 17 00:00:00 2001 -From: Alexis DUBURCQ -Date: Fri, 15 Mar 2024 14:10:16 +0100 -Subject: [PATCH] Support numpy 2.0.0b1 - ---- - src/numpy/dtype.cpp | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/src/numpy/dtype.cpp b/src/numpy/dtype.cpp -index 88a20a27b5..da30d1927b 100644 ---- a/src/numpy/dtype.cpp -+++ b/src/numpy/dtype.cpp -@@ -98,7 +98,13 @@ python::detail::new_reference dtype::convert(object const & arg, bool align) - return python::detail::new_reference(reinterpret_cast(obj)); - } - --int dtype::get_itemsize() const { return reinterpret_cast(ptr())->elsize;} -+int dtype::get_itemsize() const { -+#if NPY_ABI_VERSION < 0x02000000 -+ return reinterpret_cast(ptr())->elsize; -+#else -+ return PyDataType_ELSIZE(reinterpret_cast(ptr())); -+#endif -+} - - bool equivalent(dtype const & a, dtype const & b) { - // On Windows x64, the behaviour described on From 064bca2e94ffca621abf8444632f97776833dbc6 Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Tue, 18 Feb 2025 14:12:03 +0100 Subject: [PATCH 02/34] [legacy] fmt: Bump 11.1.4 --- cmake/legacy.cmake | 4 ++-- legacy/README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index ea5915a4..d92145ad 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -184,10 +184,10 @@ ExternalProject_Add(boost ) list(APPEND packages fmt) -set(fmt_version "10.1.1") +set(fmt_version "11.1.4") ExternalProject_Add(fmt URL "https://github.com/fmtlib/fmt/releases/download/${fmt_version}/fmt-${fmt_version}.zip" - URL_HASH SHA256=b84e58a310c9b50196cda48d5678d5fa0849bca19e5fdba6b684f0ee93ed9d1b + URL_HASH SHA256=49b039601196e1a765e81c5c9a05a61ed3d33f23b3961323d7322e4fe213d3e6 ${CMAKE_DEFAULT_ARGS} CMAKE_ARGS "-DFMT_DOC=OFF" ${LOG_TO_FILE} diff --git a/legacy/README.md b/legacy/README.md index abd629c4..4e13d84d 100644 --- a/legacy/README.md +++ b/legacy/README.md @@ -108,7 +108,7 @@ please contact us. | fairlogger | 1.11.1 | https://github.com/FairRootGroup/FairLogger | | fairmq | 1.8.4 | https://github.com/FairRootGroup/FairMQ | | flatbuffers | 23.5.26 | https://github.com/google/flatbuffers | -| fmt | 10.1.1 | https://github.com/fmtlib/fmt | +| fmt | 11.1.4 | https://github.com/fmtlib/fmt | | geant3 | 4-2_fairsoft | https://github.com/FairRootGroup/geant3 | | geant4 | 11.2.0 | https://geant4.web.cern.ch | | geant4_vmc | 6-5 | https://github.com/vmc-project/geant4_vmc | From 8a473ef916c1ba4d284e6abd334ffb10271da6c5 Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Tue, 18 Feb 2025 14:13:37 +0100 Subject: [PATCH 03/34] [legacy] dds: Bump 3.13 --- cmake/legacy.cmake | 3 +-- legacy/README.md | 2 +- legacy/dds/relax_protobuf_requirement.patch | 11 ----------- 3 files changed, 2 insertions(+), 14 deletions(-) delete mode 100644 legacy/dds/relax_protobuf_requirement.patch diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index d92145ad..9b81e221 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -198,10 +198,9 @@ if(ICU_ROOT) set(dds_icu_hint "-DDDS_LD_LIBRARY_PATH=${ICU_ROOT}/lib") endif() list(APPEND packages dds) -set(dds_version "3.8") +set(dds_version "3.13") ExternalProject_Add(dds GIT_REPOSITORY https://github.com/FairRootGroup/DDS GIT_TAG ${dds_version} - PATCH_COMMAND ${patch} -p1 -i "${CMAKE_SOURCE_DIR}/legacy/dds/relax_protobuf_requirement.patch" UPDATE_DISCONNECTED ON ${CMAKE_DEFAULT_ARGS} CMAKE_ARGS ${dds_icu_hint} diff --git a/legacy/README.md b/legacy/README.md index 4e13d84d..05b62bb6 100644 --- a/legacy/README.md +++ b/legacy/README.md @@ -103,7 +103,7 @@ please contact us. | --- | --- | --- | | boost | 1.87.0 | https://www.boost.org/ | | clhep | 2.4.7.1 | http://proj-clhep.web.cern.ch | -| dds | 3.8 | http://dds.gsi.de | +| dds | 3.13 | http://dds.gsi.de | | faircmakemodules | 1.0.0 | https://github.com/FairRootGroup/FairCMakeModules | | fairlogger | 1.11.1 | https://github.com/FairRootGroup/FairLogger | | fairmq | 1.8.4 | https://github.com/FairRootGroup/FairMQ | diff --git a/legacy/dds/relax_protobuf_requirement.patch b/legacy/dds/relax_protobuf_requirement.patch deleted file mode 100644 index f5a21944..00000000 --- a/legacy/dds/relax_protobuf_requirement.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -261,7 +261,7 @@ endif(Boost_FOUND) - # - # Search for protobuf - # --find_package(Protobuf 3.15 REQUIRED) -+find_package(Protobuf REQUIRED) - add_subdirectory(proto) - - # DDS Misc Common From 5fe35a6429423463fe0f41e0d830f56513362d4d Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Tue, 18 Feb 2025 14:15:00 +0100 Subject: [PATCH 04/34] [legacy] fairlogger: Bump 2.2.0 --- cmake/legacy.cmake | 2 +- legacy/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index 9b81e221..3b5ac87c 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -215,7 +215,7 @@ ExternalProject_Add_Step(dds build_wn_bin DEPENDEES build DEPENDERS install ) list(APPEND packages fairlogger) -set(fairlogger_version "1.11.1") +set(fairlogger_version "2.2.0") ExternalProject_Add(fairlogger GIT_REPOSITORY https://github.com/FairRootGroup/FairLogger GIT_TAG v${fairlogger_version} ${CMAKE_DEFAULT_ARGS} CMAKE_ARGS diff --git a/legacy/README.md b/legacy/README.md index 05b62bb6..e4a0a8dc 100644 --- a/legacy/README.md +++ b/legacy/README.md @@ -105,7 +105,7 @@ please contact us. | clhep | 2.4.7.1 | http://proj-clhep.web.cern.ch | | dds | 3.13 | http://dds.gsi.de | | faircmakemodules | 1.0.0 | https://github.com/FairRootGroup/FairCMakeModules | -| fairlogger | 1.11.1 | https://github.com/FairRootGroup/FairLogger | +| fairlogger | 2.2.0 | https://github.com/FairRootGroup/FairLogger | | fairmq | 1.8.4 | https://github.com/FairRootGroup/FairMQ | | flatbuffers | 23.5.26 | https://github.com/google/flatbuffers | | fmt | 11.1.4 | https://github.com/fmtlib/fmt | From c949c98984c788c472c945055ea7fb1f9df344b2 Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Tue, 18 Feb 2025 14:16:19 +0100 Subject: [PATCH 05/34] [legacy] fairmq: Bump 1.9.2 --- cmake/legacy.cmake | 2 +- legacy/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index 3b5ac87c..8562f23c 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -250,7 +250,7 @@ ExternalProject_Add(flatbuffers ) list(APPEND packages fairmq) -set(fairmq_version "1.8.4") +set(fairmq_version "1.9.2") ExternalProject_Add(fairmq GIT_REPOSITORY https://github.com/FairRootGroup/FairMQ GIT_TAG v${fairmq_version} ${CMAKE_DEFAULT_ARGS} diff --git a/legacy/README.md b/legacy/README.md index e4a0a8dc..6f8ab06d 100644 --- a/legacy/README.md +++ b/legacy/README.md @@ -106,7 +106,7 @@ please contact us. | dds | 3.13 | http://dds.gsi.de | | faircmakemodules | 1.0.0 | https://github.com/FairRootGroup/FairCMakeModules | | fairlogger | 2.2.0 | https://github.com/FairRootGroup/FairLogger | -| fairmq | 1.8.4 | https://github.com/FairRootGroup/FairMQ | +| fairmq | 1.9.2 | https://github.com/FairRootGroup/FairMQ | | flatbuffers | 23.5.26 | https://github.com/google/flatbuffers | | fmt | 11.1.4 | https://github.com/fmtlib/fmt | | geant3 | 4-2_fairsoft | https://github.com/FairRootGroup/geant3 | From d5ad9da084b4bedfa5121e9e47cacc99c9926f04 Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Tue, 18 Feb 2025 14:17:57 +0100 Subject: [PATCH 06/34] [legacy] pythia8: Bump 8315 --- cmake/legacy.cmake | 4 ++-- legacy/README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index 8562f23c..2725888e 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -309,12 +309,12 @@ ExternalProject_Add_Step(clhep move_dir DEPENDEES download DEPENDERS patch ) list(APPEND packages pythia8) -set(pythia8_version "8310") +set(pythia8_version "8315") string(SUBSTRING "${pythia8_version}" 0 2 pythia8_major_version) string(TOUPPER "${CMAKE_BUILD_TYPE}" selected) ExternalProject_Add(pythia8 URL https://pythia.org/download/pythia${pythia8_major_version}/pythia${pythia8_version}.tgz - URL_HASH SHA256=90c811abe7a3d2ffdbf9b4aeab51cf6e0a5a8befb4e3efa806f3d5b9c311e227 + URL_HASH SHA256=4b2fe7341e33e90b7226fdcaa2a7bf9327987b3354e84c04f1fd9256863690ae BUILD_IN_SOURCE ON CONFIGURE_COMMAND ${CMAKE_BINARY_DIR}/Source/pythia8/configure "--with-hepmc2=${CMAKE_INSTALL_PREFIX}" diff --git a/legacy/README.md b/legacy/README.md index 6f8ab06d..cb5b86f2 100644 --- a/legacy/README.md +++ b/legacy/README.md @@ -115,7 +115,7 @@ please contact us. | hepmc | 2.06.11 | http://hepmc.web.cern.ch | | onnxruntime | 1.12.1 | https://github.com/microsoft/onnxruntime | | pythia6 | 428-alice1 | https://github.com/alisw/pythia6 | -| pythia8 | 8310 | https://pythia.org/ | +| pythia8 | 8315 | https://pythia.org/ | | root | 6.30.08 | https://root.cern | | vc | 1.4.4 | https://github.com/VcDevel/Vc | | vgm | 5-2 | https://github.com/vmc-project/vgm | From 70e3d2398d7141fd7f5312076b9d5814873629dd Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Thu, 4 Sep 2025 10:15:49 +0200 Subject: [PATCH 07/34] [legacy] geant4: Bump 11.3.2 --- cmake/legacy.cmake | 4 ++-- legacy/README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index 2725888e..13b460ca 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -326,7 +326,7 @@ ExternalProject_Add(pythia8 ) list(APPEND packages geant4) -set(geant4_version "11.2.0") +set(geant4_version "11.3.2") if(GEANT4MT) set(mt "-DGEANT4_BUILD_MULTITHREADED=ON" @@ -337,7 +337,7 @@ else() endif() ExternalProject_Add(geant4 URL https://geant4-data.web.cern.ch/releases/geant4-v${geant4_version}.tar.gz - URL_HASH SHA256=46ad7fab3c5cb4bd0bdd77dd6d3e2283184819235bcbc01b2d117d81b35596a6 + URL_HASH SHA256=892aedd7425262a50ac3d3c7117d81c0c0da4b408c6880dbaf5478b9301e488c ${CMAKE_DEFAULT_ARGS} CMAKE_ARGS "-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}" ${mt} diff --git a/legacy/README.md b/legacy/README.md index cb5b86f2..402a56c0 100644 --- a/legacy/README.md +++ b/legacy/README.md @@ -110,7 +110,7 @@ please contact us. | flatbuffers | 23.5.26 | https://github.com/google/flatbuffers | | fmt | 11.1.4 | https://github.com/fmtlib/fmt | | geant3 | 4-2_fairsoft | https://github.com/FairRootGroup/geant3 | -| geant4 | 11.2.0 | https://geant4.web.cern.ch | +| geant4 | 11.3.2 | https://geant4.web.cern.ch | | geant4_vmc | 6-5 | https://github.com/vmc-project/geant4_vmc | | hepmc | 2.06.11 | http://hepmc.web.cern.ch | | onnxruntime | 1.12.1 | https://github.com/microsoft/onnxruntime | From f40bbd64481a09128a0aa5e7786fdb803dd27fe2 Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Tue, 18 Feb 2025 14:23:52 +0100 Subject: [PATCH 08/34] [legacy] geant3: Bump 4-4_fairsoft Fix build system for CMake 4.0.1 Fix build for gcc15 The C code is to old to be compiled using the C standard 23 which is new default for gcc15. Use the C standard 17 when compiling geant3. --- cmake/legacy.cmake | 4 +++- legacy/README.md | 2 +- legacy/geant3/fix_cmake.patch | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 legacy/geant3/fix_cmake.patch diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index 13b460ca..744d57bd 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -433,11 +433,13 @@ ExternalProject_Add(vmc ) list(APPEND packages geant3) -set(geant3_version "4-2_fairsoft") +set(geant3_version "4-4_fairsoft") ExternalProject_Add(geant3 GIT_REPOSITORY https://github.com/FairRootGroup/geant3 GIT_TAG v${geant3_version} + PATCH_COMMAND ${patch} -p1 -i "${CMAKE_SOURCE_DIR}/legacy/geant3/fix_cmake.patch" ${CMAKE_DEFAULT_ARGS} CMAKE_ARGS "-DBUILD_GCALOR=ON" + "-DCMAKE_C_STANDARD=17" DEPENDS root vmc ${extract_source_cache_target} ${LOG_TO_FILE} ) diff --git a/legacy/README.md b/legacy/README.md index 402a56c0..70469a2d 100644 --- a/legacy/README.md +++ b/legacy/README.md @@ -109,7 +109,7 @@ please contact us. | fairmq | 1.9.2 | https://github.com/FairRootGroup/FairMQ | | flatbuffers | 23.5.26 | https://github.com/google/flatbuffers | | fmt | 11.1.4 | https://github.com/fmtlib/fmt | -| geant3 | 4-2_fairsoft | https://github.com/FairRootGroup/geant3 | +| geant3 | 4-4_fairsoft | https://github.com/FairRootGroup/geant3 | | geant4 | 11.3.2 | https://geant4.web.cern.ch | | geant4_vmc | 6-5 | https://github.com/vmc-project/geant4_vmc | | hepmc | 2.06.11 | http://hepmc.web.cern.ch | diff --git a/legacy/geant3/fix_cmake.patch b/legacy/geant3/fix_cmake.patch new file mode 100644 index 00000000..4336723f --- /dev/null +++ b/legacy/geant3/fix_cmake.patch @@ -0,0 +1,35 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c63aad6..ae45b94 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -24,7 +24,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR}) + endif() + + #--- Define CMake requirements ------------------------------------------------- +-cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) ++cmake_minimum_required(VERSION 2.8.12...4.0.1) + + #--- Prepend our own CMake Modules to the search path -------------------------- + set(CMAKE_MODULE_PATH +diff --git a/cmake/Geant3BuildLibrary.cmake b/cmake/Geant3BuildLibrary.cmake +index 695a455..7d609cc 100644 +--- a/cmake/Geant3BuildLibrary.cmake ++++ b/cmake/Geant3BuildLibrary.cmake +@@ -11,7 +11,7 @@ + # I. Hrivnacova, 13/06/2014 + + #---CMake required version ----------------------------------------------------- +-cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) ++cmake_minimum_required(VERSION 2.8.12...4.0.1) + + #------------------------------------------------------------------------------- + # Define installed names +diff --git a/cmake/Geant3RequiredPackages.cmake b/cmake/Geant3RequiredPackages.cmake +index ae5c291..502fa3a 100644 +--- a/cmake/Geant3RequiredPackages.cmake ++++ b/cmake/Geant3RequiredPackages.cmake +@@ -27,3 +27,4 @@ include(${ROOT_USE_FILE}) + + #-- VMC (required) ------------------------------------------------------------ + find_package(VMC CONFIG REQUIRED) ++set(VMC_DEPS VMCLibrary) From ce59805e14805a95a5b35867855659b0070584e3 Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Tue, 18 Feb 2025 14:25:19 +0100 Subject: [PATCH 09/34] [legacy] vgm: Bump 5-3-1 --- cmake/legacy.cmake | 2 +- legacy/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index 744d57bd..e7678bc3 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -445,7 +445,7 @@ ExternalProject_Add(geant3 ) list(APPEND packages vgm) -set(vgm_version "5-2") +set(vgm_version "5-3-1") ExternalProject_Add(vgm GIT_REPOSITORY https://github.com/vmc-project/vgm GIT_TAG v${vgm_version} ${CMAKE_DEFAULT_ARGS} CMAKE_ARGS diff --git a/legacy/README.md b/legacy/README.md index 70469a2d..b6f1cd8b 100644 --- a/legacy/README.md +++ b/legacy/README.md @@ -118,6 +118,6 @@ please contact us. | pythia8 | 8315 | https://pythia.org/ | | root | 6.30.08 | https://root.cern | | vc | 1.4.4 | https://github.com/VcDevel/Vc | -| vgm | 5-2 | https://github.com/vmc-project/vgm | +| vgm | 5-3-1 | https://github.com/vmc-project/vgm | | vmc | 2-0 | https://github.com/vmc-project/vmc | | zeromq | 4.3.5 | https://github.com/zeromq/libzmq | From 655d6846ed1f0ad88b05432b919398690bb229b0 Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Tue, 18 Feb 2025 14:26:35 +0100 Subject: [PATCH 10/34] [legacy] geant4_vmc: Bump 6-7-p1 --- cmake/legacy.cmake | 2 +- legacy/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index e7678bc3..764199fc 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -455,7 +455,7 @@ ExternalProject_Add(vgm ) list(APPEND packages geant4_vmc) -set(geant4_vmc_version "6-5") +set(geant4_vmc_version "6-7-p1") ExternalProject_Add(geant4_vmc GIT_REPOSITORY https://github.com/vmc-project/geant4_vmc GIT_TAG v${geant4_vmc_version} ${CMAKE_DEFAULT_ARGS} CMAKE_ARGS diff --git a/legacy/README.md b/legacy/README.md index b6f1cd8b..a4bef83a 100644 --- a/legacy/README.md +++ b/legacy/README.md @@ -111,7 +111,7 @@ please contact us. | fmt | 11.1.4 | https://github.com/fmtlib/fmt | | geant3 | 4-4_fairsoft | https://github.com/FairRootGroup/geant3 | | geant4 | 11.3.2 | https://geant4.web.cern.ch | -| geant4_vmc | 6-5 | https://github.com/vmc-project/geant4_vmc | +| geant4_vmc | 6-7-p1 | https://github.com/vmc-project/geant4_vmc | | hepmc | 2.06.11 | http://hepmc.web.cern.ch | | onnxruntime | 1.12.1 | https://github.com/microsoft/onnxruntime | | pythia6 | 428-alice1 | https://github.com/alisw/pythia6 | From 957148e97412ac46ceab8b00a7b471a95dd3bf1e Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Tue, 18 Feb 2025 14:29:04 +0100 Subject: [PATCH 11/34] [legacy] vecgeom: Add new v.2.0.0-rc.6 VecGeom is a parllelized geometry modeller library. It can be used by ROOT and Geant4. --- cmake/legacy.cmake | 19 +++++++++++++++++++ legacy/README.md | 1 + 2 files changed, 20 insertions(+) diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index 764199fc..c2f25e03 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -325,6 +325,25 @@ ExternalProject_Add(pythia8 ${LOG_TO_FILE} ) +if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm") + set(vector "-DVECGEOM_VECTOR=empty") +else() + set(vector "-DVECGEOM_VECTOR=native") +endif() + +list(APPEND packages vecgeom) +set(vecgeom_version "v2.0.0-rc.6") +ExternalProject_Add(vecgeom + GIT_REPOSITORY https://gitlab.cern.ch/VecGeom/VecGeom GIT_TAG ${vecgeom_version} + ${CMAKE_DEFAULT_ARGS} CMAKE_ARGS + "-DVECGEOM_BACKEND=vc" + "-DVECGEOM_BUILTIN_VECCORE=ON" + ${vector} + DEPENDS vc + ${LOG_TO_FILE} +) + + list(APPEND packages geant4) set(geant4_version "11.3.2") if(GEANT4MT) diff --git a/legacy/README.md b/legacy/README.md index a4bef83a..06ee4332 100644 --- a/legacy/README.md +++ b/legacy/README.md @@ -118,6 +118,7 @@ please contact us. | pythia8 | 8315 | https://pythia.org/ | | root | 6.30.08 | https://root.cern | | vc | 1.4.4 | https://github.com/VcDevel/Vc | +| vecgeom | v.2.0.0-rc.6 | https://gitlab.cern.ch/VecGeom/VecGeom | | vgm | 5-3-1 | https://github.com/vmc-project/vgm | | vmc | 2-0 | https://github.com/vmc-project/vmc | | zeromq | 4.3.5 | https://github.com/zeromq/libzmq | From 78eaa2de43dc9a1fcc96647d7c0a5d1b48f31430 Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Tue, 18 Feb 2025 14:33:09 +0100 Subject: [PATCH 12/34] [legacy] pythia6: Remove the package Pythia6 isn't supported by ROOT any longer. --- cmake/legacy.cmake | 12 ---- legacy/README.md | 1 - .../pythia6/add_missing_extern_keyword.patch | 62 ------------------- 3 files changed, 75 deletions(-) delete mode 100644 legacy/pythia6/add_missing_extern_keyword.patch diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index c2f25e03..4238d8e0 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -258,17 +258,6 @@ ExternalProject_Add(fairmq ${LOG_TO_FILE} ) -list(APPEND packages pythia6) -set(pythia6_version "428-alice1") -ExternalProject_Add(pythia6 - URL https://github.com/alisw/pythia6/archive/${pythia6_version}.tar.gz - URL_HASH SHA256=b14e82870d3aa33d6fa07f4b1f4d17f1ab80a37d753f91ca6322352b397cb244 - UPDATE_DISCONNECTED ON - PATCH_COMMAND ${patch} -p1 -i "${CMAKE_SOURCE_DIR}/legacy/pythia6/add_missing_extern_keyword.patch" - ${CMAKE_DEFAULT_ARGS} ${LOG_TO_FILE} - ${DEPENDS_ON_SOURCE_CACHE} -) - list(APPEND packages hepmc) set(hepmc_version "2.06.11") ExternalProject_Add(hepmc @@ -416,7 +405,6 @@ ExternalProject_Add(root "-Dminuit2=ON" "-Dmlp=ON" "-Dpyroot=ON" - "-Dpythia6=ON" "-Dpythia8=ON" "-Dreflex=OFF" "-Droofit=ON" diff --git a/legacy/README.md b/legacy/README.md index 06ee4332..94f6c9fe 100644 --- a/legacy/README.md +++ b/legacy/README.md @@ -114,7 +114,6 @@ please contact us. | geant4_vmc | 6-7-p1 | https://github.com/vmc-project/geant4_vmc | | hepmc | 2.06.11 | http://hepmc.web.cern.ch | | onnxruntime | 1.12.1 | https://github.com/microsoft/onnxruntime | -| pythia6 | 428-alice1 | https://github.com/alisw/pythia6 | | pythia8 | 8315 | https://pythia.org/ | | root | 6.30.08 | https://root.cern | | vc | 1.4.4 | https://github.com/VcDevel/Vc | diff --git a/legacy/pythia6/add_missing_extern_keyword.patch b/legacy/pythia6/add_missing_extern_keyword.patch deleted file mode 100644 index 4d9b3d1f..00000000 --- a/legacy/pythia6/add_missing_extern_keyword.patch +++ /dev/null @@ -1,62 +0,0 @@ -commit 8c88c93a2002a120ff3535eba0b4b5067b399c4f -Author: Dennis Klein -Date: Mon Aug 17 12:07:10 2020 +0200 - - Add missing extern keyword - - GCC10 linker reports "multiple definition of `pyint1_';" etc without it. - -diff --git a/pythia6_common_address.c b/pythia6_common_address.c -index c9ebcd1..48a6030 100644 ---- a/pythia6_common_address.c -+++ b/pythia6_common_address.c -@@ -48,28 +48,28 @@ - # define pybins PYBINS - #endif - --int pyjets[2+5*4000+2*2*5*4000]; --int pydat1[200+2*200+200+2*200]; --int pydat2[4*500+2*4*500+2*2000+2*4*4]; --int pydat3[3*500+2*8000+2*8000+5*8000]; /* KNDCAY=8000 */ --char pydat4[2*500*16]; --int pydatr[6+2*100]; --int pysubs[2+500+81*2+2*200]; --int pypars[200+2*200+200+2*200]; --int pyint1[400+2*400]; --int pyint2[500+2*500+2*20*500+2*4*40]; --int pyint3[2*81*2+3*1000+2*1000]; --int pyint4[500+2*5*500]; --int pyint5[1+3*501+2*3*501]; --char pyint6[501*28]; --int pyint7[2*6*7*7]; --int pyint8[2*5*13]; --int pyint9[2*4*13]; -+extern int pyjets[2+5*4000+2*2*5*4000]; -+extern int pydat1[200+2*200+200+2*200]; -+extern int pydat2[4*500+2*4*500+2*2000+2*4*4]; -+extern int pydat3[3*500+2*8000+2*8000+5*8000]; /* KNDCAY=8000 */ -+extern char pydat4[2*500*16]; -+extern int pydatr[6+2*100]; -+extern int pysubs[2+500+81*2+2*200]; -+extern int pypars[200+2*200+200+2*200]; -+extern int pyint1[400+2*400]; -+extern int pyint2[500+2*500+2*20*500+2*4*40]; -+extern int pyint3[2*81*2+3*1000+2*1000]; -+extern int pyint4[500+2*5*500]; -+extern int pyint5[1+3*501+2*3*501]; -+extern char pyint6[501*28]; -+extern int pyint7[2*6*7*7]; -+extern int pyint8[2*5*13]; -+extern int pyint9[2*4*13]; - int pyuppr[1+7*20+1+2*10+2*5*20+2*11]; /* PYUPPR DOES NOT EXIST IN PYTHIA6 AT ALL!!! */ --int pymssm[100+2*100]; --int pyssmt[2*4*4+2*2*2+2*2*2+2*4+2*2+2*4*16+2*4*4+2*2*2+2*2*2]; --int pyints[2*20]; --int pybins[4+1000+2*20000]; -+extern int pymssm[100+2*100]; -+extern int pyssmt[2*4*4+2*2*2+2*2*2+2*4+2*2+2*4*16+2*4*4+2*2*2+2*2*2]; -+extern int pyints[2*20]; -+extern int pybins[4+1000+2*20000]; - - void *pythia6_common_address(const char* name) { - if (!strcmp(name,"PYJETS")) return pyjets; From cd42599a8496b698b6422c6c1c34bbb7cc8ccc99 Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Tue, 18 Feb 2025 14:36:02 +0100 Subject: [PATCH 13/34] [legacy] root: Bump 6.36.04 --- cmake/legacy.cmake | 11 ++++----- legacy/README.md | 2 +- legacy/root/fix_macosx_findOpenGL.patch | 32 ------------------------- 3 files changed, 6 insertions(+), 39 deletions(-) delete mode 100644 legacy/root/fix_macosx_findOpenGL.patch diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index 4238d8e0..b48896b3 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -1,5 +1,5 @@ ################################################################################ -# Copyright (C) 2020-2024 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH # +# Copyright (C) 2020-2025 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH # # # # This software is distributed under the terms of the # # GNU Lesser General Public Licence (LGPL) version 3, # @@ -368,7 +368,7 @@ ExternalProject_Add(geant4 ) list(APPEND packages root) -set(root_version "6.30.08") +set(root_version "6.36.04") string(REPLACE "\." "-" root_version_gittag ${root_version}) if(APPLE AND CMAKE_VERSION VERSION_GREATER 3.15) set(root_builtin_glew "-Dbuiltin_glew=ON") @@ -380,7 +380,7 @@ else() unset(root_cocoa) set(root_x11 ON) endif() -find_package(nlohmann_json 3.9) +find_package(nlohmann_json 3.9 QUIET) if(nlohmann_json_FOUND) set(root_builtin_nlohmannjson "-Dbuiltin_nlohmannjson=OFF") else() @@ -402,7 +402,6 @@ ExternalProject_Add(root "-Dgnuinstall=ON" "-Dhttp=ON" "-Dmathmore=ON" - "-Dminuit2=ON" "-Dmlp=ON" "-Dpyroot=ON" "-Dpythia8=ON" @@ -416,6 +415,7 @@ ExternalProject_Add(root "-Dtmva=ON" "-Dvc=ON" "-Dvdt=OFF" + "-Dvecgeom=ON" "-Dxml=ON" "-Dxrootd=ON" "-Dx11=${root_x11}" @@ -426,8 +426,7 @@ ExternalProject_Add(root ${root_cocoa} UPDATE_DISCONNECTED ON PATCH_COMMAND ${patch} -p1 -i "${CMAKE_SOURCE_DIR}/legacy/root/fix_macos_sdk_mismatch.patch" - COMMAND ${patch} -p1 -i "${CMAKE_SOURCE_DIR}/legacy/root/fix_macosx_findOpenGL.patch" - DEPENDS pythia6 pythia8 vc ${extract_source_cache_target} + DEPENDS pythia8 vc vecgeom ${extract_source_cache_target} ${LOG_TO_FILE} ) diff --git a/legacy/README.md b/legacy/README.md index 94f6c9fe..1f258c4c 100644 --- a/legacy/README.md +++ b/legacy/README.md @@ -115,7 +115,7 @@ please contact us. | hepmc | 2.06.11 | http://hepmc.web.cern.ch | | onnxruntime | 1.12.1 | https://github.com/microsoft/onnxruntime | | pythia8 | 8315 | https://pythia.org/ | -| root | 6.30.08 | https://root.cern | +| root | 6.36.04 | https://root.cern | | vc | 1.4.4 | https://github.com/VcDevel/Vc | | vecgeom | v.2.0.0-rc.6 | https://gitlab.cern.ch/VecGeom/VecGeom | | vgm | 5-3-1 | https://github.com/vmc-project/vgm | diff --git a/legacy/root/fix_macosx_findOpenGL.patch b/legacy/root/fix_macosx_findOpenGL.patch deleted file mode 100644 index e0a0b7ca..00000000 --- a/legacy/root/fix_macosx_findOpenGL.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/cmake/modules/SearchInstalledSoftware.cmake b/cmake/modules/SearchInstalledSoftware.cmake -index 682de46f27..57addbc948 100644 ---- a/cmake/modules/SearchInstalledSoftware.cmake -+++ b/cmake/modules/SearchInstalledSoftware.cmake -@@ -565,6 +565,17 @@ find_package(Python3 3.8 COMPONENTS ${python_components}) - #---Check for OpenGL installation------------------------------------------------------- - if(opengl) - message(STATUS "Looking for OpenGL") -+ # Search for the OpenGL installation first in the system. -+ # OpenGL installed via brew (mesa, mesa-glu) and X11 seems not to work -+ # properly so it is needed to use the system version. -+ # CMAKE_FIND_FRAMEWORK defines the search order on macosx which as -+ # default is search first for frameworks. -+ # ROOT changes the order to search last for the framework. -+ # Temporarely change the search order for OpenGL. -+ if(APPLE) -+ set(frame_temp ${CMAKE_FIND_FRAMEWORK}) -+ set(CMAKE_FIND_FRAMEWORK FIRST) -+ endif() - find_package(OpenGL) - if(NOT OPENGL_FOUND OR NOT OPENGL_GLU_FOUND) - if(fail-on-missing) -@@ -574,6 +585,9 @@ if(opengl) - set(opengl OFF CACHE BOOL "Disabled because OpenGL (with GLU) not found (${opengl_description})" FORCE) - endif() - endif() -+ if (APPLE) -+ set(CMAKE_FIND_FRAMEWORK ${frame_temp}) -+ endif() - endif() - # OpenGL should be working only with x11 (Linux), - # in case when -Dall=ON -Dx11=OFF, we will just disable opengl. From 86ca1f267895bb2e09e8aea512956827bb1353da Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Tue, 22 Apr 2025 12:05:22 +0200 Subject: [PATCH 14/34] [legacy] hepmc: Fix build system for CMake 4.0.1 --- cmake/legacy.cmake | 5 +++-- legacy/hepmc/fix_cmake.patch | 37 ++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 legacy/hepmc/fix_cmake.patch diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index b48896b3..1bb84364 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -5,8 +5,8 @@ # GNU Lesser General Public Licence (LGPL) version 3, # # copied verbatim in the file "LICENSE" # ################################################################################ -cmake_minimum_required(VERSION 3.19...3.28 FATAL_ERROR) -cmake_policy(VERSION 3.19...3.28) +cmake_minimum_required(VERSION 3.19...4.0.1) +cmake_policy(VERSION 3.19...4.0.1) find_package(LibLZMA) if(LibLZMA_FOUND) @@ -263,6 +263,7 @@ set(hepmc_version "2.06.11") ExternalProject_Add(hepmc URL https://hepmc.web.cern.ch/releases/hepmc${hepmc_version}.tgz URL_HASH SHA256=86b66ea0278f803cde5774de8bd187dd42c870367f1cbf6cdaec8dc7cf6afc10 + PATCH_COMMAND ${patch} -p1 -i "${CMAKE_SOURCE_DIR}/legacy/hepmc/fix_cmake.patch" ${CMAKE_DEFAULT_ARGS} CMAKE_ARGS "-Dlength:STRING=CM" "-Dmomentum:STRING=GEV" diff --git a/legacy/hepmc/fix_cmake.patch b/legacy/hepmc/fix_cmake.patch new file mode 100644 index 00000000..2be7f193 --- /dev/null +++ b/legacy/hepmc/fix_cmake.patch @@ -0,0 +1,37 @@ +--- a/CMakeLists.txt 2025-04-22 10:37:30 ++++ b/CMakeLists.txt 2020-06-08 13:25:39 +@@ -14,7 +14,7 @@ + #------------------------------------------------------------------------------ + + # use cmake 2.6 or later +-cmake_minimum_required (VERSION 2.6) ++cmake_minimum_required (VERSION 2.6...4.0.1) + + # project name and version + project(HepMC) +--- a/cmake/Modules/HepMCUseCpack.cmake_orig 2025-04-22 11:44:59 ++++ b/cmake/Modules/HepMCUseCpack.cmake 2025-04-22 11:46:37 +@@ -8,8 +8,8 @@ + # + FUNCTION(_My_COMPILER_DUMPVERSION _OUTPUT_VERSION) + +- EXEC_PROGRAM(${CMAKE_CXX_COMPILER} +- ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion ++ EXECUTE_PROCESS(COMMAND ++ ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} -dumpversion + OUTPUT_VARIABLE _my_COMPILER_VERSION + ) + set( COMPILER_VERSION ${_my_COMPILER_VERSION} PARENT_SCOPE) +--- a/cmake/Modules/HepMCVariables.cmake_orig 2025-04-22 11:45:10 ++++ b/cmake/Modules/HepMCVariables.cmake 2025-04-22 11:46:01 +@@ -10,8 +10,8 @@ + # so we need this for the example makefile + macro( _hepmc_fortran_compiler ) + +- EXEC_PROGRAM(${CMAKE_CXX_COMPILER} +- ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion ++ EXECUTE_PROCESS(COMMAND ++ ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} -dumpversion + OUTPUT_VARIABLE _my_COMPILER_VERSION + ) + STRING(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1" From 512d1bcca9b9481df7f760afe4e8c61d784201d9 Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Tue, 22 Apr 2025 13:12:55 +0200 Subject: [PATCH 15/34] [legacy] zeromq: Fix build system for CMake 4.0.1 --- cmake/legacy.cmake | 1 + legacy/zeromq/fix_cmake.patch | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 legacy/zeromq/fix_cmake.patch diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index 1bb84364..2a6973f7 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -228,6 +228,7 @@ list(APPEND packages zeromq) set(zeromq_version "4.3.5") ExternalProject_Add(zeromq GIT_REPOSITORY https://github.com/zeromq/libzmq GIT_TAG v${zeromq_version} + PATCH_COMMAND ${patch} -p1 -i "${CMAKE_SOURCE_DIR}/legacy/zeromq/fix_cmake.patch" ${CMAKE_DEFAULT_ARGS} CMAKE_ARGS "-DWITH_PERF_TOOL=ON" "-DZMQ_BUILD_TESTS=ON" diff --git a/legacy/zeromq/fix_cmake.patch b/legacy/zeromq/fix_cmake.patch new file mode 100644 index 00000000..fc7a50ff --- /dev/null +++ b/legacy/zeromq/fix_cmake.patch @@ -0,0 +1,32 @@ +--- a/CMakeLists.txt_orig 2025-04-22 12:58:25 ++++ b/CMakeLists.txt 2025-04-22 12:58:47 +@@ -2,9 +2,9 @@ + project(ZeroMQ) + + if(${CMAKE_SYSTEM_NAME} STREQUAL Darwin) +- cmake_minimum_required(VERSION 3.0.2) ++ cmake_minimum_required(VERSION 3.0.2...4.0.1) + else() +- cmake_minimum_required(VERSION 2.8.12) ++ cmake_minimum_required(VERSION 2.8.12...4.0.1) + endif() + + include(CheckIncludeFiles) +--- a/tests/CMakeLists.txt_orig 2025-04-22 13:02:31 ++++ b/tests/CMakeLists.txt 2025-04-22 13:02:49 +@@ -1,5 +1,5 @@ + # CMake build script for ZeroMQ tests +-cmake_minimum_required(VERSION "2.8.1") ++cmake_minimum_required(VERSION 2.8.1...4.0.1) + + # On Windows: solution file will be called tests.sln + project(tests) +--- a/unittests/CMakeLists.txt_orig 2025-04-22 13:04:17 ++++ b/unittests/CMakeLists.txt 2025-04-22 13:04:29 +@@ -1,5 +1,5 @@ + # CMake build script for ZeroMQ unit tests +-cmake_minimum_required(VERSION "2.8.1") ++cmake_minimum_required(VERSION 2.8.1...4.0.1) + + set(unittests + unittest_ypipe From 25929074aff14063d14f894b3f3406e98547b044 Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Tue, 22 Apr 2025 13:41:02 +0200 Subject: [PATCH 16/34] [legacy] vc: Fix build system for CMake 4.0.1 --- cmake/legacy.cmake | 1 + legacy/vc/fix_cmake.patch | 79 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 legacy/vc/fix_cmake.patch diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index 2a6973f7..62cf5efe 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -277,6 +277,7 @@ set(vc_version "1.4.4") ExternalProject_Add(vc URL https://github.com/VcDevel/Vc/archive/refs/tags/${vc_version}.tar.gz URL_HASH SHA256=5933108196be44c41613884cd56305df320263981fe6a49e648aebb3354d57f3 + PATCH_COMMAND ${patch} -p1 -i "${CMAKE_SOURCE_DIR}/legacy/vc/fix_cmake.patch" ${CMAKE_DEFAULT_ARGS} ${LOG_TO_FILE} ${DEPENDS_ON_SOURCE_CACHE} ) diff --git a/legacy/vc/fix_cmake.patch b/legacy/vc/fix_cmake.patch new file mode 100644 index 00000000..7ba94fd2 --- /dev/null +++ b/legacy/vc/fix_cmake.patch @@ -0,0 +1,79 @@ +--- a/CMakeLists.txt_orig 2025-04-22 13:24:33 ++++ b/CMakeLists.txt 2025-04-22 13:25:34 +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 3.0) ++cmake_minimum_required(VERSION 3.0...4.0.1) + + cmake_policy(SET CMP0028 NEW) # Double colon in target name means ALIAS or IMPORTED target. + cmake_policy(SET CMP0048 NEW) # The ``project()`` command manages VERSION variables. +--- a/cmake/VcMacros.cmake_orig 2025-04-22 13:33:46 ++++ b/cmake/VcMacros.cmake 2025-04-22 13:32:40 +@@ -41,7 +41,7 @@ + + macro(vc_determine_compiler) + if(NOT DEFINED Vc_COMPILER_IS_INTEL) +- execute_process(COMMAND "${CMAKE_CXX_COMPILER}" "--version" OUTPUT_VARIABLE _cxx_compiler_version ERROR_VARIABLE _cxx_compiler_version) ++ execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version OUTPUT_VARIABLE _cxx_compiler_version ERROR_VARIABLE _cxx_compiler_version) + set(Vc_COMPILER_IS_INTEL false) + set(Vc_COMPILER_IS_OPEN64 false) + set(Vc_COMPILER_IS_CLANG false) +@@ -49,7 +49,7 @@ + set(Vc_COMPILER_IS_GCC false) + if(CMAKE_CXX_COMPILER MATCHES "/(icpc|icc)$") + set(Vc_COMPILER_IS_INTEL true) +- exec_program(${CMAKE_CXX_COMPILER} ARGS -dumpversion OUTPUT_VARIABLE Vc_ICC_VERSION) ++ execute_process(COMMAND ${CMAKE_CXX_COMPILER} ARGS -dumpversion OUTPUT_VARIABLE Vc_ICC_VERSION) + message(STATUS "Detected Compiler: Intel ${Vc_ICC_VERSION}") + + # break build with too old clang as early as possible. +@@ -61,7 +61,7 @@ + message(STATUS "Detected Compiler: Open64") + elseif(CMAKE_CXX_COMPILER MATCHES "clang\\+\\+$" OR "${_cxx_compiler_version}" MATCHES "clang") + set(Vc_COMPILER_IS_CLANG true) +- exec_program(${CMAKE_CXX_COMPILER} ARGS --version OUTPUT_VARIABLE Vc_CLANG_VERSION) ++ execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version OUTPUT_VARIABLE Vc_CLANG_VERSION) + string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" Vc_CLANG_VERSION "${Vc_CLANG_VERSION}") + message(STATUS "Detected Compiler: Clang ${Vc_CLANG_VERSION}") + +@@ -74,13 +74,13 @@ + message(STATUS "Detected Compiler: MSVC ${MSVC_VERSION}") + elseif(CMAKE_COMPILER_IS_GNUCXX) + set(Vc_COMPILER_IS_GCC true) +- exec_program(${CMAKE_CXX_COMPILER} ARGS -dumpversion OUTPUT_VARIABLE Vc_GCC_VERSION) ++ execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE Vc_GCC_VERSION) + message(STATUS "Detected Compiler: GCC ${Vc_GCC_VERSION}") + + # some distributions patch their GCC to return nothing or only major and minor version on -dumpversion. + # In that case we must extract the version number from --version. + if(NOT Vc_GCC_VERSION OR Vc_GCC_VERSION MATCHES "^[0-9]\\.[0-9]+$") +- exec_program(${CMAKE_CXX_COMPILER} ARGS --version OUTPUT_VARIABLE Vc_GCC_VERSION) ++ execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version OUTPUT_VARIABLE Vc_GCC_VERSION) + string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" Vc_GCC_VERSION "${Vc_GCC_VERSION}") + message(STATUS "GCC Version from --version: ${Vc_GCC_VERSION}") + endif() +@@ -144,12 +144,12 @@ + endmacro() + + macro(vc_check_assembler) +- exec_program(${CMAKE_CXX_COMPILER} ARGS -print-prog-name=as OUTPUT_VARIABLE _as) ++ execute_process(COMMAND ${CMAKE_CXX_COMPILER} -print-prog-name=as OUTPUT_VARIABLE _as) + mark_as_advanced(_as) + if(NOT _as) + message(WARNING "Could not find 'as', the assembler used by GCC. Hoping everything will work out...") + else() +- exec_program(${_as} ARGS --version OUTPUT_VARIABLE _as_version) ++ execute_process(COMMAND ${_as} --version OUTPUT_VARIABLE _as_version) + string(REGEX REPLACE "\\([^\\)]*\\)" "" _as_version "${_as_version}") + string(REGEX MATCH "[1-9]\\.[0-9]+(\\.[0-9]+)?" _as_version "${_as_version}") + if(_as_version VERSION_LESS "2.18.93") +--- a/cmake/OptimizeForArchitecture.cmake_orig 2025-04-22 13:34:22 ++++ b/cmake/OptimizeForArchitecture.cmake 2025-04-22 13:34:55 +@@ -70,7 +70,7 @@ + string(REGEX REPLACE ".*model[ \t]*:[ \t]+([a-zA-Z0-9_-]+).*" "\\1" _cpu_model "${_cpuinfo}") + string(REGEX REPLACE ".*flags[ \t]*:[ \t]+([^\n]+).*" "\\1" _cpu_flags "${_cpuinfo}") + elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") +- exec_program("/usr/sbin/sysctl -n machdep.cpu.vendor machdep.cpu.model machdep.cpu.family machdep.cpu.features" OUTPUT_VARIABLE _sysctl_output_string) ++ execute_process(COMMAND /usr/sbin/sysctl -n machdep.cpu.vendor machdep.cpu.model machdep.cpu.family machdep.cpu.features OUTPUT_VARIABLE _sysctl_output_string) + string(REPLACE "\n" ";" _sysctl_output ${_sysctl_output_string}) + list(GET _sysctl_output 0 _vendor_id) + list(GET _sysctl_output 1 _cpu_model) From b77698403d512ab522c4331ede239df5a5e1a004 Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Tue, 22 Apr 2025 17:38:36 +0200 Subject: [PATCH 17/34] [legacy] vmc: Bump 2-1 --- cmake/legacy.cmake | 2 +- legacy/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index 62cf5efe..9135205e 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -434,7 +434,7 @@ ExternalProject_Add(root ) list(APPEND packages vmc) -set(vmc_version "2-0") +set(vmc_version "2-1") ExternalProject_Add(vmc GIT_REPOSITORY https://github.com/vmc-project/vmc GIT_TAG v${vmc_version} ${CMAKE_DEFAULT_ARGS} ${LOG_TO_FILE} diff --git a/legacy/README.md b/legacy/README.md index 1f258c4c..357704e9 100644 --- a/legacy/README.md +++ b/legacy/README.md @@ -119,5 +119,5 @@ please contact us. | vc | 1.4.4 | https://github.com/VcDevel/Vc | | vecgeom | v.2.0.0-rc.6 | https://gitlab.cern.ch/VecGeom/VecGeom | | vgm | 5-3-1 | https://github.com/vmc-project/vgm | -| vmc | 2-0 | https://github.com/vmc-project/vmc | +| vmc | 2-1 | https://github.com/vmc-project/vmc | | zeromq | 4.3.5 | https://github.com/zeromq/libzmq | From 97aca7a46728e465e3d28ef3d0bc4d3c53d7e40b Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Fri, 11 Jul 2025 11:32:49 +0200 Subject: [PATCH 18/34] [legacy] clhep: Allow compilation with c++23 --- cmake/legacy.cmake | 1 + legacy/clhep/allow_c++23.patch | 53 ++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 legacy/clhep/allow_c++23.patch diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index 9135205e..b6fee9c8 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -289,6 +289,7 @@ ExternalProject_Add(clhep URL_HASH SHA256=1c8304a7772ac6b99195f1300378c6e3ddf4ad07c85d64a04505652abb8a55f9 ${CMAKE_DEFAULT_ARGS} CMAKE_ARGS "-DCLHEP_BUILD_CXXSTD=-std=c++${CMAKE_CXX_STANDARD}" + PATCH_COMMAND ${patch} -p1 -i "${CMAKE_SOURCE_DIR}/legacy/clhep/allow_c++23.patch" ${LOG_TO_FILE} ${DEPENDS_ON_SOURCE_CACHE} ) diff --git a/legacy/clhep/allow_c++23.patch b/legacy/clhep/allow_c++23.patch new file mode 100644 index 00000000..1073813f --- /dev/null +++ b/legacy/clhep/allow_c++23.patch @@ -0,0 +1,53 @@ +diff --git a/cmake/Modules/ClhepVariables.cmake b/cmake/Modules/ClhepVariables.cmake +index dc21ceee..88051cbd 100644 +--- a/cmake/Modules/ClhepVariables.cmake ++++ b/cmake/Modules/ClhepVariables.cmake +@@ -301,6 +301,36 @@ macro( _clhep_verify_cxx20 ) + endif() + endmacro( _clhep_verify_cxx20 ) + ++macro( _clhep_verify_cxx23 ) ++ if( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" ) ++ if( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17.0 ) ++ message( FATAL_ERROR "c++23 extension is not available for ${CMAKE_CXX_COMPILER_ID}${CMAKE_CXX_COMPILER_VERSION}") ++ else() ++ set( HAVE_STDCXX true ) ++ endif() ++ elseif( ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang" ) ++ if( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16.0 ) ++ message( FATAL_ERROR "c++23 extension is not available for ${CMAKE_CXX_COMPILER_ID}${CMAKE_CXX_COMPILER_VERSION}") ++ else() ++ set( HAVE_STDCXX true ) ++ endif() ++ elseif( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel" ) ++ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 2022.3) ++ message( FATAL_ERROR "c++23 extension is not available for ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}") ++ else() ++ set( HAVE_STDCXX true ) ++ endif() ++ elseif(CMAKE_COMPILER_IS_GNUCXX) ++ if( CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11.0.0 ) ++ message( FATAL_ERROR "c++23 extension is not available for ${CMAKE_CXX_COMPILER}") ++ else() ++ set( HAVE_STDCXX true ) ++ endif() ++ else() ++ message(STATUS "clhep_set_compiler_flags: Do not know how to set c++23 extensions for ${CMAKE_CXX_COMPILER_ID}") ++ endif() ++endmacro( _clhep_verify_cxx23 ) ++ + macro( _clhep_check_cxxstd ) + if( CLHEP_DEBUG_MESSAGES ) + message(STATUS "_clhep_check_cxxstd debug: CMAKE_CXX_COMPILER: ${CMAKE_CXX_COMPILER}") +@@ -326,8 +356,10 @@ macro( _clhep_check_cxxstd ) + _clhep_verify_cxx2a() + elseif( "${CLHEP_BUILD_CXXSTD}" STREQUAL "-std=c++20" ) + _clhep_verify_cxx20() ++ elseif( "${CLHEP_BUILD_CXXSTD}" STREQUAL "-std=c++23" ) ++ _clhep_verify_cxx23() + elseif( DEFINED CLHEP_BUILD_CXXSTD ) +- message( FATAL_ERROR "${CLHEP_BUILD_CXXSTD} is not supported. Supported extensions are c++11, c++1y, c++14, c++1z, c++17, c++2a, and c++20.") ++ message( FATAL_ERROR "${CLHEP_BUILD_CXXSTD} is not supported. Supported extensions are c++11, c++1y, c++14, c++1z, c++17, c++2a, c++20 and c++23.") + else() + # presume -std=c++11 + set(CLHEP_BUILD_CXXSTD "-std=c++11") From cfd65cd4e932b895a219f88dbfbb28c6366ee83c Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Mon, 1 Sep 2025 14:21:28 +0200 Subject: [PATCH 19/34] [legacy] Bump minimal CMake version to 3.24 One of the installed cmake scripts of vecgeom has a runtime dependency of CMake 3.24. To fix the issues that this breaks when using CMake < 3.24 during configuration of ROOT we don't allow CMake < 3.24 from the beginning. --- cmake/legacy.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index b6fee9c8..4399d5ba 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -5,8 +5,8 @@ # GNU Lesser General Public Licence (LGPL) version 3, # # copied verbatim in the file "LICENSE" # ################################################################################ -cmake_minimum_required(VERSION 3.19...4.0.1) -cmake_policy(VERSION 3.19...4.0.1) +cmake_minimum_required(VERSION 3.24...4.0.1) +cmake_policy(VERSION 3.24...4.0.1) find_package(LibLZMA) if(LibLZMA_FOUND) From abfd323d1c68bb21ae327e193481f4e04871857b Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Thu, 4 Sep 2025 08:45:21 +0200 Subject: [PATCH 20/34] [legacy] Fix RPATH information With this commit the correct RPATH information is added to the shared libraries and binaries of all installed packages. For packages not adding the info already properly we add some CMake variables in our meta build system to pass the needed information to the CMake based build system of the individual packages. With this change the FairSoft installtion is definitely not relocatable any longer, but it is not clear if it was before. With the changes the environment varaible (DY)LD_LIBRARY_PATH shouldn't be needed any longer. But this fact still has to be tested. This PR fixes https://github.com/FairRootGroup/FairSoft/issues/535 --- cmake/legacy.cmake | 19 +++++++++++++- legacy/root/fix_rpath_info.patch | 43 ++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 legacy/root/fix_rpath_info.patch diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index 4399d5ba..e3fda7ba 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -72,6 +72,14 @@ set(CMAKE_DEFAULT_ARGS CMAKE_CACHE_DEFAULT_ARGS "-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}" "-DCMAKE_INSTALL_LIBDIR:PATH=lib" ) + +set(FAIRSOFT_RPATH_ARGS + "-DCMAKE_SKIP_BUILD_RPATH:BOOL=FALSE" + "-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=FALSE" + "-DCMAKE_INSTALL_RPATH:STRING=${CMAKE_INSTALL_PREFIX}/lib" + "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=TRUE" + ) + if (CMAKE_TOOLCHAIN_FILE) list(APPEND CMAKE_DEFAULT_ARGS -DCMAKE_TOOLCHAIN_FILE:STRING=${CMAKE_TOOLCHAIN_FILE}) endif() @@ -230,6 +238,7 @@ ExternalProject_Add(zeromq GIT_REPOSITORY https://github.com/zeromq/libzmq GIT_TAG v${zeromq_version} PATCH_COMMAND ${patch} -p1 -i "${CMAKE_SOURCE_DIR}/legacy/zeromq/fix_cmake.patch" ${CMAKE_DEFAULT_ARGS} CMAKE_ARGS + ${FAIRSOFT_RPATH_ARGS} "-DWITH_PERF_TOOL=ON" "-DZMQ_BUILD_TESTS=ON" "-DENABLE_CPACK=OFF" @@ -288,6 +297,7 @@ ExternalProject_Add(clhep URL https://proj-clhep.web.cern.ch/proj-clhep/dist1/clhep-${clhep_version}.tgz URL_HASH SHA256=1c8304a7772ac6b99195f1300378c6e3ddf4ad07c85d64a04505652abb8a55f9 ${CMAKE_DEFAULT_ARGS} CMAKE_ARGS + ${FAIRSOFT_RPATH_ARGS} "-DCLHEP_BUILD_CXXSTD=-std=c++${CMAKE_CXX_STANDARD}" PATCH_COMMAND ${patch} -p1 -i "${CMAKE_SOURCE_DIR}/legacy/clhep/allow_c++23.patch" ${LOG_TO_FILE} @@ -351,6 +361,7 @@ ExternalProject_Add(geant4 URL https://geant4-data.web.cern.ch/releases/geant4-v${geant4_version}.tar.gz URL_HASH SHA256=892aedd7425262a50ac3d3c7117d81c0c0da4b408c6880dbaf5478b9301e488c ${CMAKE_DEFAULT_ARGS} CMAKE_ARGS + ${FAIRSOFT_RPATH_ARGS} "-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}" ${mt} "-DGEANT4_USE_SYSTEM_CLHEP=ON" @@ -430,6 +441,7 @@ ExternalProject_Add(root ${root_cocoa} UPDATE_DISCONNECTED ON PATCH_COMMAND ${patch} -p1 -i "${CMAKE_SOURCE_DIR}/legacy/root/fix_macos_sdk_mismatch.patch" + COMMAND ${patch} -p1 -i "${CMAKE_SOURCE_DIR}/legacy/root/fix_rpath_info.patch" DEPENDS pythia8 vc vecgeom ${extract_source_cache_target} ${LOG_TO_FILE} ) @@ -438,7 +450,9 @@ list(APPEND packages vmc) set(vmc_version "2-1") ExternalProject_Add(vmc GIT_REPOSITORY https://github.com/vmc-project/vmc GIT_TAG v${vmc_version} - ${CMAKE_DEFAULT_ARGS} ${LOG_TO_FILE} + ${CMAKE_DEFAULT_ARGS} CMAKE_ARGS + ${FAIRSOFT_RPATH_ARGS} + ${LOG_TO_FILE} DEPENDS root ${extract_source_cache_target} ) @@ -448,6 +462,7 @@ ExternalProject_Add(geant3 GIT_REPOSITORY https://github.com/FairRootGroup/geant3 GIT_TAG v${geant3_version} PATCH_COMMAND ${patch} -p1 -i "${CMAKE_SOURCE_DIR}/legacy/geant3/fix_cmake.patch" ${CMAKE_DEFAULT_ARGS} CMAKE_ARGS + ${FAIRSOFT_RPATH_ARGS} "-DBUILD_GCALOR=ON" "-DCMAKE_C_STANDARD=17" DEPENDS root vmc ${extract_source_cache_target} @@ -459,6 +474,7 @@ set(vgm_version "5-3-1") ExternalProject_Add(vgm GIT_REPOSITORY https://github.com/vmc-project/vgm GIT_TAG v${vgm_version} ${CMAKE_DEFAULT_ARGS} CMAKE_ARGS + ${FAIRSOFT_RPATH_ARGS} "-DWITH_TEST=OFF" DEPENDS clhep geant4 root ${extract_source_cache_target} ${LOG_TO_FILE} @@ -469,6 +485,7 @@ set(geant4_vmc_version "6-7-p1") ExternalProject_Add(geant4_vmc GIT_REPOSITORY https://github.com/vmc-project/geant4_vmc GIT_TAG v${geant4_vmc_version} ${CMAKE_DEFAULT_ARGS} CMAKE_ARGS + ${FAIRSOFT_RPATH_ARGS} "-DGeant4VMC_USE_VGM=ON" "-DGeant4VMC_USE_GEANT4_UI=OFF" "-DGeant4VMC_USE_GEANT4_VIS=OFF" diff --git a/legacy/root/fix_rpath_info.patch b/legacy/root/fix_rpath_info.patch new file mode 100644 index 00000000..48b072e1 --- /dev/null +++ b/legacy/root/fix_rpath_info.patch @@ -0,0 +1,43 @@ +diff --git a/bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt b/bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt +index 911517294b..be64df9b42 100644 +--- a/bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt ++++ b/bindings/pyroot/cppyy/CPyCppyy/CMakeLists.txt +@@ -67,6 +67,8 @@ endif() + + if(NOT MSVC) + target_compile_options(${libname} PRIVATE -Wno-strict-aliasing) ++ # Make sure that relative RUNPATH to main ROOT libraries is always correct. ++ ROOT_APPEND_LIBDIR_TO_INSTALL_RPATH(${libname} ${CMAKE_INSTALL_LIBDIR}) + endif() + if(NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND NOT MSVC) + target_compile_options(${libname} PRIVATE +diff --git a/bindings/pyroot/cppyy/cppyy-backend/CMakeLists.txt b/bindings/pyroot/cppyy/cppyy-backend/CMakeLists.txt +index f296f3886d..bb0a0fd9b6 100644 +--- a/bindings/pyroot/cppyy/cppyy-backend/CMakeLists.txt ++++ b/bindings/pyroot/cppyy/cppyy-backend/CMakeLists.txt +@@ -36,6 +36,12 @@ target_link_libraries(${libname} Core ${CMAKE_DL_LIBS}) + # cppyy uses ROOT headers from binary directory + add_dependencies(${libname} move_headers) + ++if(NOT MSVC) ++ # Make sure that relative RUNPATH to main ROOT libraries is always correct. ++ ROOT_APPEND_LIBDIR_TO_INSTALL_RPATH(${libname} ${CMAKE_INSTALL_LIBDIR}) ++endif() ++ ++ + set_property(GLOBAL APPEND PROPERTY ROOT_EXPORTED_TARGETS ${libname}) + + # Install library +diff --git a/bindings/pyroot/pythonizations/CMakeLists.txt b/bindings/pyroot/pythonizations/CMakeLists.txt +index e222e04c0e..a80c716d73 100644 +--- a/bindings/pyroot/pythonizations/CMakeLists.txt ++++ b/bindings/pyroot/pythonizations/CMakeLists.txt +@@ -187,6 +187,8 @@ endif() + target_include_directories(${libname} + SYSTEM PRIVATE ${Python3_INCLUDE_DIRS}) + ++ROOT_APPEND_LIBDIR_TO_INSTALL_RPATH(${libname} ${CMAKE_INSTALL_LIBDIR}) ++ + target_include_directories(${libname} + PUBLIC $) + From 812e1193f014882afaf767967a4f5d7aa2651c01 Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Fri, 5 Sep 2025 11:47:06 +0200 Subject: [PATCH 21/34] [legacy] bootstrap-cmake.sh: Bump to v4.1.1 --- legacy/bootstrap-cmake.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/bootstrap-cmake.sh b/legacy/bootstrap-cmake.sh index 8862f25d..1278d2a0 100755 --- a/legacy/bootstrap-cmake.sh +++ b/legacy/bootstrap-cmake.sh @@ -19,7 +19,7 @@ trap "cleanup ${builddir}" EXIT pushd "${builddir}" > /dev/null cmakebaseurl="https://github.com/Kitware/CMake/releases/download/v" -cmakeversion="3.27.4" +cmakeversion="4.1.1" unames=$(uname -s | tr '[:upper:]' '[:lower:]') unamem=$(uname -m | tr '[:upper:]' '[:lower:]') cmaketargz="cmake-${cmakeversion}-${unames}-${unamem}.tar.gz" From acdc75b6af48426140166ccaef4b013a4329de19 Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Fri, 5 Sep 2025 11:50:37 +0200 Subject: [PATCH 22/34] [legacy] onnxruntime: Bump 1.22.2 In contrast to the default packages onnxruntime needs newer versions of CMake (cmake >=3.28) and the compiler (gcc >= 11.1). For the optional package this is tolerated. The error messages are meaningful and point to the problem of insufficient versions Fixes https://github.com/FairRootGroup/FairSoft/issues/510 --- cmake/legacy.cmake | 17 ++------ legacy/README.md | 2 +- .../onnxruntime/fix_gcc13_compilation.patch | 42 +++++++++++++++++++ 3 files changed, 47 insertions(+), 14 deletions(-) create mode 100644 legacy/onnxruntime/fix_gcc13_compilation.patch diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index e3fda7ba..66ce676e 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -496,25 +496,16 @@ ExternalProject_Add(geant4_vmc ) list(APPEND packages onnxruntime) -set(onnxruntime_version "1.12.1") +set(onnxruntime_version "1.22.2") ExternalProject_Add(onnxruntime UPDATE_DISCONNECTED ON - PATCH_COMMAND ${patch} -p1 -i "${CMAKE_SOURCE_DIR}/legacy/onnxruntime/install_config_files.patch" - COMMAND ${patch} -p1 -i "${CMAKE_SOURCE_DIR}/legacy/onnxruntime/fix_python_detection.patch" + PATCH_COMMAND ${patch} -p1 -i "${CMAKE_SOURCE_DIR}/legacy/onnxruntime/fix_gcc13_compilation.patch" GIT_REPOSITORY https://github.com/microsoft/onnxruntime/ GIT_TAG v${onnxruntime_version} GIT_SHALLOW ON GIT_SUBMODULES - "cmake/external/SafeInt" - "cmake/external/date" - "cmake/external/flatbuffers" # at the moment, there is no option to consume external - "cmake/external/json" - "cmake/external/mp11" - "cmake/external/nsync" "cmake/external/onnx" - "cmake/external/protobuf" # TODO explore, if we can offer this as separate pkg (conditionally?) - "cmake/external/pytorch_cpuinfo" - "cmake/external/re2" - "cmake/external/eigen" + "cmake/external/emsdk" + "cmake/external/libprotobuf-mutator" SOURCE_SUBDIR cmake ${CMAKE_DEFAULT_ARGS} CMAKE_ARGS "-Donnxruntime_BUILD_UNIT_TESTS=OFF" diff --git a/legacy/README.md b/legacy/README.md index 357704e9..2cdaedf7 100644 --- a/legacy/README.md +++ b/legacy/README.md @@ -113,7 +113,7 @@ please contact us. | geant4 | 11.3.2 | https://geant4.web.cern.ch | | geant4_vmc | 6-7-p1 | https://github.com/vmc-project/geant4_vmc | | hepmc | 2.06.11 | http://hepmc.web.cern.ch | -| onnxruntime | 1.12.1 | https://github.com/microsoft/onnxruntime | +| onnxruntime | 1.22.2 | https://github.com/microsoft/onnxruntime | | pythia8 | 8315 | https://pythia.org/ | | root | 6.36.04 | https://root.cern | | vc | 1.4.4 | https://github.com/VcDevel/Vc | diff --git a/legacy/onnxruntime/fix_gcc13_compilation.patch b/legacy/onnxruntime/fix_gcc13_compilation.patch new file mode 100644 index 00000000..528717cc --- /dev/null +++ b/legacy/onnxruntime/fix_gcc13_compilation.patch @@ -0,0 +1,42 @@ +diff --git a/onnxruntime/core/optimizer/transpose_optimization/optimizer_api.h b/onnxruntime/core/optimizer/transpose_optimization/optimizer_api.h +index e4d59ea73..8d571d603 100644 +--- a/onnxruntime/core/optimizer/transpose_optimization/optimizer_api.h ++++ b/onnxruntime/core/optimizer/transpose_optimization/optimizer_api.h +@@ -3,6 +3,7 @@ + + #pragma once + ++#include + #include + #include + #include +diff --git a/cmake/onnxruntime_mlas.cmake b/cmake/onnxruntime_mlas.cmake +index 15864a0198..862f1ce0ce 100644 +--- a/cmake/onnxruntime_mlas.cmake ++++ b/cmake/onnxruntime_mlas.cmake +@@ -602,12 +602,6 @@ else() + ${MLAS_SRC_DIR}/rotary_embedding_kernel_avx2.cpp + ${MLAS_SRC_DIR}/rotary_embedding_kernel_avx2_fp32.cpp + ) +- if(CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 13.1 AND NOT(APPLE)) +- set(mlas_platform_srcs_avx2 +- ${mlas_platform_srcs_avx2} +- ${MLAS_SRC_DIR}/x86_64/cvtfp16Avx.S +- ) +- endif() + + message(STATUS "CMAKE_CXX_COMPILER_ID: ${CMAKE_CXX_COMPILER_ID}") + message(STATUS "CMAKE_CXX_COMPILER_VERSION: ${CMAKE_CXX_COMPILER_VERSION}") +diff --git a/onnxruntime/core/mlas/lib/platform.cpp b/onnxruntime/core/mlas/lib/platform.cpp +index 582c1ab944..d09a65168c 100644 +--- a/onnxruntime/core/mlas/lib/platform.cpp ++++ b/onnxruntime/core/mlas/lib/platform.cpp +@@ -500,7 +500,7 @@ Return Value: + } + + #ifndef __APPLE__ +-#if (defined(_MSC_VER) && (_MSC_VER >= 1933)) || (defined(__GNUC__) && (__GNUC__ >= 13)) ++#if (defined(_MSC_VER) && (_MSC_VER >= 1933)) + // + // Check if the processor supports AVX NE CONVERT. + // From 40067520cc10a933613ad9bfd395290da130f976 Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Mon, 8 Sep 2025 08:59:53 +0200 Subject: [PATCH 23/34] [legacy] Allow passing external compiler info On some systems the default compiler is to old to compile FairSoft. Allow using a newer non system compiler by using CMAKE variables which are properly passed to the package build systems. --- cmake/legacy.cmake | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index 66ce676e..8b910794 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -73,6 +73,20 @@ set(CMAKE_DEFAULT_ARGS CMAKE_CACHE_DEFAULT_ARGS "-DCMAKE_INSTALL_LIBDIR:PATH=lib" ) + +if (CMAKE_C_COMPILER) + list(APPEND CMAKE_DEFAULT_ARGS "-DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}") +endif() +if (CMAKE_CXX_COMPILER) + list(APPEND CMAKE_DEFAULT_ARGS "-DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}" + ) +endif() +if (CMAKE_Fortran_COMPILER) + list(APPEND CMAKE_DEFAULT_ARGS "-DCMAKE_Fortran_COMPILER:STRING=${CMAKE_Fortran_COMPILER}") +endif() + +#message(FATAL_ERROR "CMAKE_DEFAULT_ARGS: ${CMAKE_DEFAULT_ARGS}") + set(FAIRSOFT_RPATH_ARGS "-DCMAKE_SKIP_BUILD_RPATH:BOOL=FALSE" "-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=FALSE" From 66d097196bf06d36e0cd6d9c866453e33e769c50 Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Mon, 8 Sep 2025 09:26:16 +0200 Subject: [PATCH 24/34] [legacy] Update information about tested systems --- legacy/README.md | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/legacy/README.md b/legacy/README.md index 2cdaedf7..954783d6 100644 --- a/legacy/README.md +++ b/legacy/README.md @@ -84,19 +84,32 @@ please contact us. | **OS Name** | **Arch** | **OS Version** | **Compiler** | **CMake** | | --- | --- | --- | --- | --- | -| Almalinux | x86_64 | 9 | GCC 11.4.1 | 3.27.4 (`bootstrap-cmake.sh`) | -| Debian | x86_64 | 10 | GCC 8.3.0 | 3.27.4 (`bootstrap-cmake.sh`) | -| Debian | x86_64 | 11 | GCC 10.2.1 | 3.27.4 (`bootstrap-cmake.sh`) | -| Debian | x86_64 | 12 | GCC 12.2.0 | 3.25.1 | -| Fedora | x86_64 | 37 | GCC 12.3.1 | 3.27.7 | | Fedora | x86_64 | 38 | GCC 13.2.1 | 3.27.7 | -| Fedora | x86_64 | 39 | GCC 13.2.1 | 3.27.7 | +| Fedora | x86_64 | 40 | GCC 14.2.1 | 3.30.8 | +| Fedora | x86_64 | 42 | GCC 15.2.1 | 3.31.6 | +| Debian | x86_64 | 11 | GCC 10.2.1 | 4.4.1 (`bootstrap-cmake.sh`) | +| Debian | x86_64 | 12 | GCC 12.2.0 | 3.25.1 | +| Open Suse | x86_64 | 15.6 | GCC 14.3.0 (non system) | 3.28.3 | + +Not yet tested but know to work with previous FairSoft release. +Will be tested before release + +| **OS Name** | **Arch** | **OS Version** | **Compiler** | **CMake** | +| --- | --- | --- | --- | --- | +| Almalinux | x86_64 | 9 | GCC 11.4.1 | 3.27.4 (`bootstrap-cmake.sh`) | | macOS | x86_64 | 14 | AppleClang 16, gfortran 14 | 3.31.0 (brew) | | macOS | x86_64 | 15 | AppleClang 16, gfortran 14 | 3.31.0 (brew) | | macOS | arm64 | 15 | AppleClang 16, gfortran 14 | 3.31.0 (brew) | | Ubuntu | x86_64 | 22.04 | GCC 11.4.0 | 3.22.1 | | Ubuntu | x86_64 | 24.04 | GCC 13.2.0 | 3.28.3 | +The additional package **onnxruntime** currently can't be compiled on +Debian10 because of the rather old compiler version. **onnxruntime** +requires at least gcc 11.1 The compilation also fails for OpenSuse Leap 15.6 +due to configuration problems. Sine the build system requires at least CMake +3.28 it is needed to install a newer CMake version for Debian12 and +Fedora38. + ## Included packages | **Package** | **Version** | **URL** | From 19a0070b712a26ef62b0b1b3c7bbed283a359f9a Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Mon, 8 Sep 2025 09:36:42 +0200 Subject: [PATCH 25/34] [legacy] Update setup scripts --- legacy/setup-debian.sh | 21 ++++++++++----------- legacy/setup-fedora.sh | 8 ++++---- legacy/setup-opensuse.sh | 32 ++++++++++++++++++++------------ 3 files changed, 34 insertions(+), 27 deletions(-) diff --git a/legacy/setup-debian.sh b/legacy/setup-debian.sh index 0bf63201..4993e841 100755 --- a/legacy/setup-debian.sh +++ b/legacy/setup-debian.sh @@ -1,18 +1,17 @@ #! /bin/bash + export DEBIAN_FRONTEND=noninteractive apt-get update apt-get -y upgrade apt-get -y install autoconf automake binutils \ - bison build-essential bzip2 ca-certificates coreutils \ - curl debianutils file findutils flex g++ gcc gfortran git gzip \ - hostname libbz2-dev libcurl4-openssl-dev libgsl-dev libicu-dev \ - libfftw3-dev libprotobuf-dev \ - libgl1-mesa-dev libglu1-mesa-dev libgrpc++-dev \ - liblzma-dev libncurses-dev libreadline-dev libsqlite3-dev libssl-dev libtool \ - libx11-dev libxerces-c-dev libxext-dev libxft-dev \ - libxml2-dev libxmu-dev libxpm-dev libyaml-cpp-dev libzstd-dev lsb-release make patch \ - python3-dev protobuf-compiler-grpc rsync sed subversion tar unzip wget xutils-dev xz-utils -apt-get -y -t buster-backports install cmake || \ - apt-get -y install cmake + bison build-essential bzip2 ca-certificates cmake coreutils \ + curl debianutils file findutils flex g++ gcc gfortran git gzip \ + hostname libbz2-dev libcurl4-openssl-dev libgsl-dev libicu-dev \ + libfftw3-dev libprotobuf-dev \ + libgl1-mesa-dev libglu1-mesa-dev libgrpc++-dev \ + liblzma-dev libncurses-dev libreadline-dev libsqlite3-dev libssl-dev libtool \ + libx11-dev libxerces-c-dev libxext-dev libxft-dev \ + libxml2-dev libxmu-dev libxpm-dev libyaml-cpp-dev libzstd-dev lsb-release make patch \ + python3-dev protobuf-compiler-grpc rsync sed subversion tar unzip wget xutils-dev xz-utils apt-get -y clean diff --git a/legacy/setup-fedora.sh b/legacy/setup-fedora.sh index e656aea0..01e781cd 100755 --- a/legacy/setup-fedora.sh +++ b/legacy/setup-fedora.sh @@ -1,17 +1,17 @@ #! /bin/bash dnf -y update -dnf -y groupinstall "C Development Tools and Libraries" +dnf -y group install "c-development" dnf -y install \ autoconf automake binutils bison bzip2-devel ca-certificates cmake coreutils curl-devel \ diffutils expat-devel fftw-devel findutils flex ftgl-devel gcc-c++ gcc-gfortran gdbm-devel \ gettext-devel giflib-devel git gl2ps-devel glew-devel gperf grpc-cli grpc-devel \ - grpc-plugins gsl-devel gzip help2man hostname hwloc-devel libX11-devel libXau-devel \ + grpc-plugins gsl-devel gzip help2man hostname htop hwloc-devel joe libX11-devel libXau-devel \ libXdmcp-devel libXext-devel libXfont-devel libXft-devel libXmu-devel libXpm-devel \ libXrender-devel libbsd-devel libicu-devel libjpeg-turbo-devel libtiff-devel libtool \ libunistring-devel libuuid-devel libxml2-devel libzstd-devel lz4-devel m4 make make mesa-libGL-devel \ - mesa-libGLU-devel ncurses-devel openblas-devel openssl-devel patch procps protobuf-devel python \ - python-devel python3-numpy python3-pygments python3-pyyaml readline-devel redhat-lsb-core \ + mesa-libGLU-devel ncdu ncurses-devel openblas-devel openssl-devel patch procps protobuf-devel python \ + python-devel python3-numpy python3-pygments python3-pyyaml readline-devel \ rsync sed sqlite-devel subversion tar tbb-devel unzip wget which xerces-c-devel xz-devel \ yaml-cpp-devel dnf -y clean all diff --git a/legacy/setup-opensuse.sh b/legacy/setup-opensuse.sh index 563c0f43..cc14c300 100755 --- a/legacy/setup-opensuse.sh +++ b/legacy/setup-opensuse.sh @@ -1,15 +1,23 @@ #! /bin/bash -zypper refresh -zypper update -y -zypper install -y autoconf automake binutils bison bzip2 libbz2-devel cmake \ -ca-certificates coreutils curl libcurl-devel diffutils expat libexpat-devel \ -fftw-devel findutils flex gcc-c++ gcc-fortran gdbm-devel gettext-devel git gperf gsl-devel \ -gzip help2man hostname hwloc hwloc-devel m4 make libbsd-devel libtool libicu-devel \ -glu-devel grpc-devel libunistring-devel libuuid-devel libX11-devel libXau-devel \ -libXdmcp-devel libXext-devel libXfont-devel libXft-devel libxml2-devel \ -libXmu-devel libXpm-devel libXrender-devel liblz4-devel libzstd-devel lsb-release Mesa-devel \ -ncurses-devel openssl-devel patch procps python python-devel python3-devel \ -readline-devel rsync sed subversion tar libtbb2 tbb-devel unzip wget which \ -libxerces-c-devel xz xz-devel yaml-cpp-devel + +zypper refresh && zypper update -y +zypper install --no-recommends -y \ + autoconf automake binutils bison bzip2 libbz2-devel cmake \ + ca-certificates coreutils curl libcurl-devel diffutils expat libexpat-devel \ + fftw-devel findutils flex gcc-c++ gcc-fortran gdbm-devel gettext-devel git gperf gsl-devel \ + gzip help2man hostname htop hwloc hwloc-devel joe m4 make libbsd-devel libtool libicu-devel \ + glu-devel grpc-devel libunistring-devel libuuid-devel libX11-devel libXau-devel \ + libXdmcp-devel libXext-devel libXfont-devel libXft-devel libxml2-devel \ + libXmu-devel libXpm-devel libXrender-devel liblz4-devel libzstd-devel lsb-release Mesa-devel \ + ncurses-devel openssl-devel patch procps python python-devel python3-devel \ + readline-devel rsync sed subversion tar libtbb2 tbb-devel unzip wget which \ + libxerces-c-devel xz xz-devel yaml-cpp-devel zypper clean + +# install non system compiler which is needed to compile FairSoft for OpenSuse Leap 15.6 +# install newer python3 version which is needed for onnxruntime + +zypper install --no-recommends -y gcc14 gcc14-c++ gcc14-fortran python310 +rm /usr/bin/python3 +ln -s /usr/bin/python3.10 /usr/bin/python3 From 74f9dc5e240abd179ead594118b4c377fbc49bff Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Mon, 23 Jun 2025 16:48:08 +0200 Subject: [PATCH 26/34] [legacy] root: Properly uses defined macosx SDK Add a patch such that rootcling also uses the specified SDK if defined with -DCMAKE_OSX_SYSROOT. This allows in some cases to compile older ROOT versions with newer compiler versions. For example it becomes possible to compile ROOT 6.30 with Apple Clang 17 on macosx 15.6. All projects depending on ROOT need also to set CMAKE_OSX_SYSROOT to the same value used when building ROOT. Otherwise the dictionary generation may fail. Currently there is no way to automatically extract the information from the ROOT CMake configuration. --- cmake/legacy.cmake | 1 + legacy/root/fix_macos_sdk_for_rootcling.patch | 119 ++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 legacy/root/fix_macos_sdk_for_rootcling.patch diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index 8b910794..4076d262 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -455,6 +455,7 @@ ExternalProject_Add(root ${root_cocoa} UPDATE_DISCONNECTED ON PATCH_COMMAND ${patch} -p1 -i "${CMAKE_SOURCE_DIR}/legacy/root/fix_macos_sdk_mismatch.patch" + COMMAND ${patch} -p1 -i "${CMAKE_SOURCE_DIR}/legacy/root/fix_macos_sdk_for_rootcling.patch" COMMAND ${patch} -p1 -i "${CMAKE_SOURCE_DIR}/legacy/root/fix_rpath_info.patch" DEPENDS pythia8 vc vecgeom ${extract_source_cache_target} ${LOG_TO_FILE} diff --git a/legacy/root/fix_macos_sdk_for_rootcling.patch b/legacy/root/fix_macos_sdk_for_rootcling.patch new file mode 100644 index 00000000..93d778bd --- /dev/null +++ b/legacy/root/fix_macos_sdk_for_rootcling.patch @@ -0,0 +1,119 @@ +diff --git a/cmake/modules/RootMacros.cmake b/cmake/modules/RootMacros.cmake +index 616b133943..0ed52ee3bc 100644 +--- a/cmake/modules/RootMacros.cmake ++++ b/cmake/modules/RootMacros.cmake +@@ -604,6 +604,8 @@ function(ROOT_GENERATE_DICTIONARY dictionary) + if(ARG_STAGE1) + if(MSVC AND CMAKE_ROOTTEST_DICT) + set(command ${CMAKE_COMMAND} -E ${CMAKE_BINARY_DIR}/bin/rootcling_stage1.exe) ++ elseif(APPLE AND CMAKE_OSX_SYSROOT) ++ set(command ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib:$ENV{LD_LIBRARY_PATH}" env "SDKROOT=${CMAKE_OSX_SYSROOT}" $) + else() + set(command ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib:$ENV{LD_LIBRARY_PATH}" $) + endif() +@@ -613,6 +615,11 @@ function(ROOT_GENERATE_DICTIONARY dictionary) + if(CMAKE_PROJECT_NAME STREQUAL ROOT) + if(MSVC AND CMAKE_ROOTTEST_DICT) + set(command ${CMAKE_COMMAND} -E env "ROOTIGNOREPREFIX=1" ${CMAKE_BINARY_DIR}/bin/rootcling.exe) ++ elseif(APPLE AND CMAKE_OSX_SYSROOT) ++ set(command ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib:$ENV{LD_LIBRARY_PATH}" env "SDKROOT=${CMAKE_OSX_SYSROOT}" ++ "ROOTIGNOREPREFIX=1" $ -rootbuild) ++ # Modules need RConfigure.h copied into include/. ++ set(ROOTCINTDEP rootcling rconfigure) + else() + set(command ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib:$ENV{LD_LIBRARY_PATH}" + "ROOTIGNOREPREFIX=1" $ -rootbuild) +@@ -620,7 +627,9 @@ function(ROOT_GENERATE_DICTIONARY dictionary) + set(ROOTCINTDEP rootcling rconfigure) + endif() + elseif(TARGET ROOT::rootcling) +- if(APPLE) ++ if(APPLE AND CMAKE_OSX_SYSROOT) ++ set(command ${CMAKE_COMMAND} -E env "DYLD_LIBRARY_PATH=${ROOT_LIBRARY_DIR}:$ENV{DYLD_LIBRARY_PATH}" env "SDKROOT=${CMAKE_OSX_SYSROOT}" $) ++ elseif(APPLE) + set(command ${CMAKE_COMMAND} -E env "DYLD_LIBRARY_PATH=${ROOT_LIBRARY_DIR}:$ENV{DYLD_LIBRARY_PATH}" $) + else() + set(command ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=${ROOT_LIBRARY_DIR}:$ENV{LD_LIBRARY_PATH}" $) +diff --git a/etc/dictpch/makepch.py b/etc/dictpch/makepch.py +index 8233f4e2f2..c54c2e959a 100755 +--- a/etc/dictpch/makepch.py ++++ b/etc/dictpch/makepch.py +@@ -112,8 +112,12 @@ def makepch(): + + my_env = os.environ.copy() + existing_ldlib = my_env.get("LD_LIBRARY_PATH") ++ osx_sdk = my_env.get("CMAKE_OSX_SYSROOT") ++ + if not existing_ldlib: existing_ldlib = "" + my_env["LD_LIBRARY_PATH"] = os.path.join(rootdir, "lib") + ":" + existing_ldlib ++ if osx_sdk: ++ my_env["SDKROOT"] = 'osx_sdk' + + ret = subprocess.call(command.split(), env=my_env) + if ret == 0: +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 77c7762225..924942293e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -524,23 +524,44 @@ else() + get_property(__pch_dependencies GLOBAL PROPERTY ROOT_PCH_DEPENDENCIES) + get_property(__pch_dictionaries GLOBAL PROPERTY ROOT_PCH_DICTIONARIES) + +- add_custom_command(OUTPUT etc/allDict.cxx.pch +- BYPRODUCTS +- etc/dictpch/allCppflags.txt +- etc/dictpch/allHeaders.h +- etc/dictpch/allLinkDefs.h +- COMMAND +- ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/cmake/unix/makepchinput.py +- ${CMAKE_SOURCE_DIR} . ${pyroot_legacy} ${__cling_pch} +- COMMAND +- ${CMAKE_COMMAND} -E env ROOTIGNOREPREFIX=1 ${Python3_EXECUTABLE} +- ${CMAKE_SOURCE_DIR}/etc/dictpch/makepch.py etc/allDict.cxx.pch +- ${__allIncludes} -I${CMAKE_BINARY_DIR}/include -I${CMAKE_SOURCE_DIR}/core +- DEPENDS +- rootcling ${__pch_dependencies} ${__pch_dictionaries} +- ${CMAKE_SOURCE_DIR}/cmake/unix/makepchinput.py +- ${CMAKE_SOURCE_DIR}/etc/dictpch/makepch.py +- ) ++ if(APPLE AND CMAKE_OSX_SYSROOT) ++ add_custom_command(OUTPUT etc/allDict.cxx.pch ++ BYPRODUCTS ++ etc/dictpch/allCppflags.txt ++ etc/dictpch/allHeaders.h ++ etc/dictpch/allLinkDefs.h ++ COMMAND ++ ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/cmake/unix/makepchinput.py ++ ${CMAKE_SOURCE_DIR} . ${pyroot_legacy} ${__cling_pch} ++ COMMAND ++ ${CMAKE_COMMAND} -E env "SDKROOT=${CMAKE_OSX_SYSROOT}" env ROOTIGNOREPREFIX=1 ${Python3_EXECUTABLE} ++ ${CMAKE_SOURCE_DIR}/etc/dictpch/makepch.py etc/allDict.cxx.pch ++ ${__allIncludes} -I${CMAKE_BINARY_DIR}/include -I${CMAKE_SOURCE_DIR}/core ++ DEPENDS ++ rootcling ${__pch_dependencies} ${__pch_dictionaries} ++ ${CMAKE_SOURCE_DIR}/cmake/unix/makepchinput.py ++ ${CMAKE_SOURCE_DIR}/etc/dictpch/makepch.py ++ ) ++ else() ++ add_custom_command(OUTPUT etc/allDict.cxx.pch ++ BYPRODUCTS ++ etc/dictpch/allCppflags.txt ++ etc/dictpch/allHeaders.h ++ etc/dictpch/allLinkDefs.h ++ COMMAND ++ ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/cmake/unix/makepchinput.py ++ ${CMAKE_SOURCE_DIR} . ${pyroot_legacy} ${__cling_pch} ++ COMMAND ++ ${CMAKE_COMMAND} -E env ROOTIGNOREPREFIX=1 ${Python3_EXECUTABLE} ++ ${CMAKE_SOURCE_DIR}/etc/dictpch/makepch.py etc/allDict.cxx.pch ++ ${__allIncludes} -I${CMAKE_BINARY_DIR}/include -I${CMAKE_SOURCE_DIR}/core ++ DEPENDS ++ rootcling ${__pch_dependencies} ${__pch_dictionaries} ++ ${CMAKE_SOURCE_DIR}/cmake/unix/makepchinput.py ++ ${CMAKE_SOURCE_DIR}/etc/dictpch/makepch.py ++ ) ++ endif() ++ + add_custom_target(onepcm ALL DEPENDS etc/allDict.cxx.pch) + install(FILES ${CMAKE_BINARY_DIR}/etc/allDict.cxx.pch DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}) + install(DIRECTORY ${CMAKE_BINARY_DIR}/etc/dictpch DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}) From 92d4e19ddf2b2b775c62fcddd92f0a2ef8c9422f Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Mon, 22 Sep 2025 14:31:52 +0200 Subject: [PATCH 27/34] [legacy] On macosx use Homebrews patch and make --- cmake/legacy.cmake | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index 4076d262..a145a7f5 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -45,9 +45,31 @@ endif() find_package(Git REQUIRED) -find_package(Patch REQUIRED) + +if (APPLE) + find_program(_patch NAMES gpatch patch) + if(NOT _patch) + message(FATAL_ERROR "Could not find gpatch or patch command") + else() + message(STATUS "Found Patch: ${_patch}") + endif() + set(patch ${_patch} --merge) +else() + find_package(Patch REQUIRED) + set(patch $ --merge) +endif() + +if(APPLE AND ${CMAKE_MAKE_PROGRAM} MATCHES ".*/make$") + find_program(_make NAMES gmake make) + if(NOT _make) + message(FATAL_ERROR "Could not find gmake or make command") + else() + message(STATUS "Found Make: ${_make}") + endif() + set(CMAKE_MAKE_PROGRAM ${_make} CACHE FILEPATH "Make program" FORCE) +endif() + find_package(UnixCommands) -set(patch $ --merge) set(PROJECT_MIN_CXX_STANDARD 17) From a3c85b4dd70aef834b97514710d7a52d9b414ef5 Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Wed, 17 Sep 2025 10:47:47 +0200 Subject: [PATCH 28/34] [legacy] documentation: Add infos macosx Describe some known problems on macosx and the corresponding solutions. --- legacy/README.md | 35 +++++++++++++++++++++++++++++++++++ legacy/advanced.md | 11 +++++++++++ 2 files changed, 46 insertions(+) diff --git a/legacy/README.md b/legacy/README.md index 954783d6..964287ad 100644 --- a/legacy/README.md +++ b/legacy/README.md @@ -51,6 +51,41 @@ cmake -S -B -C /FairSoftConfig. Set the installation prefix and more customization options in the [`FairSoftConfig.cmake`](../FairSoftConfig.cmake) file itself. +#### 3.1 CMake configure step for macOS users + +There are some known problems about the compilation of FairSoft on macosx. + +The first two problems are related to the version of the **patch** and **make** +commands on macosx. + +The **patch** command does not support the needed parameters, +so one needs ot install a version of the **patch** command with brew. +The **make** command doesn't properly support the jobsserver which allows +parallel builds of all the packages contained in FairSoft which slows down +the installation enormously. The version provided by brew fixes the problem. +Both packages are already added in the updated setup script for macosx. +If found the packages from the homebrew installation directory will be used. + +The last problem is related to the macosx, compiler and SDK versions, such +that it depends on the personal setup. As described in more detail at +[macOS SDK](advanced.md#macos-sdk)! ROOT is very picky about the compiler +and the connected SDK. Compiling older ROOT versions with newer compilers +may need using an older SDK version. If not specified explicitely the +latest SDK version is used. To use an older SDK version on needs to add the +following parameter when running CMake + +``` +-DCMAKE_OSX_SYSROOT= +``` + +e.g. for Apple Clang 17 on macosx 15 or Apple Clang 16 on macosx 14 + +``` +-DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk +``` + +More information can be found at + **macOS users**: Notice [macOS SDK](advanced.md#macos-sdk)! ### 4. CMake build/install step diff --git a/legacy/advanced.md b/legacy/advanced.md index a6644adf..44dbcb0e 100644 --- a/legacy/advanced.md +++ b/legacy/advanced.md @@ -59,6 +59,17 @@ installed SDK version is the most sensible course of action here. `brew` contains already some logic to detect and choose the latest SDK. See the "macOS SDK" section in [FairSoftConfig.cmake](../FairSoftConfig.cmake). +The downside with picking the latest SDK version is that some older ROOT +versions can't be compiled any longer after updating the compiler and the +connected SDK. As described above the problems with compilation errors due +to **wrong** SDKs are because of ROOT and there mainly becuase of rootcling. +To overcome the problem and allow a more flexible compilation also with +non default SDKs we add the possibilty to define an older SDK when running +CMake. There are some additional changes in the build system of ROOT such +that rootcling take the setting properly into account. With this changes it +becomes possible to install FairSoft jan24 (ROOT 6.30.08) with Apple Clang +17 on macosx 15. + **If you have a deeper understanding of this issue and know a better solution, please let us know!** From f7ea4265b1a2ceb5b97a351f28adc25c83189c17 Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Tue, 23 Sep 2025 14:59:26 +0200 Subject: [PATCH 29/34] [legacy] boost: Build Boost with correct SDK Pass the needed information to the boost build system if a non standard SDK is used. --- cmake/legacy.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index a145a7f5..94714d3d 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -189,6 +189,7 @@ ExternalProject_Add(faircmakemodules list(APPEND packages boost) set(boost_version "87") set(boost_features + "-d+2" "cxxstd=${CMAKE_CXX_STANDARD}" "link=shared" "threading=multi" @@ -197,6 +198,11 @@ set(boost_features "pch=off" ) +if (APPLE AND CMAKE_OSX_SYSROOT) + list(APPEND boost_features "cxxflags='-isysroot${CMAKE_OSX_SYSROOT}'") + list(APPEND boost_features "linkflags='-isysroot${CMAKE_OSX_SYSROOT}'") +endif() + list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir) if("${isSystemDir}" STREQUAL "-1") From 4f833f07775041ac935ecbfc18f364373a50a27a Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Tue, 23 Sep 2025 17:57:20 +0200 Subject: [PATCH 30/34] [legacy] pythia8: Build Pythia8 with correct SDK Pass the needed information to the pythia8 build system if a non standard SDK is used. --- cmake/legacy.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index 94714d3d..d373a48e 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -353,6 +353,12 @@ ExternalProject_Add_Step(clhep move_dir DEPENDEES download DEPENDERS patch LOG ON ) +if (APPLE AND CMAKE_OSX_SYSROOT) + set(_pythia8_macosx_sdk -isysroot${CMAKE_OSX_SYSROOT}) +else() + set(_pythia8_macosx_sdk) +endif() + list(APPEND packages pythia8) set(pythia8_version "8315") string(SUBSTRING "${pythia8_version}" 0 2 pythia8_major_version) @@ -365,7 +371,7 @@ ExternalProject_Add(pythia8 "--with-hepmc2=${CMAKE_INSTALL_PREFIX}" "--prefix=${CMAKE_INSTALL_PREFIX}" "--cxx=${CMAKE_CXX_COMPILER}" - "--cxx-common='${CMAKE_CXX_FLAGS_${selected}} -fPIC -std=c++${CMAKE_CXX_STANDARD}'" + "--cxx-common='${CMAKE_CXX_FLAGS_${selected}} -fPIC -std=c++${CMAKE_CXX_STANDARD} ${_pythia8_macosx_sdk}'" DEPENDS hepmc ${extract_source_cache_target} ${LOG_TO_FILE} ) From da310188a3f3eec268212ceac146f76af4795f55 Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Wed, 24 Sep 2025 17:22:33 +0200 Subject: [PATCH 31/34] [legacy] root: Cleanup rootcling patch --- legacy/root/fix_macos_sdk_for_rootcling.patch | 77 ++++++------------- 1 file changed, 22 insertions(+), 55 deletions(-) diff --git a/legacy/root/fix_macos_sdk_for_rootcling.patch b/legacy/root/fix_macos_sdk_for_rootcling.patch index 93d778bd..ef3b0e1e 100644 --- a/legacy/root/fix_macos_sdk_for_rootcling.patch +++ b/legacy/root/fix_macos_sdk_for_rootcling.patch @@ -52,68 +52,35 @@ index 8233f4e2f2..c54c2e959a 100755 ret = subprocess.call(command.split(), env=my_env) if ret == 0: diff --git a/CMakeLists.txt b/CMakeLists.txt -index 77c7762225..924942293e 100644 +index 77c7762225..c5feadd9e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -524,23 +524,44 @@ else() +@@ -524,6 +524,12 @@ else() get_property(__pch_dependencies GLOBAL PROPERTY ROOT_PCH_DEPENDENCIES) get_property(__pch_dictionaries GLOBAL PROPERTY ROOT_PCH_DICTIONARIES) -- add_custom_command(OUTPUT etc/allDict.cxx.pch -- BYPRODUCTS -- etc/dictpch/allCppflags.txt -- etc/dictpch/allHeaders.h -- etc/dictpch/allLinkDefs.h -- COMMAND -- ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/cmake/unix/makepchinput.py -- ${CMAKE_SOURCE_DIR} . ${pyroot_legacy} ${__cling_pch} -- COMMAND ++ if (APPLE AND CMAKE_OSX_SYSROOT) ++ set(_sysroot_arg "SDKROOT=${CMAKE_OSX_SYSROOT}") ++ else() ++ set(_sysroot_arg) ++ endif() ++ + add_custom_command(OUTPUT etc/allDict.cxx.pch + BYPRODUCTS + etc/dictpch/allCppflags.txt +@@ -533,9 +539,12 @@ else() + ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/build/unix/makepchinput.py + ${CMAKE_SOURCE_DIR} . ${pyroot_legacy} ${__cling_pch} + COMMAND - ${CMAKE_COMMAND} -E env ROOTIGNOREPREFIX=1 ${Python3_EXECUTABLE} - ${CMAKE_SOURCE_DIR}/etc/dictpch/makepch.py etc/allDict.cxx.pch - ${__allIncludes} -I${CMAKE_BINARY_DIR}/include -I${CMAKE_SOURCE_DIR}/core -- DEPENDS -- rootcling ${__pch_dependencies} ${__pch_dictionaries} -- ${CMAKE_SOURCE_DIR}/cmake/unix/makepchinput.py -- ${CMAKE_SOURCE_DIR}/etc/dictpch/makepch.py -- ) -+ if(APPLE AND CMAKE_OSX_SYSROOT) -+ add_custom_command(OUTPUT etc/allDict.cxx.pch -+ BYPRODUCTS -+ etc/dictpch/allCppflags.txt -+ etc/dictpch/allHeaders.h -+ etc/dictpch/allLinkDefs.h -+ COMMAND -+ ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/cmake/unix/makepchinput.py -+ ${CMAKE_SOURCE_DIR} . ${pyroot_legacy} ${__cling_pch} -+ COMMAND -+ ${CMAKE_COMMAND} -E env "SDKROOT=${CMAKE_OSX_SYSROOT}" env ROOTIGNOREPREFIX=1 ${Python3_EXECUTABLE} -+ ${CMAKE_SOURCE_DIR}/etc/dictpch/makepch.py etc/allDict.cxx.pch -+ ${__allIncludes} -I${CMAKE_BINARY_DIR}/include -I${CMAKE_SOURCE_DIR}/core -+ DEPENDS -+ rootcling ${__pch_dependencies} ${__pch_dictionaries} -+ ${CMAKE_SOURCE_DIR}/cmake/unix/makepchinput.py -+ ${CMAKE_SOURCE_DIR}/etc/dictpch/makepch.py -+ ) -+ else() -+ add_custom_command(OUTPUT etc/allDict.cxx.pch -+ BYPRODUCTS -+ etc/dictpch/allCppflags.txt -+ etc/dictpch/allHeaders.h -+ etc/dictpch/allLinkDefs.h -+ COMMAND -+ ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/cmake/unix/makepchinput.py -+ ${CMAKE_SOURCE_DIR} . ${pyroot_legacy} ${__cling_pch} -+ COMMAND -+ ${CMAKE_COMMAND} -E env ROOTIGNOREPREFIX=1 ${Python3_EXECUTABLE} ++ ${CMAKE_COMMAND} -E env ++ ${_sysroot_arg} ++ ROOTIGNOREPREFIX=1 ++ ${PYTHON_EXECUTABLE} + ${CMAKE_SOURCE_DIR}/etc/dictpch/makepch.py etc/allDict.cxx.pch + ${__allIncludes} -I${CMAKE_BINARY_DIR}/include -I${CMAKE_SOURCE_DIR}/core -+ DEPENDS -+ rootcling ${__pch_dependencies} ${__pch_dictionaries} -+ ${CMAKE_SOURCE_DIR}/cmake/unix/makepchinput.py -+ ${CMAKE_SOURCE_DIR}/etc/dictpch/makepch.py -+ ) -+ endif() -+ - add_custom_target(onepcm ALL DEPENDS etc/allDict.cxx.pch) - install(FILES ${CMAKE_BINARY_DIR}/etc/allDict.cxx.pch DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}) - install(DIRECTORY ${CMAKE_BINARY_DIR}/etc/dictpch DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}) + DEPENDS + rootcling ${__pch_dependencies} ${__pch_dictionaries} + ${CMAKE_SOURCE_DIR}/build/unix/makepchinput.py From c417bb05cf65e6a1392e5df9f24f757cb508354d Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Tue, 24 Jun 2025 08:08:43 +0200 Subject: [PATCH 32/34] [legacy] build system: Allow setting the proper SDK Before a SDK defined via the CMake parameter CMAKE_OSX_SYSROOT was overwritten with the value extracted from brew. --- FairSoftConfig.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FairSoftConfig.cmake b/FairSoftConfig.cmake index 115c11fc..4485bfa0 100644 --- a/FairSoftConfig.cmake +++ b/FairSoftConfig.cmake @@ -74,7 +74,7 @@ endif() # `brew` contains some logic to detect installed SDKs on your machine and can choose the latest. # Since we anyways depend on brew, let's use it. # -if(APPLE) +if(APPLE AND NOT CMAKE_OSX_SYSROOT) execute_process(COMMAND brew ruby -e "puts MacOS.sdk_path" OUTPUT_VARIABLE macos_sdk_path) string(STRIP "${macos_sdk_path}" macos_sdk_path) set(CMAKE_OSX_SYSROOT "${macos_sdk_path}" CACHE FILEPATH "macOS SDK" FORCE) From c490134cb479e98604d805150f320cc47d86328a Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Sat, 11 Oct 2025 12:29:20 +0200 Subject: [PATCH 33/34] [legacy] test: Allow test with non standard SDK on macosx Properly pass CMAKE_OSX_SYSROOT to the build and test processes. Don't test building onnxruntime if CMake version >= 4.0.0 --- FairSoft_test.cmake | 24 ++++++++++++++---------- test/legacy/fairroot.sh.in | 9 +++++++-- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/FairSoft_test.cmake b/FairSoft_test.cmake index 29e40a1e..c4fd9de6 100644 --- a/FairSoft_test.cmake +++ b/FairSoft_test.cmake @@ -154,15 +154,19 @@ if (BUILD_METHOD STREQUAL legacy) list(APPEND options "-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}") endif() if(APPLE) - execute_process(COMMAND brew --prefix python OUTPUT_VARIABLE python_prefix) - string(STRIP "${python_prefix}" python_prefix) - list(APPEND options "-DPython_EXECUTABLE=${python_prefix}/bin/python3") - execute_process(COMMAND brew --prefix icu4c OUTPUT_VARIABLE icu_prefix) - string(STRIP "${icu_prefix}" icu_prefix) - list(APPEND options "-DICU_ROOT=${icu_prefix}") - execute_process(COMMAND brew ruby -e "puts MacOS.sdk_path" OUTPUT_VARIABLE macos_sdk_path) - string(STRIP "${macos_sdk_path}" macos_sdk_path) - list(APPEND options "-DCMAKE_OSX_SYSROOT=${macos_sdk_path}") + if(NOT CMAKE_OSX_SYSROOT) + execute_process(COMMAND brew --prefix python OUTPUT_VARIABLE python_prefix) + string(STRIP "${python_prefix}" python_prefix) + list(APPEND options "-DPython_EXECUTABLE=${python_prefix}/bin/python3") + execute_process(COMMAND brew --prefix icu4c OUTPUT_VARIABLE icu_prefix) + string(STRIP "${icu_prefix}" icu_prefix) + list(APPEND options "-DICU_ROOT=${icu_prefix}") + execute_process(COMMAND brew ruby -e "puts MacOS.sdk_path" OUTPUT_VARIABLE macos_sdk_path) + string(STRIP "${macos_sdk_path}" macos_sdk_path) + list(APPEND options "-DCMAKE_OSX_SYSROOT=${macos_sdk_path}") + else() + list(APPEND options "-DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT}") + endif() endif() list(JOIN options ";" optionsstr) show_big_header("Configuring") @@ -176,7 +180,7 @@ if (BUILD_METHOD STREQUAL legacy) if (_ctest_build_errors) set(_ctest_build_retval 255) endif() - if(NOT _ctest_build_errors) + if(NOT _ctest_build_errors AND ${CMAKE_VERSION} VERSION_LESS 4) ctest_build(RETURN_VALUE _ctest_build_retval NUMBER_ERRORS _ctest_build_errors TARGET "onnxruntime" diff --git a/test/legacy/fairroot.sh.in b/test/legacy/fairroot.sh.in index 460b27e5..ba67ce63 100755 --- a/test/legacy/fairroot.sh.in +++ b/test/legacy/fairroot.sh.in @@ -10,8 +10,13 @@ git clone -b ${version} https://github.com/FairRootGroup/FairRoot $sourcedir pushd $sourcedir mkdir -p build/install export FAIRROOTPATH="$(realpath ./build/install)" -cmake -S. -Bbuild \ - -DCMAKE_INSTALL_PREFIX=$FAIRROOTPATH +_arguments="-DCMAKE_INSTALL_PREFIX=$FAIRROOTPATH -DCMAKE_C_STANDARD=11" +if [[ -n "@APPLE@" ]]; then + if [[ -n "@CMAKE_OSX_SYSROOT@" ]]; then + _arguments="${_arguments} -DCMAKE_OSX_SYSROOT=@CMAKE_OSX_SYSROOT@" + fi +fi +cmake -S. -Bbuild ${_arguments} cmake --build build --target install -j @NCPUS@ pushd build ctest --output-on-failure -E "(ex_MQ_pixel|pixelSplitDDS).*" -j @NCPUS@ $(ctest --version | grep -q "3\.16" || echo "--repeat until-pass:5") From fa9cf9f58ec578c7664e27b79c4db4673eba519a Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Sat, 11 Oct 2025 13:23:42 +0200 Subject: [PATCH 34/34] [legacy] test: Add test of FairRoot dev branch --- cmake/legacy.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmake/legacy.cmake b/cmake/legacy.cmake index d373a48e..54988380 100644 --- a/cmake/legacy.cmake +++ b/cmake/legacy.cmake @@ -620,8 +620,12 @@ add_custom_target(source-cache include(CTest) -foreach(ver IN ITEMS 18.6 18.8 19.0) - set(TEST_VERSION v${ver}_patches) +foreach(ver IN ITEMS 18.6 18.8 19.0 dev) + if(ver STREQUAL dev) + set(TEST_VERSION ${ver}) + else() + set(TEST_VERSION v${ver}_patches) + endif() configure_file(test/legacy/fairroot.sh.in ${CMAKE_BINARY_DIR}/test_fairroot_${ver}.sh @ONLY) add_test(NAME FairRoot_${ver} COMMAND test_fairroot_${ver}.sh