refine nvcc protobuf patch name, add a patch for abseil master
authorgit <redacted>
Thu, 23 Jul 2026 12:08:12 +0000 (08:08 -0400)
committergit <redacted>
Thu, 23 Jul 2026 12:08:12 +0000 (08:08 -0400)
README.md
nvcc-12.9-protobuf-enumtraits-fix.patch [moved from nvcc-protobuf-fix.patch with 100% similarity]
nvcc-13.3-abseil-templates-fix.patch [new file with mode: 0644]

index a1095178c69cdb869894250a1aae62378fbc5ef6..c8af6f9250235fca16951152fa182d9831e168f0 100644 (file)
--- 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-13.3-abseil-templates-fix.patch b/nvcc-13.3-abseil-templates-fix.patch
new file mode 100644 (file)
index 0000000..7378bd7
--- /dev/null
@@ -0,0 +1,69 @@
+From 08ce1c212436916bb34d3c3fb8d1cbe2d6c48dc9 Mon Sep 17 00:00:00 2001
+From: Tianlei Wu <tlwu@microsoft.com>
+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<Other>` 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 <class T, class Other>
++using IfRRefAddPtr = typename IfRRef<T>::template AddPtr<Other>;
++
+ template <class, class = void>
+ struct IsTransparent : std::false_type {};
+ template <class T>
+--- 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<LifetimeBoundKV<K, KValue, V, VValue,                \
+-                                          IfRRef<int KQual>::AddPtr<K>,        \
+-                                          IfRRef<int VQual>::AddPtr<V>>>()),   \
++                                          IfRRefAddPtr<int KQual, K>,        \
++                                          IfRRefAddPtr<int VQual, V>>>()),   \
+           ABSL_INTERNAL_SINGLE_ARG(                                            \
+               int &...,                                                        \
+               decltype(EnableIf<LifetimeBoundKV<K, KValue, V, VValue>>()) =    \
+--- 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<LifetimeBoundKV<K, KValue, M, MValue,              \
+-                                          IfRRef<int KQual>::AddPtr<K>,      \
+-                                          IfRRef<int MQual>::AddPtr<M>>>()), \
++                                          IfRRefAddPtr<int KQual, K>,      \
++                                          IfRRefAddPtr<int MQual, M>>>()), \
+           ABSL_INTERNAL_SINGLE_ARG(                                          \
+               int &...,                                                      \
+               decltype(EnableIf<LifetimeBoundKV<K, KValue, M, MValue>>()) =  \
+@@ -598,10 +598,10 @@
+       ABSL_INTERNAL_IF_##KValue(                                               \
+           class... Args,                                                       \
+           int = (EnableIf<                                                     \
+-                 LifetimeBoundK<K, KValue, IfRRef<int KQual>::AddPtr<K>>>())), \
++                 LifetimeBoundK<K, KValue, IfRRefAddPtr<int KQual, K>>>())), \
+       ABSL_INTERNAL_IF_##KValue(                                               \
+           decltype(EnableIf<LifetimeBoundK<                                    \
+-                       K, KValue, IfRRef<int KQual>::AddPtr<K>>>()) = 0,       \
++                       K, KValue, IfRRefAddPtr<int KQual, K>>>()) = 0,       \
+           class... Args),                                                      \
+       std::enable_if_t<!std::is_convertible<K, const_iterator>::value, int> =  \
+           0>                                                                   \