From: git Date: Fri, 17 Jul 2026 06:53:16 +0000 (-0400) Subject: add nvcc-protobuf-fix X-Git-Url: https://git.datadissipation.net/gentoo-patches/commitdiff_plain/d71630d95e8c0c0f1672f5a42fb4a266d7b6dd34?ds=sidebyside;hp=fe7acb28bea94e087426d4096483e7fa62359a34 add nvcc-protobuf-fix --- diff --git a/README.md b/README.md index 703facf..a109517 100644 --- 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. +* `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 index 0000000..61d2d10 --- /dev/null +++ b/nvcc-protobuf-fix.patch @@ -0,0 +1,37 @@ +From 878c5c3cdc7513418662d6ff77c61b63a1b2538a Mon Sep 17 00:00:00 2001 +From: Isuru Fernando +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 + using MessageTraits = decltype(MessageTraitsImpl::value); + ++#ifdef __CUDACC__ ++struct EnumTraitsImpl { ++ template ++ static std::enable_if_t 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 + static std::enable_if_t value; + }; ++#endif + template + using EnumTraits = decltype(EnumTraitsImpl::value); +