add nvcc-protobuf-fix
authorgit <redacted>
Fri, 17 Jul 2026 06:53:16 +0000 (02:53 -0400)
committergit <redacted>
Fri, 17 Jul 2026 06:53:16 +0000 (02:53 -0400)
README.md
nvcc-protobuf-fix.patch [new file with mode: 0644]

index 703facfda50942c2e164d5442fdcce8752892eca..a1095178c69cdb869894250a1aae62378fbc5ef6 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1 +1,2 @@
 * `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.
 * `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.
diff --git a/nvcc-protobuf-fix.patch b/nvcc-protobuf-fix.patch
new file mode 100644 (file)
index 0000000..61d2d10
--- /dev/null
@@ -0,0 +1,37 @@
+From 878c5c3cdc7513418662d6ff77c61b63a1b2538a Mon Sep 17 00:00:00 2001
+From: Isuru Fernando <isuruf@gmail.com>
+Date: Mon, 13 Oct 2025 16:10:25 -0500
+Subject: [PATCH 09/10] Workaround nvcc bug in message_lite.h
+
+See https://github.com/protocolbuffers/protobuf/issues/21542
+
+Patch by Samuel Benzaquen (sbenzaquen)
+---
+ src/google/protobuf/message_lite.h | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/google/protobuf/message_lite.h b/src/google/protobuf/message_lite.h
+index c416114aa9..3994762f06 100644
+--- a/src/google/protobuf/message_lite.h
++++ b/src/google/protobuf/message_lite.h
+@@ -273,6 +273,12 @@ struct MessageTraitsImpl {
+ template <typename T>
+ using MessageTraits = decltype(MessageTraitsImpl::value<T>);
++#ifdef __CUDACC__
++struct EnumTraitsImpl {
++  template <typename T>
++  static std::enable_if_t<sizeof(T) != 0> value;
++};
++#else
+ struct EnumTraitsImpl {
+   struct Undefined;
+   // We use an incomplete type to cause a compiler error if something tries to
+@@ -282,6 +288,7 @@ struct EnumTraitsImpl {
+   template <typename T>
+   static std::enable_if_t<sizeof(T) != 0, Undefined> value;
+ };
++#endif
+ template <typename T>
+ using EnumTraits = decltype(EnumTraitsImpl::value<T>);