[arch-commits] Commit in root/trunk (PKGBUILD fix_rootcling.patch nlohmann_json.patch)
Konstantin Gizdov
kgizdov at gemini.archlinux.org
Thu Aug 18 00:02:04 UTC 2022
Date: Thursday, August 18, 2022 @ 00:02:04
Author: kgizdov
Revision: 1266781
upgpkg: root 6.26.06-1: cuda and nccl rebuild
Added:
root/trunk/fix_rootcling.patch
root/trunk/nlohmann_json.patch
Modified:
root/trunk/PKGBUILD
---------------------+
PKGBUILD | 39 ++++++++++++++++++--------------
fix_rootcling.patch | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++
nlohmann_json.patch | 32 ++++++++++++++++++++++++++
3 files changed, 114 insertions(+), 17 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-08-17 23:53:34 UTC (rev 1266780)
+++ PKGBUILD 2022-08-18 00:02:04 UTC (rev 1266781)
@@ -6,8 +6,8 @@
pkgbase=root
pkgname=('root' 'root-cuda')
-pkgver=6.26.04
-pkgrel=2
+pkgver=6.26.06
+pkgrel=1
pkgdesc='C++ data analysis framework and interpreter from CERN'
arch=('x86_64')
url='https://root.cern'
@@ -99,16 +99,20 @@
'jupyter_notebook_config.py'
'nbman-for-arch.patch'
'thisroot.fail'
+ 'fix_rootcling.patch'
+ 'nlohmann_json.patch'
)
-sha512sums=('d1088f7a6c4f6c00efc3fa57add1e12eb45784934520a1be1aa76442cf526a6d9cb5f69e7fe17b7193c89ff829136842568c00389aa3b9ed9e5638451689ca38'
- 'af8f178fc9df66997d5495b271e38adcd1636aab4c8fc994c6600c2496127829d831250d73d3fc229b02dfe49b9867d0be979beacb959f2f3a05351b8118a4a6'
- '1fe6f4aa09d583d33f27cc766f4935510bb7ab6bbb8d4700baa1aaab92ea6c876500b67da1e4f6e0b510aa5616e4e193b860264b86925de85f2d9f558d75d5dc'
- '3c81d255a17b902ffac0187af1752847036137e16641a88b17eef0d9c944e6f0d3c954bc93307d6270603f43f6c23f2e04f98dc7a68f9d076dbaa8006a2527d6'
- '991be57297f3d39f1d284615a5b4c670282d1a615e4ab134c7cf5226422f7c00bda7a89a24ce5fec8dd0dc06e1b205e20e5c00701ec94caa6717b756f2bfd528'
- '9fe8fe72a2c1e86e75f901d80abd184785229949beaa4c7fd3da7ae5aa1e20615b620945f37efeb41377a3641e750be363517871ef35f5826cc0a2a279540bb9'
- '1c905ee7a3f8f5f3f567d957f9be6b503a8631565d4d9b9bfea5e496ef86865c5a8be1a1f8c7842754029879cf0afd2465249f532a116cc43660aa2e460ae682'
- '08037f68fa816debc4e9c16a26c862bc026c8e6ceaf2f5131d1493470599b4eb2b2efeef35249f15392aeff0c22bff59264e8a4ac6c73e4f195046be9d185724'
- '3b9e382480b28f60af0b096ac9a42e6ba611b899717988bdebffd5aeabab054e37a28a7421f4a0f39198638c31f56a657a8a9ccc3db54a87daf50d43d35b1ca9')
+b2sums=('cb9f4b17f7eae36fbd728aa9c03a5705f5d05da0a9c0913fef6145d3fae4843f1a77b3f6251cd6cc322fa7ada4837c0be69aa53b2e1572c72e6e91d1b68aef47'
+ '5da6218a171ee0fbd7b03518dde22787bb0e478a18dcf227eea4e65598c0a0bb299747c6503ad3026804e1a4dbcf4d2b674b83e6ed6e482dd3d14ceb4646dee8'
+ 'b5defce795dbfeee75dab0cc4c20ac84fe55cb11e9acdd5e75831b6db98e6190621867a65427ab44d93b6fe30398db6fd191defb029a6dcd0af087c1e5115451'
+ '5e4c589fd9e226fcf7ff9ab880687c10ff0f7b7c03fdf12fc477622d6ec291e2dc62e7f5ce7b68856bccf37b64b2f4331f46788548d39fdca57fd832d1f3b437'
+ 'fb7879d5961a4714ef2cbd33a4872d88dc0938ee87935c39b89b5973b75847413d941cfcb1af1669cb62b262ba5ab54f233dc0afd3e35c85b958622edfacd114'
+ '36c3543d008eda4b0200b730d3ca795de5dca0fee0ba6f98f1e1edfc820a92dfd1352a558c1593f2f8590b3febabfb74857ca59211a71090106ce292e399dd09'
+ '47a7b4491f1455ddb02c3793c7fbaf05184dba9a5fc9d7378608727e69c778dd5832c49f11f4d2c8204dcffc86fc4786b5616fb381c4e3e629d78db9c86913c5'
+ 'ec89007c4441d0010c0bfa90ca81e78ceeeb97bacaae2cc4814bd9a781062add80eaa6e4b8cf59c1a61e89ca8a14f3af6f1163766550f6db4154f671e5176d39'
+ '3501c944e8cab13fe9f5c8ab75a7cdb4b59bc5b00df4bf45ad246ab8cd6cb1ebde19369bc688458c97ff5f5acd4e86fc19b4c8f57ab4cb422d0a5eacac081138'
+ '5a6b92f685d830853b862c7471f8e802a45923543beb591313abd8aacf383d176d8e283380ab6418caa751449b5abc95391df1ed3ed83ed0b1d3bb9d25056272'
+ 'f7f73d45e9d6f64b2b3ca8f0275fc84f1dc75b88a5a148fc389247f5708331f0b9ebc8920a6d411a8ab8dd305c9d7e69300df5797ba1e5c0146a5f01a5d39e9f')
get_pyver () {
python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))'
@@ -148,12 +152,13 @@
# pass CUDA architectures to nvcc calls
# Not yet supported in root: TBD
- export CUSTOM_CUDA_ARCH='-DCMAKE_CUDA_ARCHITECTURES="52-real 52-virtual
- 53-real 53-virtual 60-real 60-virtual
- 61-real 61-virtual 62-real 62-virtual
- 70-real 70-virtual 72-real 72-virtual
- 75-real 75-virtual 80-real 80-virtual
- 86-real 86-virtual"'
+ local _cuda_arches=('52' '53' '60' '61' '62' '70' '72' '75' '80' '86' '87')
+ local _cuda_arch_vals=''
+ for _cuda_arch in "${_cuda_arches[@]}"; do
+ _cuda_arch_vals+="${_cuda_arch}-real;${_cuda_arch}-virtual;"
+ done
+ _cuda_arch_vals="${_cuda_arch_vals:0:-1}"
+ export CUSTOM_CUDA_ARCH='-DCMAKE_CUDA_ARCHITECTURES='"${_cuda_arch_vals}"
cp -r "${pkgbase}-${pkgver}" "${pkgbase}-${pkgver}-cuda"
}
Added: fix_rootcling.patch
===================================================================
--- fix_rootcling.patch (rev 0)
+++ fix_rootcling.patch 2022-08-18 00:02:04 UTC (rev 1266781)
@@ -0,0 +1,60 @@
+From af599f6239e87c85c36e5634d04210f74a6ef78b Mon Sep 17 00:00:00 2001
+From: Jonas Rembser <jonas.rembser at cern.ch>
+Date: Tue, 21 Sep 2021 15:15:17 +0200
+Subject: [PATCH] [cmake] Protect against empty `COMPILE_DEFINITIONS` in
+ rootcint command
+
+In the `rootcint` command defined in `RootMacros.cmake`, the
+`COMPILE_DEFINITIONS` from the target are forwarded as compiler flags.
+
+The `COMPILE_DEFINITIONS` are stored in the `module_defs` variable with
+a generator expression:
+
+```
+set(module_defs $<TARGET_PROPERTY:${ARG_MODULE},COMPILE_DEFINITIONS>)
+```
+
+Then, the definitions are added to the rootcint command with this
+expression:
+
+```
+"$<$<BOOL:${module_defs}>:-D$<JOIN:${module_defs},;-D>>"
+```
+
+This code was almost copied exactly from the CMake documentation
+example:
+
+https://cmake.org/cmake/help/latest/manual/cmake-generator-expressions.7.html
+
+In particular, the `BOOL` check makes sure that the if the target
+property is empty, we will not get a bare `-D` with nothing after it,
+corrupting the rootcint command.
+
+However, there is no protextion against the case where the
+`COMPILE_DEFINITIONS` target property is not empty, but its elements are
+empty strings! This happened to me in my recent build.
+
+Instead of trying to figure out where the empty strings are added to the
+`COMPILE_DEFINITIONS`, it is better to also protect against empty target
+property elements in the CMake generator expressions, which is
+implemented in this commit.
+---
+ cmake/modules/RootMacros.cmake | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/cmake/modules/RootMacros.cmake b/cmake/modules/RootMacros.cmake
+index c52c23d29af4..c62ffc2152a5 100644
+--- a/cmake/modules/RootMacros.cmake
++++ b/cmake/modules/RootMacros.cmake
+@@ -628,7 +628,10 @@ function(ROOT_GENERATE_DICTIONARY dictionary)
+ # and list exclusion for generator expressions is too complex.
+ set(module_incs $<REMOVE_DUPLICATES:$<TARGET_PROPERTY:${ARG_MODULE},INCLUDE_DIRECTORIES>>)
+ set(module_sysincs $<REMOVE_DUPLICATES:$<TARGET_PROPERTY:${ARG_MODULE},INTERFACE_SYSTEM_INCLUDE_DIRECTORIES>>)
+- set(module_defs $<TARGET_PROPERTY:${ARG_MODULE},COMPILE_DEFINITIONS>)
++ # The COMPILE_DEFINITIONS list might contain empty elements. These are
++ # removed with the FILTER generator expression, excluding elements that
++ # match the ^$ regexp (only matches empty strings).
++ set(module_defs "$<FILTER:$<TARGET_PROPERTY:${ARG_MODULE},COMPILE_DEFINITIONS>,EXCLUDE,^$>")
+ endif()
+ endif()
+
Added: nlohmann_json.patch
===================================================================
--- nlohmann_json.patch (rev 0)
+++ nlohmann_json.patch 2022-08-18 00:02:04 UTC (rev 1266781)
@@ -0,0 +1,32 @@
+diff --git a/graf3d/eve7/inc/ROOT/REveElement.hxx b/graf3d/eve7/inc/ROOT/REveElement.hxx
+index 2a127888a2..9deb3af147 100644
+--- a/graf3d/eve7/inc/ROOT/REveElement.hxx
++++ b/graf3d/eve7/inc/ROOT/REveElement.hxx
+@@ -16,26 +16,13 @@
+ #include <ROOT/REveVector.hxx>
+ #include <ROOT/REveProjectionBases.hxx>
+
++#include <nlohmann/json_fwd.hpp>
++
+ #include <map>
+ #include <memory>
+
+ class TGeoMatrix;
+
+-namespace nlohmann {
+-template<typename T, typename SFINAE>
+-struct adl_serializer;
+-
+-template <template <typename U, typename V, typename... Args> class ObjectType,
+- template <typename U, typename... Args> class ArrayType, class StringType, class BooleanType,
+- class NumberIntegerType, class NumberUnsignedType, class NumberFloatType,
+- template <typename U> class AllocatorType, template <typename T, typename SFINAE = void> class JSONSerializer,
+- class BinaryType>
+-class basic_json;
+-
+-using json = basic_json<std::map, std::vector, std::string, bool, std::int64_t, std::uint64_t, double, std::allocator,
+- adl_serializer, std::vector<std::uint8_t>>;
+-} // namespace nlohmann
+-
+ namespace ROOT {
+ namespace Experimental {
More information about the arch-commits
mailing list