From: git Date: Thu, 23 Jul 2026 12:08:12 +0000 (-0400) Subject: refine nvcc protobuf patch name, add a patch for abseil X-Git-Url: https://git.datadissipation.net/gentoo-patches/commitdiff_plain/HEAD refine nvcc protobuf patch name, add a patch for abseil --- diff --git a/README.md b/README.md index a109517..c8af6f9 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ * `dracut-zfs-mount` - mount all ZFS datasets from the imported pools before switching to the new root, helpful if crucial system binaries/libraries are on a separate dataset. Note that the mountpoints will technically change from `$PATH` to `/sysroot/$PATH`. This is mostly harmless, but remounting a dataset will mount it at the actual `/sysroot/$PATH`, so be careful. -* `nvcc-protobuf-fix` - get rid of a manually forced compiler error triggered by an incomplete type, causes NVCC to always fail and is safe to ignore. +* `nvcc-12.9-protobuf-enumtraits-fix` - get rid of a manually forced compiler error triggered by an incomplete type, the error causes NVCC to always fail and is safe to ignore. +* `nvcc-13.3-abseil-templates-fix` - fix template type parameter errors that appear with CUDA 13.3 diff --git a/nvcc-protobuf-fix.patch b/nvcc-12.9-protobuf-enumtraits-fix.patch similarity index 100% rename from nvcc-protobuf-fix.patch rename to nvcc-12.9-protobuf-enumtraits-fix.patch diff --git a/nvcc-13.3-abseil-templates-fix.patch b/nvcc-13.3-abseil-templates-fix.patch new file mode 100644 index 0000000..7378bd7 --- /dev/null +++ b/nvcc-13.3-abseil-templates-fix.patch @@ -0,0 +1,69 @@ +From 08ce1c212436916bb34d3c3fb8d1cbe2d6c48dc9 Mon Sep 17 00:00:00 2001 +From: Tianlei Wu +Date: Sat, 13 Jun 2026 23:47:08 +0000 +Subject: [PATCH 1/3] fix linux build for cuda 13.3 + +--- + btree_container.h | 8 ++++---- + common.h | 10 ++++++++++ + raw_hash_map.h | 4 ++-- + 3 files changed, 16 insertions(+), 6 deletions(-) + +--- a/absl/container/internal/common.h ++++ b/absl/container/internal/common.h +@@ -68,6 +68,16 @@ + using AddPtr = Other*; + }; + ++// Workaround for an NVCC 13.3 (cudafe++) host parse error triggered by naming ++// the member alias template `IfRRef<...>::AddPtr` directly inside the ++// insert_or_assign/try_emplace macros. Wrapping the qualified-id in this ++// top-level alias template avoids the mis-parse while preserving the original ++// SFINAE behavior: substitution still happens in the immediate context, so ++// forming a pointer-to-reference remains a soft (SFINAE) failure rather than a ++// hard error. See https://github.com/abseil/abseil-cpp/issues/2075. ++template ++using IfRRefAddPtr = typename IfRRef::template AddPtr; ++ + template + struct IsTransparent : std::false_type {}; + template +--- a/absl/container/internal/raw_hash_map.h ++++ b/absl/container/internal/raw_hash_map.h +@@ -106,8 +106,8 @@ + typename K = key_type, class V = mapped_type, \ + ABSL_INTERNAL_IF_##KValue##_NOR_##VValue( \ + int = (EnableIf::AddPtr, \ +- IfRRef::AddPtr>>()), \ ++ IfRRefAddPtr, \ ++ IfRRefAddPtr>>()), \ + ABSL_INTERNAL_SINGLE_ARG( \ + int &..., \ + decltype(EnableIf>()) = \ +--- a/absl/container/internal/btree_container.h ++++ b/absl/container/internal/btree_container.h +@@ -497,8 +497,8 @@ + typename K = key_type, class M, \ + ABSL_INTERNAL_IF_##KValue##_NOR_##MValue( \ + int = (EnableIf::AddPtr, \ +- IfRRef::AddPtr>>()), \ ++ IfRRefAddPtr, \ ++ IfRRefAddPtr>>()), \ + ABSL_INTERNAL_SINGLE_ARG( \ + int &..., \ + decltype(EnableIf>()) = \ +@@ -598,10 +598,10 @@ + ABSL_INTERNAL_IF_##KValue( \ + class... Args, \ + int = (EnableIf< \ +- LifetimeBoundK::AddPtr>>())), \ ++ LifetimeBoundK>>())), \ + ABSL_INTERNAL_IF_##KValue( \ + decltype(EnableIf::AddPtr>>()) = 0, \ ++ K, KValue, IfRRefAddPtr>>()) = 0, \ + class... Args), \ + std::enable_if_t::value, int> = \ + 0> \