public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/cachelib] epel10: Workaround for gcc ICE with -Wclass-memaccess, enable ppc64le again, pull in upstream patch
Date: Thu, 08 Oct 2026 08:26:02 GMT [thread overview]
Message-ID: <179144796295.1.11576268904287293887.rpms-cachelib-985f76ba6b98@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/cachelib
Branch : epel10
Commit : 985f76ba6b9851a26bfe2ba2f910bd5d00444ff8
Author : Mamoru TASAKA <mtasaka@fedoraproject.org>
Date : 2022-07-20T10:56:06+09:00
Stats : +59/-2 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/cachelib/c/985f76ba6b9851a26bfe2ba2f910bd5d00444ff8?branch=epel10
Log:
Workaround for gcc ICE with -Wclass-memaccess, enable ppc64le again, pull in upstream patch
---
diff --git a/cachelib-avoid-bind-packed-buffer.patch b/cachelib-avoid-bind-packed-buffer.patch
new file mode 100644
index 0000000..afd3dd4
--- /dev/null
+++ b/cachelib-avoid-bind-packed-buffer.patch
@@ -0,0 +1,39 @@
+From 2114d3fe8b60992e4b98c2e4e07761649aa47d89 Mon Sep 17 00:00:00 2001
+From: Jimmy Lu <beyondsora@fb.com>
+Date: Tue, 28 Jun 2022 15:48:00 -0700
+Subject: [PATCH] DO NOT COMMIT YET - Do not "pack" FixedArraySize elements
+
+Summary:
+DO NOT COMMIT YET.
+Needs to be discussed.
+
+Remove the FOLLY_PACK_ATTR to avoid packing the FixedArraySize elements.
+This avoids the C++ error "cannot bind unpacked field".
+
+C.f. D24538466 (https://github.com/facebook/CacheLib/commit/ab1f75cbdcc1c40a48e0f6eaf76488ce482cbd2a) .
+
+Reviewed By: haowu14
+
+Differential Revision: D35907647
+
+fbshipit-source-id: 7e3ed0a9bc78c1eb1818a2e725361a5c2fceaca1
+---
+ cachelib/datatype/FixedSizeArray.h | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/cachelib/datatype/FixedSizeArray.h b/cachelib/datatype/FixedSizeArray.h
+index 6d6a1fa5b..9155ad60e 100644
+--- a/cachelib/datatype/FixedSizeArray.h
++++ b/cachelib/datatype/FixedSizeArray.h
+@@ -26,8 +26,10 @@ namespace cachelib {
+
+ namespace detail {
+ // @param T must be a POD like type
++// Note that packing is not guaranteed with this data structure. User
++// of FixedSizeArray must ensure their type is packed if they need it.
+ template <typename T>
+-class FOLLY_PACK_ATTR FixedSizeArrayLayout {
++class FixedSizeArrayLayout {
+ public:
+ // Compute the storage required for the number of elements
+ static uint32_t computeStorageSize(uint32_t numElements) {
diff --git a/cachelib-workaround-gcc12-bz2108665.patch b/cachelib-workaround-gcc12-bz2108665.patch
new file mode 100644
index 0000000..7fc45a2
--- /dev/null
+++ b/cachelib-workaround-gcc12-bz2108665.patch
@@ -0,0 +1,11 @@
+--- CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291/cachelib/compact_cache/CCacheFixedLruBucket.h.orig 2022-03-15 02:49:38.000000000 +0900
++++ CacheLib-bd22b0eb79f7e2326f77a22c278c48e454882291/cachelib/compact_cache/CCacheFixedLruBucket.h 2022-07-20 02:03:03.028073719 +0900
+@@ -274,7 +274,7 @@ struct FixedLruBucket {
+ static void copyValue(T* destPtr, const T* srcPtr) {
+ XDCHECK(destPtr != nullptr);
+ XDCHECK(srcPtr != nullptr);
+- memcpy(destPtr, srcPtr, sizeof(T));
++ memcpy(reinterpret_cast<void *>(destPtr), reinterpret_cast<const void *>(srcPtr), sizeof(T));
+ }
+ };
+ } // namespace cachelib
diff --git a/cachelib.spec b/cachelib.spec
index e9cf337..8a1a1ea 100644
--- a/cachelib.spec
+++ b/cachelib.spec
@@ -1,4 +1,4 @@
-%if 0%{?fedora} >= 36
+%if 0%{?fedora} == 36
# Folly is compiled with Clang
%bcond_without toolchain_clang
%else
@@ -34,13 +34,18 @@ License: ASL 2.0
URL: %forgeurl
Source0: %forgesource
Patch0: %{name}-fix_test_linking.patch
+# Workaround for gcc issue:
+# https://bugzilla.redhat.com/show_bug.cgi?id=2108665
+Patch1: %{name}-workaround-gcc12-bz2108665.patch
+# https://github.com/facebook/CacheLib/commit/2114d3fe8b60992e4b98c2e4e07761649aa47d89
+Patch2: %{name}-avoid-bind-packed-buffer.patch
# needed on EL8; its gtest does not come with cmake files
Patch100: %{name}-find-gtest.patch
# Folly is known not to work on big-endian CPUs
# https://bugzilla.redhat.com/show_bug.cgi?id=1892151
ExcludeArch: s390x
-%if 0%{?fedora} >= 36
+%if 0%{?fedora} == 36
# fmt code breaks: https://bugzilla.redhat.com/show_bug.cgi?id=2061022
ExcludeArch: ppc64le
%endif
@@ -98,6 +103,8 @@ applications that use %{name}.
%prep
%forgesetup
%patch0 -p1
+%patch1 -p1
+%patch2 -p1
%if 0%{?el8}
%patch100 -p1
%endif
reply other threads:[~2026-10-08 8:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179144796295.1.11576268904287293887.rpms-cachelib-985f76ba6b98@fedoraproject.org \
--to=mtasaka@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox