From ba5d932bbd43b3937490cf43a1a0c60f4234c688 Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Fri, 20 Dec 2024 14:02:03 +0100 Subject: [PATCH] [CLANG]Update llvm to tag 19.1.6 --- clang-uml.spec | 9 ++- llvm.spec | 11 ++- py3-dxr.spec | 4 +- rivet-clang19.patch | 13 ++++ rivet.spec | 2 + vecgeom-clang19.patch | 172 ++++++++++++++++++++++++++++++++++++++++++ vecgeom.spec | 7 +- 7 files changed, 203 insertions(+), 15 deletions(-) create mode 100644 rivet-clang19.patch create mode 100644 vecgeom-clang19.patch diff --git a/clang-uml.spec b/clang-uml.spec index e9e5acc4b1d..bd4dc8ac142 100644 --- a/clang-uml.spec +++ b/clang-uml.spec @@ -1,12 +1,12 @@ -### RPM external clang-uml 0.5.2 +### RPM external clang-uml 0.5.6 -%define tag cd6dce2b0b34d55534d3de512ab088b9ad71bc76 +%define tag 5e8d35f181d1818310fb337e133e9d7600280e1f %define branch master %define github_user bkryza Source: git+https://github.com/%{github_user}/clang-uml.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz BuildRequires: cmake ninja -Requires: yaml-cpp llvm zlib +Requires: yaml-cpp llvm zlib zstd libxml2 %prep %setup -n %{n}-%{realversion} @@ -28,7 +28,8 @@ cmake ../%{n}-%{realversion} \ -DCMAKE_CXX_FLAGS="-Wno-sign-compare" \ %endif -DGIT_VERSION="%{realversion}" \ - -DCMAKE_PREFIX_PATH="${YAML_CPP_ROOT}/lib64/cmake/yaml-cpp;${ZLIB_ROOT}" + -DCMAKE_EXE_LINKER_FLAGS="-L${YAML_CPP_ROOT}/lib64" \ + -DCMAKE_PREFIX_PATH="%{cmake_prefix_path}" ninja -v %{makeprocesses} diff --git a/llvm.spec b/llvm.spec index 07885985e98..815cc0766ec 100644 --- a/llvm.spec +++ b/llvm.spec @@ -1,4 +1,4 @@ -### RPM external llvm 18.1.6 +### RPM external llvm 19.1.6 ## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64 ## INITENV +PATH PYTHON3PATH %{i}/lib64/python%{cms_python3_major_minor_version}/site-packages @@ -6,10 +6,10 @@ BuildRequires: cmake ninja Requires: gcc zlib python3 libxml2 zstd %{!?without_cuda:Requires: cuda} -%define llvmCommit 02c7568fc9f555b2c72fc169c8c68e2116d97382 -%define llvmBranch cms/release/18.x/1118c2e -%define iwyuCommit 377eaef70cdda47368939f4d9beabfabe3f628f0 -%define iwyuBranch clang_18 +%define llvmCommit 8b7cd04d9c367791750225cd6083b1bb02a1a944 +%define llvmBranch cms/release/19.x/e21dc4b +%define iwyuCommit 30e221fad0967aa6bcb279600127748ed3dab7ad +%define iwyuBranch clang_19 Source0: git+https://github.com/cms-externals/llvm-project.git?obj=%{llvmBranch}/%{llvmCommit}&export=llvm-%{realversion}-%{llvmCommit}&module=llvm-%{realversion}-%{llvmCommit}&output=/llvm-%{realversion}-%{llvmCommit}.tgz Source1: git+https://github.com/include-what-you-use/include-what-you-use.git?obj=%{iwyuBranch}/%{iwyuCommit}&export=iwyu-%{realversion}-%{iwyuCommit}&module=iwyu-%{realversion}-%{iwyuCommit}&output=/iwyu-%{realversion}-%{iwyuCommit}.tgz @@ -38,7 +38,6 @@ cd %{_builddir}/build cmake %{_builddir}/llvm-%{realversion}-%{llvmCommit}/llvm \ -G Ninja \ %if 0%{!?use_system_gcc:1} - -DGCC_INSTALL_PREFIX="${GCC_ROOT}" \ -DLLVM_BINUTILS_INCDIR:STRING="${GCC_ROOT}/include" \ %endif -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;compiler-rt;lld;openmp" \ diff --git a/py3-dxr.spec b/py3-dxr.spec index 87a41a0335a..c39a12260c0 100644 --- a/py3-dxr.spec +++ b/py3-dxr.spec @@ -2,8 +2,8 @@ ## INITENV +PATH PYTHON3PATH %i/${PYTHON3_LIB_SITE_PACKAGES} Requires: zlib llvm sqlite Requires: py3-Jinja2 py3-parsimonious py3-pysqlite3 py3-Pygments -%define dxrCommit 737d3b0570e5e4a7845e8cba7c0b000d2911f24e -%define branch cms/6ea764102a/clang18 +%define dxrCommit 46b5a40aa1cee3c26d2eddae342634d4bf3f540e +%define branch cms/6ea764102a/clang19 Source0: git+https://github.com/cms-externals/dxr.git?obj=%{branch}/%{dxrCommit}&export=dxr-%{dxrCommit}&module=dxr-%dxrCommit&output=/dxr-%{dxrCommit}.tgz %define keep_archives true diff --git a/rivet-clang19.patch b/rivet-clang19.patch new file mode 100644 index 00000000000..9f705f14d5f --- /dev/null +++ b/rivet-clang19.patch @@ -0,0 +1,13 @@ +diff --git a/include/Rivet/Analysis.hh b/include/Rivet/Analysis.hh +index 4734e4e..784d6da 100644 +--- a/include/Rivet/Analysis.hh ++++ b/include/Rivet/Analysis.hh +@@ -1187,7 +1187,7 @@ namespace Rivet { + if (re != "") { + std::smatch match; + const bool needsDP = std::regex_search(path, match, std::regex(re)); +- if (needsDP) yao.template setAnnotation("WriterDoublePrecision", "1"); ++ if (needsDP) yao.template setAnnotation<>("WriterDoublePrecision", "1"); + } + } + diff --git a/rivet.spec b/rivet.spec index 395331b0387..9a4ac854265 100644 --- a/rivet.spec +++ b/rivet.spec @@ -7,6 +7,7 @@ Source: git+https://gitlab.com/hepcedar/rivet.git?obj=master/%{n}-%{realversion} Source1: https://gitlab.com/hepcedar/rivet/-/commit/8869db87de9d6c8cfe57e16b2c1469c3cf3b38bd.diff Source99: scram-tools.file/tools/eigen/env Patch0: rivet-duplicate-libs +Patch1: rivet-clang19 Requires: hepmc3 fastjet fastjet-contrib yoda hdf5 highfive onnxruntime BuildRequires: python3 py3-cython autotools @@ -15,6 +16,7 @@ BuildRequires: python3 py3-cython autotools ## OLD GENSER: %setup -n rivet/%{realversion} %setup -n %{n}-%{realversion} %patch0 -p1 +%patch1 -p1 patch -p1 <%{_sourcedir}/8869db87de9d6c8cfe57e16b2c1469c3cf3b38bd.diff %build diff --git a/vecgeom-clang19.patch b/vecgeom-clang19.patch new file mode 100644 index 00000000000..cfb5495219a --- /dev/null +++ b/vecgeom-clang19.patch @@ -0,0 +1,172 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 495795d..3fcaace 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -224,7 +224,7 @@ cmake_dependent_option(VECGEOM_TEST_COVERAGE "Enable coverage testing flags" OFF + + ################################################################################ + # Minimum version of VecCore we need. +-set(VecCore_VERSION "0.8.0") ++set(VecCore_VERSION "0.8.2") + + # Enable/Disable build/use of builtin veccore + if(VECGEOM_BUILTIN_VECCORE) +diff --git a/cmake/modules/BuiltinVecCore.cmake b/cmake/modules/BuiltinVecCore.cmake +index 7e6d09b..d45fe49 100644 +--- a/cmake/modules/BuiltinVecCore.cmake ++++ b/cmake/modules/BuiltinVecCore.cmake +@@ -41,9 +41,9 @@ function (build_external_project target globpattern ) #FOLLOWING ARGUMENTS are t + endfunction() + + +-set(VecCore_PROJECT "VecCore-${VecCore_VERSION}") +-set(VecCore_SRC_URI "http://lcgpackages.web.cern.ch/lcgpackages/tarFiles/sources") +-set(VecCore_SRC_MD5 "3e5b84d1b502ab7c7047c4b494ce640a") ++set(VecCore_PROJECT "VecCore-v${VecCore_VERSION}") ++set(VecCore_SRC_URI "https://gitlab.cern.ch/VecGeom/VecCore/-/archive") ++set(VecCore_SRC_MD5 "c91d00f16ea1fbfad0101e11b2386e34") + set(VecCore_DESTDIR "${PROJECT_BINARY_DIR}/installExternals/${VecCore_PROJECT}") + set(VecCore_ROOTDIR "${VecCore_DESTDIR}/${CMAKE_INSTALL_PREFIX}") + set(VecCore_SRC_TAG "v${VecCore_VERSION}") +@@ -55,7 +55,7 @@ endif() + + build_external_project(${VecCore_PROJECT} + "${VecCore_ROOTDIR}/include/VecCore/*.h;${VecCore_ROOTDIR}/include/VecCore/VecCore;${VecCore_ROOTDIR}/include/VecCore/Backend/*.h" +- "URL \"${VecCore_SRC_URI}/VecCore-${VecCore_VERSION}.tar.gz\" ++ "URL \"${VecCore_SRC_URI}/VecCore-v${VecCore_VERSION}.tar.gz ${VecCore_SRC_URI}/v${VecCore_VERSION}/VecCore-v${VecCore_VERSION}.tar.gz\" + URL_MD5 ${VecCore_SRC_MD5} + #GIT_REPOSITORY \"${VecCore_SRC_URI}\" + #GIT_TAG \"${VecCore_SRC_TAG}\" +diff --git a/VecGeom/volumes/SpecializedPlacedVolImplHelper.h b/VecGeom/volumes/SpecializedPlacedVolImplHelper.h +index 5f63971..496d177 100644 +--- a/VecGeom/volumes/SpecializedPlacedVolImplHelper.h ++++ b/VecGeom/volumes/SpecializedPlacedVolImplHelper.h +@@ -153,7 +153,7 @@ public: + #endif + Transformation3D const *tr = this->GetTransformation(); + Precision output(-1.); +- Specialization::template DistanceToOut(*this->GetUnplacedStruct(), tr->Transform(point), ++ Specialization::template DistanceToOut<>(*this->GetUnplacedStruct(), tr->Transform(point), + tr->TransformDirection(direction), stepMax, output); + + #ifdef VECGEOM_DISTANCE_DEBUG +diff --git a/VecGeom/volumes/UnplacedVolumeImplHelper.h b/VecGeom/volumes/UnplacedVolumeImplHelper.h +index 4b2f7b2..7cbf855 100644 +--- a/VecGeom/volumes/UnplacedVolumeImplHelper.h ++++ b/VecGeom/volumes/UnplacedVolumeImplHelper.h +@@ -98,7 +98,7 @@ public: + assert(d.IsNormalized() && " direction not normalized in call to DistanceToOut "); + #endif + Precision output = kInfLength; +- Implementation::template DistanceToOut(((UnplacedVolume_t *)this)->UnplacedVolume_t::GetStruct(), p, d, step_max, ++ Implementation::template DistanceToOut<>(((UnplacedVolume_t *)this)->UnplacedVolume_t::GetStruct(), p, d, step_max, + output); + + // detect -inf responses which are often an indication for a real bug +diff --git a/VecGeom/volumes/kernel/ImplAsImplementation.h b/VecGeom/volumes/kernel/ImplAsImplementation.h +index a9d2cae..8cd3428 100644 +--- a/VecGeom/volumes/kernel/ImplAsImplementation.h ++++ b/VecGeom/volumes/kernel/ImplAsImplementation.h +@@ -51,7 +51,7 @@ struct IndirectImplementation { + VECCORE_ATT_HOST_DEVICE + static void Contains(UnplacedStruct_t const &s, Vector3D const &point, Bool_v &inside) + { +- DispatchingImplementation::template Contains(s, point, inside); ++ DispatchingImplementation::template Contains<>(s, point, inside); + } + + template +@@ -59,7 +59,7 @@ struct IndirectImplementation { + VECCORE_ATT_HOST_DEVICE + static void Inside(UnplacedStruct_t const &s, Vector3D const &point, Inside_t &inside) + { +- DispatchingImplementation::template Inside(s, point, inside); ++ DispatchingImplementation::template Inside<>(s, point, inside); + } + + template +@@ -68,7 +68,7 @@ struct IndirectImplementation { + static void DistanceToIn(UnplacedStruct_t const &s, Vector3D const &point, Vector3D const &direction, + Real_v const &stepMax, Real_v &distance) + { +- DispatchingImplementation::template DistanceToIn(s, point, direction, stepMax, distance); ++ DispatchingImplementation::template DistanceToIn<>(s, point, direction, stepMax, distance); + } + + template +@@ -77,7 +77,7 @@ struct IndirectImplementation { + static void DistanceToOut(UnplacedStruct_t const &s, Vector3D const &point, Vector3D const &direction, + Real_v const &stepMax, Real_v &distance) + { +- DispatchingImplementation::template DistanceToOut(s, point, direction, stepMax, distance); ++ DispatchingImplementation::template DistanceToOut<>(s, point, direction, stepMax, distance); + } + + template +@@ -85,7 +85,7 @@ struct IndirectImplementation { + VECCORE_ATT_HOST_DEVICE + static void SafetyToIn(UnplacedStruct_t const &s, Vector3D const &point, Real_v &safety) + { +- DispatchingImplementation::template SafetyToIn(s, point, safety); ++ DispatchingImplementation::template SafetyToIn<>(s, point, safety); + } + + template +@@ -93,7 +93,7 @@ struct IndirectImplementation { + VECCORE_ATT_HOST_DEVICE + static void SafetyToOut(UnplacedStruct_t const &s, Vector3D const &point, Real_v &safety) + { +- DispatchingImplementation::template SafetyToOut(s, point, safety); ++ DispatchingImplementation::template SafetyToOut<>(s, point, safety); + } + + template +@@ -102,7 +102,7 @@ struct IndirectImplementation { + static Vector3D NormalKernel(UnplacedStruct_t const &s, Vector3D const &point, + typename vecCore::Mask_v &valid) + { +- DispatchingImplementation::template NormalKernel(s, point, valid); ++ DispatchingImplementation::template NormalKernel<>(s, point, valid); + } + }; + +diff --git a/VecGeom/volumes/kernel/PolyhedronImplementation.h b/VecGeom/volumes/kernel/PolyhedronImplementation.h +index 9a1a016..9f0de05 100644 +--- a/VecGeom/volumes/kernel/PolyhedronImplementation.h ++++ b/VecGeom/volumes/kernel/PolyhedronImplementation.h +@@ -689,7 +689,7 @@ bool PolyhedronImplementation::ScalarContainsKernel(Unp + { + bool inBounds; + // Correct tube algorithm obtained from trait class +- HasInnerRadiiTraits::TubeKernels::template Contains( ++ HasInnerRadiiTraits::TubeKernels::template Contains<>( + unplaced.fBoundingTube, Vector3D(point[0], point[1], point[2] - unplaced.fBoundingTubeOffset), + inBounds); + if (!inBounds) return false; +@@ -753,7 +753,7 @@ Inside_t PolyhedronImplementation::ScalarInsideKernel(U + // FIX: the bounding tube was wrong. Since the fast UnplacedContains is + // used for early return, the bounding tube has to be larger than the + // ideal bounding tube to account for the tolerance (offset was wrong) +- HasInnerRadiiTraits::TubeKernels::template Contains( ++ HasInnerRadiiTraits::TubeKernels::template Contains<>( + unplaced.fBoundingTube, Vector3D(point[0], point[1], point[2] - unplaced.fBoundingTubeOffset), + inBounds); + if (!inBounds) return EInside::kOutside; +@@ -904,7 +904,7 @@ Precision PolyhedronImplementation::ScalarDistanceToInK + Precision tubeDistance = 0.; + { + Vector3D boundsPoint(point[0], point[1], point[2] - unplaced.fBoundingTubeOffset); +- HasInnerRadiiTraits::TubeKernels::template Contains(unplaced.fBoundingTube, boundsPoint, inBounds); ++ HasInnerRadiiTraits::TubeKernels::template Contains<>(unplaced.fBoundingTube, boundsPoint, inBounds); + // If the point is inside the bounding tube, the result of DistanceToIn is + // unreliable and cannot be used to reject rays. + // TODO: adjust tube DistanceToIn function to correctly return a negative +@@ -913,7 +913,7 @@ Precision PolyhedronImplementation::ScalarDistanceToInK + if (!inBounds) { + // If the point is outside the bounding tube, check if the ray misses + // the bounds +- HasInnerRadiiTraits::TubeKernels::template DistanceToIn(unplaced.fBoundingTube, boundsPoint, ++ HasInnerRadiiTraits::TubeKernels::template DistanceToIn<>(unplaced.fBoundingTube, boundsPoint, + direction, stepMax, tubeDistance); + if (tubeDistance == InfinityLength()) { + return InfinityLength(); diff --git a/vecgeom.spec b/vecgeom.spec index e2613fddf96..3e5d8c630f5 100644 --- a/vecgeom.spec +++ b/vecgeom.spec @@ -1,12 +1,13 @@ -### RPM external vecgeom v1.2.7 +### RPM external vecgeom v1.2.10 ## INCLUDE compilation_flags ## INCLUDE compilation_flags_lto ## INCLUDE cpp-standard ## INCLUDE microarch_flags -%define tag be99ff9e6b26fa5e0063f8bd21df23cb87911bf8 +%define tag bf8de1e0c18fb7b33c0871fab244de00d2bb2a44 Source: git+https://gitlab.cern.ch/VecGeom/VecGeom.git?obj=master/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz Patch0: vecgeom-fix-vector +Patch1: vecgeom-clang19 BuildRequires: cmake gmake %define keep_archives true %define vecgeom_backend Scalar @@ -15,8 +16,8 @@ BuildRequires: cmake gmake %prep %setup -n %{n}-%{realversion} - %patch0 -p1 +%patch1 -p1 %build %ifarch x86_64