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..f216beb075c 100644 --- a/llvm.spec +++ b/llvm.spec @@ -1,15 +1,15 @@ -### 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 BuildRequires: cmake ninja -Requires: gcc zlib python3 libxml2 zstd +Requires: gcc zlib python3 libxml2 zstd libunwind %{!?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 @@ -35,13 +35,14 @@ rm -rf %{_builddir}/build mkdir -p %{_builddir}/build cd %{_builddir}/build +host_triple=$(gcc -dumpmachine) 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" \ + -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \ -DCMAKE_INSTALL_PREFIX:PATH="%{i}" \ -DCMAKE_BUILD_TYPE:STRING=Release \ -DLLVM_LIBDIR_SUFFIX:STRING=64 \ @@ -50,14 +51,14 @@ cmake %{_builddir}/llvm-%{realversion}-%{llvmCommit}/llvm \ -DLLVM_ENABLE_EH:BOOL=ON \ -DLLVM_ENABLE_PIC:BOOL=ON \ -DLLVM_ENABLE_RTTI:BOOL=ON \ - -DLLVM_HOST_TRIPLE=$(gcc -dumpmachine) \ + -DLLVM_HOST_TRIPLE=${host_triple} \ -DLLVM_TARGETS_TO_BUILD:STRING="X86;PowerPC;AArch64;RISCV;NVPTX" \ %if 0%{!?without_cuda:1} -DLIBOMPTARGET_NVPTX_ALTERNATE_HOST_COMPILER=/usr/bin/gcc \ -DLIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES="%omptarget_cuda_archs" \ %endif -DCMAKE_REQUIRED_INCLUDES="${ZLIB_ROOT}/include" \ - -DCMAKE_PREFIX_PATH="${ZLIB_ROOT};${LIBXML2_ROOT};${ZSTD_ROOT}" + -DCMAKE_PREFIX_PATH="${ZLIB_ROOT};${LIBXML2_ROOT};${ZSTD_ROOT};${LIBUNWIND_ROOT}" ninja -v %{makeprocesses} ninja -v %{makeprocesses} check-clang-tools @@ -67,6 +68,10 @@ bin/clang-tidy --checks=* --list-checks | grep cms-handle cd ../build ninja -v %{makeprocesses} install +#Create libomp symlink +host_triple=$(gcc -dumpmachine) +ln -s ${host_triple}/libomp.so %{i}/lib64/libomp.so + BINDINGS_PATH=%{i}/lib64/python%{cms_python3_major_minor_version}/site-packages PKG_INFO_FILE=$BINDINGS_PATH/clang-%{realversion}-py%{cms_python3_major_minor_version}.egg-info/PKG-INFO mkdir -p $BINDINGS_PATH @@ -85,7 +90,15 @@ rm -f %{i}/bin/FileRadar.scpt %{i}/bin/GetRadarVersion.scpt # Avoid dependency on /usr/bin/python, Darwin + Xcode specific rm -f %{i}/bin/set-xcode-analyzer +#Create clang cfg file for gcc-toolchain +%if 0%{!?use_system_gcc:1} +echo "--gcc-toolchain=$GCC_ROOT" > %{i}/bin/clang++.cfg +%endif + %post %{relocateConfig}include/llvm/Config/llvm-config.h %{relocateConfig}include/clang/Config/config.h %{relocateConfig}lib64/cmake/llvm/LLVMConfig.cmake +%if 0%{!?use_system_gcc:1} +%{relocateConfig}bin/clang++.cfg +%endif 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 da0b11c4e0e..800bbca9c33 100644 --- a/rivet.spec +++ b/rivet.spec @@ -6,6 +6,7 @@ Source: git+https://gitlab.com/hepcedar/rivet.git?obj=master/%{n}-%{realversion}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}.tgz 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 @@ -14,6 +15,7 @@ BuildRequires: python3 py3-cython autotools ## OLD GENSER: %setup -n rivet/%{realversion} %setup -n %{n}-%{realversion} %patch0 -p1 +%patch1 -p1 %build source %{_sourcedir}/env diff --git a/rocm.spec b/rocm.spec index d410984bd6c..54aa00bc212 100644 --- a/rocm.spec +++ b/rocm.spec @@ -128,4 +128,12 @@ find %{i}/bin/ %{i}/libexec/ %{i}/llvm/bin/ %{i}/llvm/lib/ -type f | xargs -r \ cd build/rocprofiler-register make install +#Create clang cfg file for gcc-toolchain +%if 0%{!?use_system_gcc:1} +echo "--gcc-toolchain=$GCC_ROOT" > %{i}/llvm/bin/clang++.cfg +%endif + %post +%if 0%{!?use_system_gcc:1} +%{relocateConfig}/llvm/bin/clang++.cfg +%endif 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