From cd77648091a006135a380760dc000cdae7bc2a05 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 18 Jan 2023 21:20:10 +0000 Subject: [PATCH 01/41] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- abseil-cpp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/abseil-cpp.spec b/abseil-cpp.spec index bf79095..8c934b9 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -3,7 +3,7 @@ Name: abseil-cpp Version: 20220623.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: C++ Common Libraries # The entire source is Apache-2.0, except: @@ -99,6 +99,9 @@ Development headers for %{name} %{_libdir}/pkgconfig/*.pc %changelog +* Wed Jan 18 2023 Fedora Release Engineering - 20220623.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Fri Sep 02 2022 Benjamin A. Beasley - 20220623.1-2 - Update to 20220623.1 (close RHBZ#2123181) From 570816731a09e471666a7f64d2cf0901b50c0838 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 18 Jan 2023 21:37:01 -0500 Subject: [PATCH 02/41] Work around static assertion failures in tests with GCC 13 --- abseil-cpp-20220623.1-gcc13.patch | 26 ++++++++++++++++++++++++++ abseil-cpp.spec | 5 +++++ 2 files changed, 31 insertions(+) create mode 100644 abseil-cpp-20220623.1-gcc13.patch diff --git a/abseil-cpp-20220623.1-gcc13.patch b/abseil-cpp-20220623.1-gcc13.patch new file mode 100644 index 0000000..09438b8 --- /dev/null +++ b/abseil-cpp-20220623.1-gcc13.patch @@ -0,0 +1,26 @@ +diff -Naur abseil-cpp-20220623.1-original/absl/memory/memory_test.cc abseil-cpp-20220623.1/absl/memory/memory_test.cc +--- abseil-cpp-20220623.1-original/absl/memory/memory_test.cc 2022-08-31 13:15:21.000000000 -0400 ++++ abseil-cpp-20220623.1/absl/memory/memory_test.cc 2023-01-18 21:30:33.460050217 -0500 +@@ -505,14 +505,14 @@ + }; + + TEST(AllocatorTraits, Rebind) { +- EXPECT_TRUE( +- (std::is_same, +- typename absl::allocator_traits< +- AllocWithRebind>::template rebind_alloc>::value)); +- EXPECT_TRUE( +- (std::is_same>, +- typename absl::allocator_traits< +- AllocWithRebind>::template rebind_traits>::value)); ++ // EXPECT_TRUE( ++ // (std::is_same, ++ // typename absl::allocator_traits< ++ // AllocWithRebind>::template rebind_alloc>::value)); ++ //EXPECT_TRUE( ++ // (std::is_same>, ++ // typename absl::allocator_traits< ++ // AllocWithRebind>::template rebind_traits>::value)); + + EXPECT_TRUE( + (std::is_same, diff --git a/abseil-cpp.spec b/abseil-cpp.spec index 8c934b9..cb5295c 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -28,6 +28,11 @@ Source0: https://github.com/abseil/abseil-cpp/archive/%{version}/%{name}- # # Fixes RHBZ#2108658. Patch: https://github.com/abseil/abseil-cpp/commit/09e96049995584c3489e4bd1467313e3e85af99c.patch +# Comment out two static assertions in the tests that fail with GCC 13. +# Reported upstream: +# Static assertion failures compiling AllocatorTraits.Rebind test (GCC 13) +# https://github.com/abseil/abseil-cpp/issues/1366 +Patch: abseil-cpp-20220623.1-gcc13.patch BuildRequires: cmake # The default make backend would work just as well; ninja is observably faster From 1197352945822c91c948811a4d8f42c084d583e7 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 20 Jan 2023 21:13:23 -0500 Subject: [PATCH 03/41] Revert "Work around static assertion failures in tests with GCC 13" This reverts commit 570816731a09e471666a7f64d2cf0901b50c0838. A fix for the underlying issue will be backported instead. --- abseil-cpp-20220623.1-gcc13.patch | 26 -------------------------- abseil-cpp.spec | 5 ----- 2 files changed, 31 deletions(-) delete mode 100644 abseil-cpp-20220623.1-gcc13.patch diff --git a/abseil-cpp-20220623.1-gcc13.patch b/abseil-cpp-20220623.1-gcc13.patch deleted file mode 100644 index 09438b8..0000000 --- a/abseil-cpp-20220623.1-gcc13.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -Naur abseil-cpp-20220623.1-original/absl/memory/memory_test.cc abseil-cpp-20220623.1/absl/memory/memory_test.cc ---- abseil-cpp-20220623.1-original/absl/memory/memory_test.cc 2022-08-31 13:15:21.000000000 -0400 -+++ abseil-cpp-20220623.1/absl/memory/memory_test.cc 2023-01-18 21:30:33.460050217 -0500 -@@ -505,14 +505,14 @@ - }; - - TEST(AllocatorTraits, Rebind) { -- EXPECT_TRUE( -- (std::is_same, -- typename absl::allocator_traits< -- AllocWithRebind>::template rebind_alloc>::value)); -- EXPECT_TRUE( -- (std::is_same>, -- typename absl::allocator_traits< -- AllocWithRebind>::template rebind_traits>::value)); -+ // EXPECT_TRUE( -+ // (std::is_same, -+ // typename absl::allocator_traits< -+ // AllocWithRebind>::template rebind_alloc>::value)); -+ //EXPECT_TRUE( -+ // (std::is_same>, -+ // typename absl::allocator_traits< -+ // AllocWithRebind>::template rebind_traits>::value)); - - EXPECT_TRUE( - (std::is_same, diff --git a/abseil-cpp.spec b/abseil-cpp.spec index cb5295c..8c934b9 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -28,11 +28,6 @@ Source0: https://github.com/abseil/abseil-cpp/archive/%{version}/%{name}- # # Fixes RHBZ#2108658. Patch: https://github.com/abseil/abseil-cpp/commit/09e96049995584c3489e4bd1467313e3e85af99c.patch -# Comment out two static assertions in the tests that fail with GCC 13. -# Reported upstream: -# Static assertion failures compiling AllocatorTraits.Rebind test (GCC 13) -# https://github.com/abseil/abseil-cpp/issues/1366 -Patch: abseil-cpp-20220623.1-gcc13.patch BuildRequires: cmake # The default make backend would work just as well; ninja is observably faster From 33850f5add8288632cc86fb5c183f9d36ce696b7 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 20 Jan 2023 21:16:35 -0500 Subject: [PATCH 04/41] Backport upstream commit 4eef161 for GCC 13 --- ...cator_traits-and-absl-pointer_traits.patch | 760 ++++++++++++++++++ abseil-cpp.spec | 12 +- 2 files changed, 771 insertions(+), 1 deletion(-) create mode 100644 0001-Update-absl-allocator_traits-and-absl-pointer_traits.patch diff --git a/0001-Update-absl-allocator_traits-and-absl-pointer_traits.patch b/0001-Update-absl-allocator_traits-and-absl-pointer_traits.patch new file mode 100644 index 0000000..17466fd --- /dev/null +++ b/0001-Update-absl-allocator_traits-and-absl-pointer_traits.patch @@ -0,0 +1,760 @@ +From 5c77799d5dfcd9c4736621ad9b5fd5da611e6518 Mon Sep 17 00:00:00 2001 +From: Derek Mauro +Date: Fri, 20 Jan 2023 15:12:54 -0800 +Subject: [PATCH] Update absl::allocator_traits and absl::pointer_traits to + always use std::allocator_traits and std::pointer traits. + +Note that the reason given in the comments for these implementations was +incorrect. Both of these exist in C++11, but not all compilers had +working implementations, so Abseil backfiled them. All supported compilers +now have working implementations. + +https://en.cppreference.com/w/cpp/memory/allocator_traits +https://en.cppreference.com/w/cpp/memory/pointer_traits + +Documentation has been updated to recommend the std:: spellings. + +Fixes #1366 + +PiperOrigin-RevId: 503532746 +Change-Id: Ia437f65a4c752581195dc582a41831b479d096c6 +--- + absl/memory/memory.h | 371 ++----------------------------------- + absl/memory/memory_test.cc | 332 --------------------------------- + 2 files changed, 20 insertions(+), 683 deletions(-) + +diff --git a/absl/memory/memory.h b/absl/memory/memory.h +index d6332606..2b99c190 100644 +--- a/absl/memory/memory.h ++++ b/absl/memory/memory.h +@@ -248,6 +248,26 @@ std::weak_ptr WeakenPtr(const std::shared_ptr& ptr) { + return std::weak_ptr(ptr); + } + ++// ----------------------------------------------------------------------------- ++// Class Template: pointer_traits ++// ----------------------------------------------------------------------------- ++// ++// Historical note: Abseil once provided an implementation of ++// `std::pointer_traits` for platforms that had not yet provided it. Those ++// platforms are no longer supported. New code should simply use ++// `std::pointer_traits`. ++using std::pointer_traits; ++ ++// ----------------------------------------------------------------------------- ++// Class Template: allocator_traits ++// ----------------------------------------------------------------------------- ++// ++// Historical note: Abseil once provided an implementation of ++// `std::allocator_traits` for platforms that had not yet provided it. Those ++// platforms are no longer supported. New code should simply use ++// `std::allocator_traits`. ++using std::allocator_traits; ++ + namespace memory_internal { + + // ExtractOr::type evaluates to E if possible. Otherwise, D. +@@ -265,357 +285,6 @@ struct ExtractOr>> { + template