From 7a492a8f08059819b5720c1a8b410e5c92d73aaf Mon Sep 17 00:00:00 2001 From: Rich Mattes Date: Sat, 19 Dec 2020 11:30:07 -0500 Subject: [PATCH 01/67] Update to release 20200923.2 Rebuild to fix tagging in koji (rhbz#1885561) --- abseil-cpp.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/abseil-cpp.spec b/abseil-cpp.spec index 019de77..493a99e 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -2,8 +2,8 @@ %undefine __cmake_in_source_build Name: abseil-cpp -Version: 20200225.2 -Release: 4%{?dist} +Version: 20200923.2 +Release: 1%{?dist} Summary: C++ Common Libraries License: ASL 2.0 @@ -58,6 +58,10 @@ Development headers for %{name} %{_libdir}/cmake/absl %changelog +* Sat Dec 19 2020 Rich Mattes - 20200923.2-1 +- Update to release 20200923.2 +- Rebuild to fix tagging in koji (rhbz#1885561) + * Fri Jul 31 2020 Fedora Release Engineering - 20200225.2-4 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From a9b87cd299921bf4ad48c21161e5d98c18ade310 Mon Sep 17 00:00:00 2001 From: Rich Mattes Date: Sat, 19 Dec 2020 11:32:51 -0500 Subject: [PATCH 02/67] Add new sources --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index fa909c5..1c8cceb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /abseil-cpp-20200225.2.tar.gz +/abseil-cpp-20200923.2.tar.gz diff --git a/sources b/sources index 3e1be23..cb13e03 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (abseil-cpp-20200225.2.tar.gz) = 75a607dee825e83c10dcd5e509515461f1b12c4aca861e4739ac4d41357b8e893dbfbe33873aa5c05463dde0891dedd7535af2ec59f173de29488e1b1321b335 +SHA512 (abseil-cpp-20200923.2.tar.gz) = fdbb0f84265bc1d4f24aac0af6d0eb8cb603f801fc14d63ac1e9d3bab47703a8a2ff5f44a0a4d325819dbea50fc533d967e1bfd65004ec11ef35fadc44a2b855 From cadfebbdb89aec59afeb52c4cb995d1ab7db0d23 Mon Sep 17 00:00:00 2001 From: Rich Mattes Date: Sat, 19 Dec 2020 11:42:43 -0500 Subject: [PATCH 03/67] Add patch for missing limits header --- abseil-cpp-20200923.2.gcc11.patch | 11 +++++++++++ abseil-cpp.spec | 5 ++++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 abseil-cpp-20200923.2.gcc11.patch diff --git a/abseil-cpp-20200923.2.gcc11.patch b/abseil-cpp-20200923.2.gcc11.patch new file mode 100644 index 0000000..87bec85 --- /dev/null +++ b/abseil-cpp-20200923.2.gcc11.patch @@ -0,0 +1,11 @@ +diff -up ./absl/synchronization/internal/graphcycles.cc.gcc11 ./absl/synchronization/internal/graphcycles.cc +--- ./absl/synchronization/internal/graphcycles.cc.gcc11 2020-12-19 11:39:31.244272590 -0500 ++++ ./absl/synchronization/internal/graphcycles.cc 2020-12-19 11:39:53.069335816 -0500 +@@ -37,6 +37,7 @@ + + #include + #include ++#include + #include "absl/base/internal/hide_ptr.h" + #include "absl/base/internal/raw_logging.h" + #include "absl/base/internal/spinlock.h" diff --git a/abseil-cpp.spec b/abseil-cpp.spec index 493a99e..efb86e6 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -10,6 +10,9 @@ License: ASL 2.0 URL: https://abseil.io Source0: https://github.com/abseil/abseil-cpp/archive/%{version}/%{name}-%{version}.tar.gz +# Explicitly include for std::numeric_limits +Patch0: %{name}-20200923.2.gcc11.patch + BuildRequires: cmake BuildRequires: gcc-c++ @@ -36,7 +39,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release} Development headers for %{name} %prep -%autosetup +%autosetup -p1 %build From 10bff2739f67e6277beb1a2d2cf59d5f12ffc9f6 Mon Sep 17 00:00:00 2001 From: Rich Mattes Date: Sat, 19 Dec 2020 11:45:21 -0500 Subject: [PATCH 04/67] Add comment about new patch --- abseil-cpp.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/abseil-cpp.spec b/abseil-cpp.spec index efb86e6..6b6236d 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -11,6 +11,7 @@ URL: https://abseil.io Source0: https://github.com/abseil/abseil-cpp/archive/%{version}/%{name}-%{version}.tar.gz # Explicitly include for std::numeric_limits +# Already addressed in upstream git. Patch0: %{name}-20200923.2.gcc11.patch BuildRequires: cmake From 892085923377a6aff7c216b08f14445e1c8ceaf0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Mon, 25 Jan 2021 23:44:55 +0000 Subject: [PATCH 05/67] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_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 6b6236d..9c9f34b 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -3,7 +3,7 @@ Name: abseil-cpp Version: 20200923.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: C++ Common Libraries License: ASL 2.0 @@ -62,6 +62,9 @@ Development headers for %{name} %{_libdir}/cmake/absl %changelog +* Mon Jan 25 2021 Fedora Release Engineering - 20200923.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Sat Dec 19 2020 Rich Mattes - 20200923.2-1 - Update to release 20200923.2 - Rebuild to fix tagging in koji (rhbz#1885561) From ea6a6244e254456005caae83a8421ab733343d1c Mon Sep 17 00:00:00 2001 From: Rich Mattes Date: Mon, 8 Mar 2021 20:33:21 -0500 Subject: [PATCH 06/67] Update to release 20200923.3 --- .gitignore | 1 + abseil-cpp-20200923.2.gcc11.patch | 11 ----------- abseil-cpp.spec | 11 +++++------ sources | 2 +- 4 files changed, 7 insertions(+), 18 deletions(-) delete mode 100644 abseil-cpp-20200923.2.gcc11.patch diff --git a/.gitignore b/.gitignore index 1c8cceb..1be5bc6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /abseil-cpp-20200225.2.tar.gz /abseil-cpp-20200923.2.tar.gz +/abseil-cpp-20200923.3.tar.gz diff --git a/abseil-cpp-20200923.2.gcc11.patch b/abseil-cpp-20200923.2.gcc11.patch deleted file mode 100644 index 87bec85..0000000 --- a/abseil-cpp-20200923.2.gcc11.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up ./absl/synchronization/internal/graphcycles.cc.gcc11 ./absl/synchronization/internal/graphcycles.cc ---- ./absl/synchronization/internal/graphcycles.cc.gcc11 2020-12-19 11:39:31.244272590 -0500 -+++ ./absl/synchronization/internal/graphcycles.cc 2020-12-19 11:39:53.069335816 -0500 -@@ -37,6 +37,7 @@ - - #include - #include -+#include - #include "absl/base/internal/hide_ptr.h" - #include "absl/base/internal/raw_logging.h" - #include "absl/base/internal/spinlock.h" diff --git a/abseil-cpp.spec b/abseil-cpp.spec index 9c9f34b..e63dec1 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -2,18 +2,14 @@ %undefine __cmake_in_source_build Name: abseil-cpp -Version: 20200923.2 -Release: 2%{?dist} +Version: 20200923.3 +Release: 1%{?dist} Summary: C++ Common Libraries License: ASL 2.0 URL: https://abseil.io Source0: https://github.com/abseil/abseil-cpp/archive/%{version}/%{name}-%{version}.tar.gz -# Explicitly include for std::numeric_limits -# Already addressed in upstream git. -Patch0: %{name}-20200923.2.gcc11.patch - BuildRequires: cmake BuildRequires: gcc-c++ @@ -62,6 +58,9 @@ Development headers for %{name} %{_libdir}/cmake/absl %changelog +* Mon Mar 08 2021 Rich Mattes - 20200923.3-1 +- Update to release 20200923.3 + * Mon Jan 25 2021 Fedora Release Engineering - 20200923.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index cb13e03..f256312 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (abseil-cpp-20200923.2.tar.gz) = fdbb0f84265bc1d4f24aac0af6d0eb8cb603f801fc14d63ac1e9d3bab47703a8a2ff5f44a0a4d325819dbea50fc533d967e1bfd65004ec11ef35fadc44a2b855 +SHA512 (abseil-cpp-20200923.3.tar.gz) = 7d9e2bc001a397b983afe1e5ca4d779bd27d0d30fad7f44e564a675e228f2fc29c203ef89dd1b0ff4a1832c6d99ae7627c9103a0daa6cccb426472528109ef85 From a8e7f942de8428277162346dccab9e88e1fecea9 Mon Sep 17 00:00:00 2001 From: Rich Mattes Date: Mon, 8 Mar 2021 20:47:17 -0500 Subject: [PATCH 07/67] Add patch to match constant type for std::max --- abseil-cpp-20200923.3-typematch.patch | 12 ++++++++++++ abseil-cpp.spec | 3 +++ 2 files changed, 15 insertions(+) create mode 100644 abseil-cpp-20200923.3-typematch.patch diff --git a/abseil-cpp-20200923.3-typematch.patch b/abseil-cpp-20200923.3-typematch.patch new file mode 100644 index 0000000..c7335c3 --- /dev/null +++ b/abseil-cpp-20200923.3-typematch.patch @@ -0,0 +1,12 @@ +diff -up ./absl/debugging/failure_signal_handler.cc.typematch ./absl/debugging/failure_signal_handler.cc +--- ./absl/debugging/failure_signal_handler.cc.typematch 2021-03-08 20:43:57.158396960 -0500 ++++ ./absl/debugging/failure_signal_handler.cc 2021-03-08 20:44:07.971430229 -0500 +@@ -135,7 +135,7 @@ static bool SetupAlternateStackOnce() { + #else + const size_t page_mask = sysconf(_SC_PAGESIZE) - 1; + #endif +- size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask; ++ size_t stack_size = (std::max(SIGSTKSZ, static_cast(65536)) + page_mask) & ~page_mask; + #if defined(ABSL_HAVE_ADDRESS_SANITIZER) || \ + defined(ABSL_HAVE_MEMORY_SANITIZER) || defined(ABSL_HAVE_THREAD_SANITIZER) + // Account for sanitizer instrumentation requiring additional stack space. diff --git a/abseil-cpp.spec b/abseil-cpp.spec index e63dec1..fc3cd66 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -10,8 +10,11 @@ License: ASL 2.0 URL: https://abseil.io Source0: https://github.com/abseil/abseil-cpp/archive/%{version}/%{name}-%{version}.tar.gz +Patch0: abseil-cpp-20200923.3-typematch.patch + BuildRequires: cmake BuildRequires: gcc-c++ +BuildRequires: make %description Abseil is an open-source collection of C++ library code designed to augment From ac534fb65177c07a7b1529ebdd95372239d194f4 Mon Sep 17 00:00:00 2001 From: Rich Mattes Date: Wed, 9 Jun 2021 20:13:02 -0400 Subject: [PATCH 08/67] Update to release 20210324.2 Enable and run test suite --- .gitignore | 1 + abseil-cpp-20200923.3-typematch.patch | 12 --------- abseil-cpp-20210324-gtest.patch | 26 ++++++++++++++++++++ abseil-cpp.spec | 35 +++++++++++++++++++++------ sources | 2 +- 5 files changed, 56 insertions(+), 20 deletions(-) delete mode 100644 abseil-cpp-20200923.3-typematch.patch create mode 100644 abseil-cpp-20210324-gtest.patch diff --git a/.gitignore b/.gitignore index 1be5bc6..382b9d2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /abseil-cpp-20200225.2.tar.gz /abseil-cpp-20200923.2.tar.gz /abseil-cpp-20200923.3.tar.gz +/abseil-cpp-20210324.2.tar.gz diff --git a/abseil-cpp-20200923.3-typematch.patch b/abseil-cpp-20200923.3-typematch.patch deleted file mode 100644 index c7335c3..0000000 --- a/abseil-cpp-20200923.3-typematch.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up ./absl/debugging/failure_signal_handler.cc.typematch ./absl/debugging/failure_signal_handler.cc ---- ./absl/debugging/failure_signal_handler.cc.typematch 2021-03-08 20:43:57.158396960 -0500 -+++ ./absl/debugging/failure_signal_handler.cc 2021-03-08 20:44:07.971430229 -0500 -@@ -135,7 +135,7 @@ static bool SetupAlternateStackOnce() { - #else - const size_t page_mask = sysconf(_SC_PAGESIZE) - 1; - #endif -- size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask; -+ size_t stack_size = (std::max(SIGSTKSZ, static_cast(65536)) + page_mask) & ~page_mask; - #if defined(ABSL_HAVE_ADDRESS_SANITIZER) || \ - defined(ABSL_HAVE_MEMORY_SANITIZER) || defined(ABSL_HAVE_THREAD_SANITIZER) - // Account for sanitizer instrumentation requiring additional stack space. diff --git a/abseil-cpp-20210324-gtest.patch b/abseil-cpp-20210324-gtest.patch new file mode 100644 index 0000000..a43b5ca --- /dev/null +++ b/abseil-cpp-20210324-gtest.patch @@ -0,0 +1,26 @@ +diff -up ./CMakeLists.txt.2 ./CMakeLists.txt +--- ./CMakeLists.txt.2 2021-04-20 12:55:14.000000000 -0400 ++++ ./CMakeLists.txt 2021-05-21 22:26:12.910191071 -0400 +@@ -127,6 +127,22 @@ if(BUILD_TESTING) + set(absl_gtest_src_dir ${ABSL_LOCAL_GOOGLETEST_DIR}) + endif() + include(CMake/Googletest/DownloadGTest.cmake) ++ else() ++ # Set up gtest targets ++ find_library(GTEST_LIB gtest) ++ add_library(gtest UNKNOWN IMPORTED) ++ set_target_properties(gtest PROPERTIES IMPORTED_LOCATION ${GTEST_LIB}) ++ find_library(GTEST_MAIN_LIB gtest_main) ++ add_library(gtest_main UNKNOWN IMPORTED) ++ set_target_properties(gtest_main PROPERTIES IMPORTED_LOCATION ${GTEST_MAIN_LIB} INTERFACE_LINK_LIBRARIES gtest) ++ ++ # Set up gmock targets ++ find_library(GMOCK_LIB gmock) ++ add_library(gmock UNKNOWN IMPORTED) ++ set_target_properties(gmock PROPERTIES IMPORTED_LOCATION ${GMOCK_LIB} INTERFACE_LINK_LIBRARIES gtest) ++ find_library(GMOCK_MAIN_LIB gmock_main) ++ add_library(gmock_main UNKNOWN IMPORTED) ++ set_target_properties(gmock_main PROPERTIES IMPORTED_LOCATION ${GMOCK_MAIN_LIB} INTERFACE_LINK_LIBRARIES "gmock;Threads::Threads") + endif() + + check_target(gtest) diff --git a/abseil-cpp.spec b/abseil-cpp.spec index fc3cd66..b72e59d 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -1,8 +1,11 @@ # Force out of source build %undefine __cmake_in_source_build +# Installed library version +%global lib_version 2103.0.1 + Name: abseil-cpp -Version: 20200923.3 +Version: 20210324.2 Release: 1%{?dist} Summary: C++ Common Libraries @@ -10,10 +13,16 @@ License: ASL 2.0 URL: https://abseil.io Source0: https://github.com/abseil/abseil-cpp/archive/%{version}/%{name}-%{version}.tar.gz -Patch0: abseil-cpp-20200923.3-typematch.patch +# Set up system gtest and gmock targets to allow test suite to be built. +# abseil-cpp expects the targets to be created by a bundled copy of gtest/gmock. +# This patch replicates those targets via find_library and imported targets. +# Not submitted upstream. +Patch1: abseil-cpp-20210324-gtest.patch BuildRequires: cmake BuildRequires: gcc-c++ +BuildRequires: gmock-devel +BuildRequires: gtest-devel BuildRequires: make %description @@ -39,28 +48,40 @@ Requires: %{name}%{?_isa} = %{version}-%{release} Development headers for %{name} %prep -%autosetup -p1 - +%autosetup -p1 -S gendiff +sed -i 's|GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST|//|' absl/container/internal/unordered_map_modifiers_test.h %build -%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo +%cmake \ + -DABSL_USE_EXTERNAL_GOOGLETEST:BOOL=ON \ + -DBUILD_TESTING:BOOL=ON \ + -DCMAKE_BUILD_TYPE:STRING=None \ + -DCMAKE_CXX_STANDARD:STRING=17 %cmake_build %install %cmake_install +%check +%ctest --output-on-failure %files %license LICENSE -%doc FAQ.md LTS.md README.md UPGRADES.md -%{_libdir}/libabsl_*.so +%doc FAQ.md README.md UPGRADES.md +%{_libdir}/libabsl_*.so.%{lib_version} %files devel %{_includedir}/absl +%{_libdir}/libabsl_*.so %{_libdir}/cmake/absl +%{_libdir}/pkgconfig/*.pc %changelog +* Fri May 21 2021 Rich Mattes - 20210324.1-2 +- Update to release 20210324.2 +- Enable and run test suite + * Mon Mar 08 2021 Rich Mattes - 20200923.3-1 - Update to release 20200923.3 diff --git a/sources b/sources index f256312..447714c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (abseil-cpp-20200923.3.tar.gz) = 7d9e2bc001a397b983afe1e5ca4d779bd27d0d30fad7f44e564a675e228f2fc29c203ef89dd1b0ff4a1832c6d99ae7627c9103a0daa6cccb426472528109ef85 +SHA512 (abseil-cpp-20210324.2.tar.gz) = 7b935f0f2787a81438f30072f2191138ce3c099e4b22addfbe8ebe579d906604bc6ab03f054d3d6917a08ef5cb7a4371c1a501a7dfbc15c50301261dbf5f6e27 From f7adba5be7317ff030efb2b98a8c8c729e9ac632 Mon Sep 17 00:00:00 2001 From: Rich Mattes Date: Wed, 9 Jun 2021 22:00:43 -0400 Subject: [PATCH 09/67] Updates for test suite failures. Add a patch to resolve a test failure on ARMv7. Disable tests on s390x for now, several are failing for unknown reasons. --- abseil-cpp-20210324.2-armv7.patch | 12 ++++++++++++ abseil-cpp.spec | 12 ++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 abseil-cpp-20210324.2-armv7.patch diff --git a/abseil-cpp-20210324.2-armv7.patch b/abseil-cpp-20210324.2-armv7.patch new file mode 100644 index 0000000..cf33cb3 --- /dev/null +++ b/abseil-cpp-20210324.2-armv7.patch @@ -0,0 +1,12 @@ +diff -up ./absl/base/internal/sysinfo_test.cc.armv7 ./absl/base/internal/sysinfo_test.cc +--- ./absl/base/internal/sysinfo_test.cc.armv7 2021-06-09 21:54:44.503755718 -0400 ++++ ./absl/base/internal/sysinfo_test.cc 2021-06-09 21:55:53.703375569 -0400 +@@ -49,7 +49,7 @@ TEST(SysinfoTest, NominalCPUFrequency) { + // Emscripten doesn't expose it at all. + #if defined(__linux__) && \ + (defined(__aarch64__) || defined(__hppa__) || defined(__mips__) || \ +- defined(__riscv) || defined(__s390x__)) || \ ++ defined(__riscv) || defined(__s390x__)) || defined(__arm__) || \ + defined(__EMSCRIPTEN__) + EXPECT_EQ(NominalCPUFrequency(), 1.0) + << "CPU frequency detection was fixed! Please update unittest."; diff --git a/abseil-cpp.spec b/abseil-cpp.spec index b72e59d..26a2561 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -19,6 +19,11 @@ Source0: https://github.com/abseil/abseil-cpp/archive/%{version}/%{name}- # Not submitted upstream. Patch1: abseil-cpp-20210324-gtest.patch +# Disable CPU frequency detection on armv7hl architectures. +# Makes test consistent with aarch64 CPUs. +# Not submitted upstream. +Patch2: abseil-cpp-20210324.2-armv7.patch + BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: gmock-devel @@ -49,6 +54,7 @@ Development headers for %{name} %prep %autosetup -p1 -S gendiff +# Remove macro only defined in googletest git master sed -i 's|GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST|//|' absl/container/internal/unordered_map_modifiers_test.h %build @@ -64,7 +70,13 @@ sed -i 's|GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST|//|' absl/container/inte %cmake_install %check +# s390x does not seem to be supported, several tests fail. +# Make tests informational until failures are resolved. +%ifarch s390x +%ctest --output-on-failure || : +%else %ctest --output-on-failure +%endif %files %license LICENSE From fc8d5d4a31a4d042e12b57da533f09866ab1d599 Mon Sep 17 00:00:00 2001 From: Rich Mattes Date: Thu, 10 Jun 2021 18:34:49 -0400 Subject: [PATCH 10/67] Disable cpu speed test on arm platforms --- abseil-cpp-20210324.2-armv7.patch | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/abseil-cpp-20210324.2-armv7.patch b/abseil-cpp-20210324.2-armv7.patch index cf33cb3..9a5eaec 100644 --- a/abseil-cpp-20210324.2-armv7.patch +++ b/abseil-cpp-20210324.2-armv7.patch @@ -1,12 +1,19 @@ diff -up ./absl/base/internal/sysinfo_test.cc.armv7 ./absl/base/internal/sysinfo_test.cc --- ./absl/base/internal/sysinfo_test.cc.armv7 2021-06-09 21:54:44.503755718 -0400 -+++ ./absl/base/internal/sysinfo_test.cc 2021-06-09 21:55:53.703375569 -0400 -@@ -49,7 +49,7 @@ TEST(SysinfoTest, NominalCPUFrequency) { ++++ ./absl/base/internal/sysinfo_test.cc 2021-06-09 22:56:14.459611843 -0400 +@@ -43,13 +43,13 @@ TEST(SysinfoTest, NumCPUs) { + // POWER is particularly problematic here; some Linux kernels expose the CPU + // frequency, while others do not. Since we can't predict a priori what a given + // machine is going to do, just disable this test on POWER on Linux. +-#if !(defined(__linux) && (defined(__ppc64__) || defined(__PPC64__))) ++#if !(defined(__linux) && (defined(__ppc64__) || defined(__PPC64__) || defined(__aarch64__) || defined(__arm__))) + TEST(SysinfoTest, NominalCPUFrequency) { + // Linux only exposes the CPU frequency on certain architectures, and // Emscripten doesn't expose it at all. #if defined(__linux__) && \ (defined(__aarch64__) || defined(__hppa__) || defined(__mips__) || \ - defined(__riscv) || defined(__s390x__)) || \ -+ defined(__riscv) || defined(__s390x__)) || defined(__arm__) || \ ++ defined(__riscv) || defined(__s390x__)) || \ defined(__EMSCRIPTEN__) EXPECT_EQ(NominalCPUFrequency(), 1.0) << "CPU frequency detection was fixed! Please update unittest."; From 8182f01c1539d64c2f1b9ce07d074b89d42a6b5d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 21 Jul 2021 12:16:54 +0000 Subject: [PATCH 11/67] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering From a5c962e1e2874d7a03e37f05bb813243e31a879c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 21 Jul 2021 17:12:01 +0000 Subject: [PATCH 12/67] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_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 26a2561..8845f37 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -6,7 +6,7 @@ Name: abseil-cpp Version: 20210324.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: C++ Common Libraries License: ASL 2.0 @@ -90,6 +90,9 @@ sed -i 's|GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST|//|' absl/container/inte %{_libdir}/pkgconfig/*.pc %changelog +* Wed Jul 21 2021 Fedora Release Engineering - 20210324.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Fri May 21 2021 Rich Mattes - 20210324.1-2 - Update to release 20210324.2 - Enable and run test suite From 5633c821bd08393b8ba2a08a9aad88ecdedc2d46 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jan 2022 20:51:58 +0000 Subject: [PATCH 13/67] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_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 8845f37..9efc812 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -6,7 +6,7 @@ Name: abseil-cpp Version: 20210324.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: C++ Common Libraries License: ASL 2.0 @@ -90,6 +90,9 @@ sed -i 's|GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST|//|' absl/container/inte %{_libdir}/pkgconfig/*.pc %changelog +* Wed Jan 19 2022 Fedora Release Engineering - 20210324.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Wed Jul 21 2021 Fedora Release Engineering - 20210324.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 95b392305aa264295cecdaf134b65d7377c7ca22 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 15 Feb 2022 08:12:15 -0500 Subject: [PATCH 14/67] Fix test failure (fix RHBZ#2045186) --- abseil-cpp.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/abseil-cpp.spec b/abseil-cpp.spec index 9efc812..fb8b75c 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -6,7 +6,7 @@ Name: abseil-cpp Version: 20210324.2 -Release: 3%{?dist} +Release: 4%{?dist} Summary: C++ Common Libraries License: ASL 2.0 @@ -54,8 +54,6 @@ Development headers for %{name} %prep %autosetup -p1 -S gendiff -# Remove macro only defined in googletest git master -sed -i 's|GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST|//|' absl/container/internal/unordered_map_modifiers_test.h %build %cmake \ @@ -90,6 +88,9 @@ sed -i 's|GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST|//|' absl/container/inte %{_libdir}/pkgconfig/*.pc %changelog +* Mon Jan 31 2022 Benjamin A. Beasley - 20210324.2-4 +- Fix test failure (fix RHBZ#2045186) + * Wed Jan 19 2022 Fedora Release Engineering - 20210324.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From d70989cf7d5f395405e2172a3a8591af212d9ec0 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 17 Dec 2021 08:52:02 -0500 Subject: [PATCH 15/67] Update to 20211102.0 (close RHBZ#2019691) --- .gitignore | 1 + abseil-cpp-20210324-gtest.patch | 26 ---- ...20211102.0-gtest-unreleased-features.patch | 111 ++++++++++++++++++ abseil-cpp.spec | 37 ++++-- sources | 2 +- 5 files changed, 137 insertions(+), 40 deletions(-) delete mode 100644 abseil-cpp-20210324-gtest.patch create mode 100644 abseil-cpp-20211102.0-gtest-unreleased-features.patch diff --git a/.gitignore b/.gitignore index 382b9d2..dd28df9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /abseil-cpp-20200923.2.tar.gz /abseil-cpp-20200923.3.tar.gz /abseil-cpp-20210324.2.tar.gz +/abseil-cpp-20211102.0.tar.gz diff --git a/abseil-cpp-20210324-gtest.patch b/abseil-cpp-20210324-gtest.patch deleted file mode 100644 index a43b5ca..0000000 --- a/abseil-cpp-20210324-gtest.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -up ./CMakeLists.txt.2 ./CMakeLists.txt ---- ./CMakeLists.txt.2 2021-04-20 12:55:14.000000000 -0400 -+++ ./CMakeLists.txt 2021-05-21 22:26:12.910191071 -0400 -@@ -127,6 +127,22 @@ if(BUILD_TESTING) - set(absl_gtest_src_dir ${ABSL_LOCAL_GOOGLETEST_DIR}) - endif() - include(CMake/Googletest/DownloadGTest.cmake) -+ else() -+ # Set up gtest targets -+ find_library(GTEST_LIB gtest) -+ add_library(gtest UNKNOWN IMPORTED) -+ set_target_properties(gtest PROPERTIES IMPORTED_LOCATION ${GTEST_LIB}) -+ find_library(GTEST_MAIN_LIB gtest_main) -+ add_library(gtest_main UNKNOWN IMPORTED) -+ set_target_properties(gtest_main PROPERTIES IMPORTED_LOCATION ${GTEST_MAIN_LIB} INTERFACE_LINK_LIBRARIES gtest) -+ -+ # Set up gmock targets -+ find_library(GMOCK_LIB gmock) -+ add_library(gmock UNKNOWN IMPORTED) -+ set_target_properties(gmock PROPERTIES IMPORTED_LOCATION ${GMOCK_LIB} INTERFACE_LINK_LIBRARIES gtest) -+ find_library(GMOCK_MAIN_LIB gmock_main) -+ add_library(gmock_main UNKNOWN IMPORTED) -+ set_target_properties(gmock_main PROPERTIES IMPORTED_LOCATION ${GMOCK_MAIN_LIB} INTERFACE_LINK_LIBRARIES "gmock;Threads::Threads") - endif() - - check_target(gtest) diff --git a/abseil-cpp-20211102.0-gtest-unreleased-features.patch b/abseil-cpp-20211102.0-gtest-unreleased-features.patch new file mode 100644 index 0000000..a77bcc0 --- /dev/null +++ b/abseil-cpp-20211102.0-gtest-unreleased-features.patch @@ -0,0 +1,111 @@ +diff -Naur abseil-cpp-20211102.0-original/absl/strings/internal/cord_rep_btree_test.cc abseil-cpp-20211102.0/absl/strings/internal/cord_rep_btree_test.cc +--- abseil-cpp-20211102.0-original/absl/strings/internal/cord_rep_btree_test.cc 2021-11-03 11:26:14.000000000 -0400 ++++ abseil-cpp-20211102.0/absl/strings/internal/cord_rep_btree_test.cc 2021-12-17 08:44:54.254485697 -0500 +@@ -59,7 +59,6 @@ + using ::testing::_; + using ::testing::AllOf; + using ::testing::AnyOf; +-using ::testing::Conditional; + using ::testing::ElementsAre; + using ::testing::ElementsAreArray; + using ::testing::Eq; +@@ -381,7 +380,6 @@ + flats.push_back(MakeHexFlat(i)); + auto* result = CordRepBtree::Append(leaf, flats.back()); + EXPECT_THAT(result->height(), Eq(0)); +- EXPECT_THAT(result, Conditional(shared(), Ne(leaf), Eq(leaf))); + EXPECT_THAT(result->Edges(), ElementsAreArray(flats)); + leaf = result; + } +@@ -399,7 +397,6 @@ + flats.push_front(MakeHexFlat(i)); + auto* result = CordRepBtree::Prepend(leaf, flats.front()); + EXPECT_THAT(result->height(), Eq(0)); +- EXPECT_THAT(result, Conditional(shared(), Ne(leaf), Eq(leaf))); + EXPECT_THAT(result->Edges(), ElementsAreArray(flats)); + leaf = result; + } +@@ -426,7 +423,6 @@ + result = CordRepBtree::Append(leaf, flats.back()); + } + EXPECT_THAT(result->height(), Eq(0)); +- EXPECT_THAT(result, Conditional(shared(), Ne(leaf), Eq(leaf))); + EXPECT_THAT(result->Edges(), ElementsAreArray(flats)); + leaf = result; + } +@@ -483,7 +479,6 @@ + flats.push_back(MakeHexFlat(i)); + CordRepBtree* result = CordRepBtree::Append(tree, flats.back()); + ASSERT_THAT(result, IsNode(1)); +- ASSERT_THAT(result, Conditional(shared(), Ne(tree), Eq(tree))); + std::vector edges = GetLeafEdges(result); + ASSERT_THAT(edges, ElementsAreArray(flats)); + tree = result; +@@ -514,7 +509,6 @@ + flats.push_back(MakeHexFlat(i)); + CordRepBtree* result = CordRepBtree::Append(tree, flats.back()); + ASSERT_THAT(result, IsNode(2)); +- ASSERT_THAT(result, Conditional(shared(), Ne(tree), Eq(tree))); + std::vector edges = GetLeafEdges(result); + ASSERT_THAT(edges, ElementsAreArray(flats)); + tree = result; +@@ -544,7 +538,6 @@ + flats.push_front(MakeHexFlat(i)); + CordRepBtree* result = CordRepBtree::Prepend(tree, flats.front()); + ASSERT_THAT(result, IsNode(1)); +- ASSERT_THAT(result, Conditional(shared(), Ne(tree), Eq(tree))); + std::vector edges = GetLeafEdges(result); + ASSERT_THAT(edges, ElementsAreArray(flats)); + tree = result; +@@ -575,7 +568,6 @@ + flats.push_front(MakeHexFlat(i)); + CordRepBtree* result = CordRepBtree::Prepend(tree, flats.front()); + ASSERT_THAT(result, IsNode(2)); +- ASSERT_THAT(result, Conditional(shared(), Ne(tree), Eq(tree))); + std::vector edges = GetLeafEdges(result); + ASSERT_THAT(edges, ElementsAreArray(flats)); + tree = result; +@@ -889,7 +881,6 @@ + for (size_t i = 1; i < n; ++i) { + refs.RefIf(shared(), leaf); + CordRepBtree* result = BtreeAdd(leaf, append, consumer.Next(3)); +- EXPECT_THAT(result, Conditional(shared(), Ne(leaf), Eq(leaf))); + EXPECT_THAT(CordToString(result), Eq(consumer.Consumed())); + leaf = result; + } +@@ -905,9 +896,6 @@ + CordRepBtree* leaf0 = tree->Edges()[0]->btree(); + CordRepBtree* leaf1 = tree->Edges()[1]->btree(); + CordRepBtree* result = CordRepBtree::Append(tree, "123456789"); +- EXPECT_THAT(result, Conditional(shared(), Ne(tree), Eq(tree))); +- EXPECT_THAT(result->Edges(), +- ElementsAre(leaf0, Conditional(shared(), Ne(leaf1), Eq(leaf1)))); + EXPECT_THAT(CordToString(result), Eq(data + "123456789")); + CordRep::Unref(result); + } +@@ -920,9 +908,6 @@ + CordRepBtree* leaf0 = tree->Edges()[0]->btree(); + CordRepBtree* leaf1 = tree->Edges()[1]->btree(); + CordRepBtree* result = CordRepBtree::Prepend(tree, "123456789"); +- EXPECT_THAT(result, Conditional(shared(), Ne(tree), Eq(tree))); +- EXPECT_THAT(result->Edges(), +- ElementsAre(Conditional(shared(), Ne(leaf0), Eq(leaf0)), leaf1)); + EXPECT_THAT(CordToString(result), Eq("123456789" + data)); + CordRep::Unref(result); + } +@@ -954,7 +939,6 @@ + for (size_t i = max_cap + 1; i < max_cap * max_cap; ++i) { + refs.RefIf(shared(), tree); + result = BtreeAdd(tree, append, consumer.Next(3)); +- ASSERT_THAT(result, Conditional(shared(), Ne(tree), Eq(tree))); + ASSERT_THAT(CordToString(result), Eq(consumer.Consumed())); + tree = result; + } +@@ -970,7 +954,6 @@ + ++i) { + refs.RefIf(shared(), tree); + result = BtreeAdd(tree, append, consumer.Next(3)); +- ASSERT_THAT(result, Conditional(shared(), Ne(tree), Eq(tree))); + ASSERT_THAT(CordToString(result), Eq(consumer.Consumed())); + tree = result; + } diff --git a/abseil-cpp.spec b/abseil-cpp.spec index fb8b75c..042e054 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -1,28 +1,23 @@ -# Force out of source build -%undefine __cmake_in_source_build - # Installed library version -%global lib_version 2103.0.1 +%global lib_version 2111.0.0 Name: abseil-cpp -Version: 20210324.2 -Release: 4%{?dist} +Version: 20211102.0 +Release: 1%{?dist} Summary: C++ Common Libraries License: ASL 2.0 URL: https://abseil.io Source0: https://github.com/abseil/abseil-cpp/archive/%{version}/%{name}-%{version}.tar.gz -# Set up system gtest and gmock targets to allow test suite to be built. -# abseil-cpp expects the targets to be created by a bundled copy of gtest/gmock. -# This patch replicates those targets via find_library and imported targets. -# Not submitted upstream. -Patch1: abseil-cpp-20210324-gtest.patch - # Disable CPU frequency detection on armv7hl architectures. # Makes test consistent with aarch64 CPUs. # Not submitted upstream. -Patch2: abseil-cpp-20210324.2-armv7.patch +Patch0: abseil-cpp-20210324.2-armv7.patch +# Remove test assertions that use ::testing::Conditional, which is not in a +# released version of GTest. Not submitted upstream, as this is a workaround +# rather than a fix. https://github.com/abseil/abseil-cpp/issues/1063 +Patch1: abseil-cpp-20211102.0-gtest-unreleased-features.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -55,9 +50,22 @@ Development headers for %{name} %prep %autosetup -p1 -S gendiff +# Replace GTEST_FLAG_GET, which is not in a released version of GTest, with an +# appropriate default value. Not submitted upstream, as this is a workaround +# rather than a fix. https://github.com/abseil/abseil-cpp/issues/1063 +# +# The find-then-sed pattern means we only discard mtimes on files that actually +# needed to be modified. +find . -type f -name '*.cc' \ + -exec gawk '/GTEST_FLAG_GET/ { print FILENAME ; nextfile }' '{}' '+' | + xargs -r -t sed -r -i 's/GTEST_FLAG_GET/::testing::GTEST_FLAG/g' + + %build %cmake \ -DABSL_USE_EXTERNAL_GOOGLETEST:BOOL=ON \ + -DABSL_FIND_GOOGLETEST:BOOL=ON \ + -DABSL_ENABLE_INSTALL:BOOL=ON \ -DBUILD_TESTING:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=None \ -DCMAKE_CXX_STANDARD:STRING=17 @@ -88,6 +96,9 @@ Development headers for %{name} %{_libdir}/pkgconfig/*.pc %changelog +* Fri Feb 18 2022 Benjamin A. Beasley - 20211102.0-1 +- Update to 20211102.0 (close RHBZ#2019691) + * Mon Jan 31 2022 Benjamin A. Beasley - 20210324.2-4 - Fix test failure (fix RHBZ#2045186) diff --git a/sources b/sources index 447714c..35a1237 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (abseil-cpp-20210324.2.tar.gz) = 7b935f0f2787a81438f30072f2191138ce3c099e4b22addfbe8ebe579d906604bc6ab03f054d3d6917a08ef5cb7a4371c1a501a7dfbc15c50301261dbf5f6e27 +SHA512 (abseil-cpp-20211102.0.tar.gz) = fed68aa434c02ec6faa9d1c81f1ad35b60ec024b44957e2e0ac31e6075e385c06a3e1b616afeb4bb7c2413191fd7827d82e1f9f0796b52ed21fb2c41dd9031cf From 804bd00e2c5c720e4d780d7db3d1ae221751b628 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 16 Feb 2022 09:26:03 -0500 Subject: [PATCH 16/67] Drop --output-on-failure, already in %%ctest expansion --- abseil-cpp.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/abseil-cpp.spec b/abseil-cpp.spec index 042e054..868f894 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -79,9 +79,9 @@ find . -type f -name '*.cc' \ # s390x does not seem to be supported, several tests fail. # Make tests informational until failures are resolved. %ifarch s390x -%ctest --output-on-failure || : +%ctest || : %else -%ctest --output-on-failure +%ctest %endif %files @@ -98,6 +98,7 @@ find . -type f -name '*.cc' \ %changelog * Fri Feb 18 2022 Benjamin A. Beasley - 20211102.0-1 - Update to 20211102.0 (close RHBZ#2019691) +- Drop --output-on-failure, already in %%ctest expansion * Mon Jan 31 2022 Benjamin A. Beasley - 20210324.2-4 - Fix test failure (fix RHBZ#2045186) From 20f616750e165a73c1de449254d75337c03c8aff Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 18 Feb 2022 09:11:29 -0500 Subject: [PATCH 17/67] On s390x, instead of ignoring all tests, skip only the single failing test --- abseil-cpp.spec | 51 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 6 deletions(-) diff --git a/abseil-cpp.spec b/abseil-cpp.spec index 868f894..1c4c1da 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -60,6 +60,50 @@ find . -type f -name '*.cc' \ -exec gawk '/GTEST_FLAG_GET/ { print FILENAME ; nextfile }' '{}' '+' | xargs -r -t sed -r -i 's/GTEST_FLAG_GET/::testing::GTEST_FLAG/g' +# It’s extremely difficult to pass gtest options through to the test +# executables from ctest. We could probably skip an entire executable (e.g. +# absl_symbolize_test) by symlinking it to /bin/true, but the easiest way to +# skip a *single test* is to patch the test source. + +%ifarch s390x +# TODO: why does this test fail? +# +# 48/167 Test #49: absl_symbolize_test ................................***Failed 0.02 sec +# TestWithReturnAddress passed +# [==========] Running 7 tests from 1 test suite. +# [----------] Global test environment set-up. +# [----------] 7 tests from Symbolize +# [ RUN ] Symbolize.Cached +# [ OK ] Symbolize.Cached (0 ms) +# [ RUN ] Symbolize.Truncation +# [ OK ] Symbolize.Truncation (0 ms) +# [ RUN ] Symbolize.SymbolizeWithDemangling +# [ OK ] Symbolize.SymbolizeWithDemangling (0 ms) +# [ RUN ] Symbolize.SymbolizeSplitTextSections +# [ OK ] Symbolize.SymbolizeSplitTextSections (0 ms) +# [ RUN ] Symbolize.SymbolizeWithMultipleMaps +# /builddir/build/BUILD/abseil-cpp-20210324.2/absl/debugging/symbolize_test.cc:315: Failure +# Expected equality of these values: +# "kPadding1" +# buf +# Which is: "" +# /builddir/build/BUILD/abseil-cpp-20210324.2/absl/debugging/symbolize_test.cc:349: Failure +# Expected equality of these values: +# expected[i] +# Which is: "kPadding1" +# buf +# Which is: "" +# /builddir/build/BUILD/abseil-cpp-20210324.2/absl/debugging/symbolize_test.cc:349: Failure +# Expected equality of these values: +# expected[i] +# Which is: "kPadding1" +# buf +# Which is: "" +# [ FAILED ] Symbolize.SymbolizeWithMultipleMaps (1 ms) +sed -r -i 's/\bSymbolizeWithMultipleMaps\b/DISABLED_&/' \ + absl/debugging/symbolize_test.cc +%endif + %build %cmake \ @@ -76,13 +120,7 @@ find . -type f -name '*.cc' \ %cmake_install %check -# s390x does not seem to be supported, several tests fail. -# Make tests informational until failures are resolved. -%ifarch s390x -%ctest || : -%else %ctest -%endif %files %license LICENSE @@ -99,6 +137,7 @@ find . -type f -name '*.cc' \ * Fri Feb 18 2022 Benjamin A. Beasley - 20211102.0-1 - Update to 20211102.0 (close RHBZ#2019691) - Drop --output-on-failure, already in %%ctest expansion +- On s390x, instead of ignoring all tests, skip only the single failing test * Mon Jan 31 2022 Benjamin A. Beasley - 20210324.2-4 - Fix test failure (fix RHBZ#2045186) From 90ddd348dd97b35bae3fb1d81a574611580891cc Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 18 Feb 2022 15:25:18 -0500 Subject: [PATCH 18/67] Use ninja backend for CMake: speeds up build with no downsides --- abseil-cpp.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/abseil-cpp.spec b/abseil-cpp.spec index 1c4c1da..7d61aae 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -20,10 +20,12 @@ Patch0: abseil-cpp-20210324.2-armv7.patch Patch1: abseil-cpp-20211102.0-gtest-unreleased-features.patch BuildRequires: cmake +# The default make backend would work just as well; ninja is observably faster +BuildRequires: ninja-build BuildRequires: gcc-c++ + BuildRequires: gmock-devel BuildRequires: gtest-devel -BuildRequires: make %description Abseil is an open-source collection of C++ library code designed to augment @@ -107,6 +109,7 @@ sed -r -i 's/\bSymbolizeWithMultipleMaps\b/DISABLED_&/' \ %build %cmake \ + -GNinja \ -DABSL_USE_EXTERNAL_GOOGLETEST:BOOL=ON \ -DABSL_FIND_GOOGLETEST:BOOL=ON \ -DABSL_ENABLE_INSTALL:BOOL=ON \ @@ -138,6 +141,7 @@ sed -r -i 's/\bSymbolizeWithMultipleMaps\b/DISABLED_&/' \ - Update to 20211102.0 (close RHBZ#2019691) - Drop --output-on-failure, already in %%ctest expansion - On s390x, instead of ignoring all tests, skip only the single failing test +- Use ninja backend for CMake: speeds up build with no downsides * Mon Jan 31 2022 Benjamin A. Beasley - 20210324.2-4 - Fix test failure (fix RHBZ#2045186) From c43daf75e50307a61f4a64f7d44b9e5ddff8a0d4 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sun, 27 Feb 2022 13:48:55 -0500 Subject: [PATCH 19/67] Drop patch for armv7hl --- abseil-cpp-20210324.2-armv7.patch | 19 ------------------- abseil-cpp.spec | 7 ++----- 2 files changed, 2 insertions(+), 24 deletions(-) delete mode 100644 abseil-cpp-20210324.2-armv7.patch diff --git a/abseil-cpp-20210324.2-armv7.patch b/abseil-cpp-20210324.2-armv7.patch deleted file mode 100644 index 9a5eaec..0000000 --- a/abseil-cpp-20210324.2-armv7.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -up ./absl/base/internal/sysinfo_test.cc.armv7 ./absl/base/internal/sysinfo_test.cc ---- ./absl/base/internal/sysinfo_test.cc.armv7 2021-06-09 21:54:44.503755718 -0400 -+++ ./absl/base/internal/sysinfo_test.cc 2021-06-09 22:56:14.459611843 -0400 -@@ -43,13 +43,13 @@ TEST(SysinfoTest, NumCPUs) { - // POWER is particularly problematic here; some Linux kernels expose the CPU - // frequency, while others do not. Since we can't predict a priori what a given - // machine is going to do, just disable this test on POWER on Linux. --#if !(defined(__linux) && (defined(__ppc64__) || defined(__PPC64__))) -+#if !(defined(__linux) && (defined(__ppc64__) || defined(__PPC64__) || defined(__aarch64__) || defined(__arm__))) - TEST(SysinfoTest, NominalCPUFrequency) { - // Linux only exposes the CPU frequency on certain architectures, and - // Emscripten doesn't expose it at all. - #if defined(__linux__) && \ - (defined(__aarch64__) || defined(__hppa__) || defined(__mips__) || \ -- defined(__riscv) || defined(__s390x__)) || \ -+ defined(__riscv) || defined(__s390x__)) || \ - defined(__EMSCRIPTEN__) - EXPECT_EQ(NominalCPUFrequency(), 1.0) - << "CPU frequency detection was fixed! Please update unittest."; diff --git a/abseil-cpp.spec b/abseil-cpp.spec index 7d61aae..3569a65 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -10,14 +10,10 @@ License: ASL 2.0 URL: https://abseil.io Source0: https://github.com/abseil/abseil-cpp/archive/%{version}/%{name}-%{version}.tar.gz -# Disable CPU frequency detection on armv7hl architectures. -# Makes test consistent with aarch64 CPUs. -# Not submitted upstream. -Patch0: abseil-cpp-20210324.2-armv7.patch # Remove test assertions that use ::testing::Conditional, which is not in a # released version of GTest. Not submitted upstream, as this is a workaround # rather than a fix. https://github.com/abseil/abseil-cpp/issues/1063 -Patch1: abseil-cpp-20211102.0-gtest-unreleased-features.patch +Patch0: abseil-cpp-20211102.0-gtest-unreleased-features.patch BuildRequires: cmake # The default make backend would work just as well; ninja is observably faster @@ -142,6 +138,7 @@ sed -r -i 's/\bSymbolizeWithMultipleMaps\b/DISABLED_&/' \ - Drop --output-on-failure, already in %%ctest expansion - On s390x, instead of ignoring all tests, skip only the single failing test - Use ninja backend for CMake: speeds up build with no downsides +- Drop patch for armv7hl * Mon Jan 31 2022 Benjamin A. Beasley - 20210324.2-4 - Fix test failure (fix RHBZ#2045186) From 0da16bcfd8f570d5a2d7f46f6cf3017f0cb63648 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 15 Mar 2022 12:32:22 -0400 Subject: [PATCH 20/67] Disable LTO on s390x to work around test failure Symbolize.SymbolizeWithMultipleMaps fails in absl_symbolize_test on s390x with LTO https://github.com/abseil/abseil-cpp/issues/1133 --- abseil-cpp.spec | 56 ++++++++++--------------------------------------- 1 file changed, 11 insertions(+), 45 deletions(-) diff --git a/abseil-cpp.spec b/abseil-cpp.spec index 3569a65..d1a563a 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -3,7 +3,7 @@ Name: abseil-cpp Version: 20211102.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: C++ Common Libraries License: ASL 2.0 @@ -23,6 +23,13 @@ BuildRequires: gcc-c++ BuildRequires: gmock-devel BuildRequires: gtest-devel +%ifarch s390x +# Symbolize.SymbolizeWithMultipleMaps fails in absl_symbolize_test on s390x +# with LTO +# https://github.com/abseil/abseil-cpp/issues/1133 +%global _lto_cflags %{nil} +%endif + %description Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from @@ -58,50 +65,6 @@ find . -type f -name '*.cc' \ -exec gawk '/GTEST_FLAG_GET/ { print FILENAME ; nextfile }' '{}' '+' | xargs -r -t sed -r -i 's/GTEST_FLAG_GET/::testing::GTEST_FLAG/g' -# It’s extremely difficult to pass gtest options through to the test -# executables from ctest. We could probably skip an entire executable (e.g. -# absl_symbolize_test) by symlinking it to /bin/true, but the easiest way to -# skip a *single test* is to patch the test source. - -%ifarch s390x -# TODO: why does this test fail? -# -# 48/167 Test #49: absl_symbolize_test ................................***Failed 0.02 sec -# TestWithReturnAddress passed -# [==========] Running 7 tests from 1 test suite. -# [----------] Global test environment set-up. -# [----------] 7 tests from Symbolize -# [ RUN ] Symbolize.Cached -# [ OK ] Symbolize.Cached (0 ms) -# [ RUN ] Symbolize.Truncation -# [ OK ] Symbolize.Truncation (0 ms) -# [ RUN ] Symbolize.SymbolizeWithDemangling -# [ OK ] Symbolize.SymbolizeWithDemangling (0 ms) -# [ RUN ] Symbolize.SymbolizeSplitTextSections -# [ OK ] Symbolize.SymbolizeSplitTextSections (0 ms) -# [ RUN ] Symbolize.SymbolizeWithMultipleMaps -# /builddir/build/BUILD/abseil-cpp-20210324.2/absl/debugging/symbolize_test.cc:315: Failure -# Expected equality of these values: -# "kPadding1" -# buf -# Which is: "" -# /builddir/build/BUILD/abseil-cpp-20210324.2/absl/debugging/symbolize_test.cc:349: Failure -# Expected equality of these values: -# expected[i] -# Which is: "kPadding1" -# buf -# Which is: "" -# /builddir/build/BUILD/abseil-cpp-20210324.2/absl/debugging/symbolize_test.cc:349: Failure -# Expected equality of these values: -# expected[i] -# Which is: "kPadding1" -# buf -# Which is: "" -# [ FAILED ] Symbolize.SymbolizeWithMultipleMaps (1 ms) -sed -r -i 's/\bSymbolizeWithMultipleMaps\b/DISABLED_&/' \ - absl/debugging/symbolize_test.cc -%endif - %build %cmake \ @@ -133,6 +96,9 @@ sed -r -i 's/\bSymbolizeWithMultipleMaps\b/DISABLED_&/' \ %{_libdir}/pkgconfig/*.pc %changelog +* Tue Mar 15 2022 Benjamin A. Beasley - 20211102.0-2 +- Disable LTO on s390x to work around test failure + * Fri Feb 18 2022 Benjamin A. Beasley - 20211102.0-1 - Update to 20211102.0 (close RHBZ#2019691) - Drop --output-on-failure, already in %%ctest expansion From 4b8d306dee6fabf63810a20dcd81a957ff632fcb Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 15 Mar 2022 14:49:41 -0400 Subject: [PATCH 21/67] Disable SysinfoTest.NominalCPUFrequency in absl_sysinfo_test This fails occasionally on aarch64, and upstream reports that it is not meaningful except for Google internal users. See: NominalCPUFrequency Test from SysInfoTest Suite Fails on M1 Mac https://github.com/abseil/abseil-cpp/issues/1053#issuecomment-961432444 --- ...211102.0-disable-nominalcpufrequency.patch | 44 +++++++++++++++++++ abseil-cpp.spec | 22 ++++++++++ 2 files changed, 66 insertions(+) create mode 100644 abseil-cpp-20211102.0-disable-nominalcpufrequency.patch diff --git a/abseil-cpp-20211102.0-disable-nominalcpufrequency.patch b/abseil-cpp-20211102.0-disable-nominalcpufrequency.patch new file mode 100644 index 0000000..e1351d8 --- /dev/null +++ b/abseil-cpp-20211102.0-disable-nominalcpufrequency.patch @@ -0,0 +1,44 @@ +From d984ddf1a64ce9fae36395b423cf6e52afc9a07a Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Wed, 16 Mar 2022 14:33:41 -0400 +Subject: [PATCH] Disable SysinfoTest.NominalCPUFrequency + +SysinfoTest.NominalCPUFrequency in absl_sysinfo_test fails occasionally +on aarch64, but see: + +NominalCPUFrequency Test from SysInfoTest Suite Fails on M1 Mac +https://github.com/abseil/abseil-cpp/issues/1053#issuecomment-961432444 + +in which an upstream author opines: + + If the only problem you are trying to solve is a failing test, this is safe + to ignore since this code is never called. I should consider stripping this + test out of the open source release. NominalCPUFrequency is only called in + code private to Google and we do have tests on the platforms we use it on. + +We therefore disable it on all architectures, since any future failures +will also not be meaningful. + +Note also that this test is removed upstream in commit +732b5580f089101ce4b8cdff55bb6461c59a6720 (internal commit +7e8da4f14afd25d11713eee6b743ba31605332bf). +--- + absl/base/internal/sysinfo_test.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/absl/base/internal/sysinfo_test.cc b/absl/base/internal/sysinfo_test.cc +index 5f9e45f..1a944f0 100644 +--- a/absl/base/internal/sysinfo_test.cc ++++ b/absl/base/internal/sysinfo_test.cc +@@ -44,7 +44,7 @@ TEST(SysinfoTest, NumCPUs) { + // frequency, while others do not. Since we can't predict a priori what a given + // machine is going to do, just disable this test on POWER on Linux. + #if !(defined(__linux) && (defined(__ppc64__) || defined(__PPC64__))) +-TEST(SysinfoTest, NominalCPUFrequency) { ++TEST(SysinfoTest, DISABLED_NominalCPUFrequency) { + // Linux only exposes the CPU frequency on certain architectures, and + // Emscripten doesn't expose it at all. + #if defined(__linux__) && \ +-- +2.35.1 + diff --git a/abseil-cpp.spec b/abseil-cpp.spec index d1a563a..fadc022 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -14,6 +14,26 @@ Source0: https://github.com/abseil/abseil-cpp/archive/%{version}/%{name}- # released version of GTest. Not submitted upstream, as this is a workaround # rather than a fix. https://github.com/abseil/abseil-cpp/issues/1063 Patch0: abseil-cpp-20211102.0-gtest-unreleased-features.patch +# SysinfoTest.NominalCPUFrequency in absl_sysinfo_test fails occasionally +# on aarch64, but see: +# +# NominalCPUFrequency Test from SysInfoTest Suite Fails on M1 Mac +# https://github.com/abseil/abseil-cpp/issues/1053#issuecomment-961432444 +# +# in which an upstream author opines: +# +# If the only problem you are trying to solve is a failing test, this is safe +# to ignore since this code is never called. I should consider stripping this +# test out of the open source release. NominalCPUFrequency is only called in +# code private to Google and we do have tests on the platforms we use it on. +# +# We therefore disable it on all architectures, since any future failures +# will also not be meaningful. +# +# Note also that this test is removed upstream in commit +# 732b5580f089101ce4b8cdff55bb6461c59a6720 (internal commit +# 7e8da4f14afd25d11713eee6b743ba31605332bf). +Patch1: abseil-cpp-20211102.0-disable-nominalcpufrequency.patch BuildRequires: cmake # The default make backend would work just as well; ninja is observably faster @@ -98,6 +118,8 @@ find . -type f -name '*.cc' \ %changelog * Tue Mar 15 2022 Benjamin A. Beasley - 20211102.0-2 - Disable LTO on s390x to work around test failure +- Skip SysinfoTest.NominalCPUFrequency on all architectures; it fails + occasionally on aarch64, and upstream says we should not care * Fri Feb 18 2022 Benjamin A. Beasley - 20211102.0-1 - Update to 20211102.0 (close RHBZ#2019691) From 245608b2864cf744a91e7fee1435a1e0e97cfa04 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 20 Jul 2022 20:22:41 +0000 Subject: [PATCH 22/67] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_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 fadc022..605e892 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -3,7 +3,7 @@ Name: abseil-cpp Version: 20211102.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: C++ Common Libraries License: ASL 2.0 @@ -116,6 +116,9 @@ find . -type f -name '*.cc' \ %{_libdir}/pkgconfig/*.pc %changelog +* Wed Jul 20 2022 Fedora Release Engineering - 20211102.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Tue Mar 15 2022 Benjamin A. Beasley - 20211102.0-2 - Disable LTO on s390x to work around test failure - Skip SysinfoTest.NominalCPUFrequency on all architectures; it fails From e0b2e831a572ed86ca55d46bc77e9afd9a9b3480 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 29 Jul 2022 08:06:33 -0400 Subject: [PATCH 23/67] Do not leak -maes -msse4.1 into pkgconfig (fix RHBZ#2108658) --- ...6049995584c3489e4bd1467313e3e85af99c.patch | 22 +++++++++++++++++++ abseil-cpp.spec | 17 +++++++++++--- 2 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 09e96049995584c3489e4bd1467313e3e85af99c.patch diff --git a/09e96049995584c3489e4bd1467313e3e85af99c.patch b/09e96049995584c3489e4bd1467313e3e85af99c.patch new file mode 100644 index 0000000..d6b1325 --- /dev/null +++ b/09e96049995584c3489e4bd1467313e3e85af99c.patch @@ -0,0 +1,22 @@ +From 09e96049995584c3489e4bd1467313e3e85af99c Mon Sep 17 00:00:00 2001 +From: Bruno Pitrus +Date: Mon, 11 Jul 2022 18:27:39 +0200 +Subject: [PATCH] Do not leak -maes -msse4.1 into pkgconfig + +--- + CMake/AbseilHelpers.cmake | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/CMake/AbseilHelpers.cmake b/CMake/AbseilHelpers.cmake +index ebe9ddc87..9cd87c513 100644 +--- a/CMake/AbseilHelpers.cmake ++++ b/CMake/AbseilHelpers.cmake +@@ -166,6 +166,8 @@ function(absl_cc_library) + set(PC_CFLAGS "${PC_CFLAGS} ${cflag}") + elseif(${cflag} MATCHES "^(-W|/w[1234eo])") + # Don't impose our warnings on others. ++ elseif(${cflag} MATCHES "^-m") ++ # Don't impose CPU instruction requirements on others, as the code performs feature detection on runtime. + else() + set(PC_CFLAGS "${PC_CFLAGS} ${cflag}") + endif() diff --git a/abseil-cpp.spec b/abseil-cpp.spec index 605e892..43f2f77 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -3,7 +3,7 @@ Name: abseil-cpp Version: 20211102.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: C++ Common Libraries License: ASL 2.0 @@ -13,7 +13,7 @@ Source0: https://github.com/abseil/abseil-cpp/archive/%{version}/%{name}- # Remove test assertions that use ::testing::Conditional, which is not in a # released version of GTest. Not submitted upstream, as this is a workaround # rather than a fix. https://github.com/abseil/abseil-cpp/issues/1063 -Patch0: abseil-cpp-20211102.0-gtest-unreleased-features.patch +Patch: abseil-cpp-20211102.0-gtest-unreleased-features.patch # SysinfoTest.NominalCPUFrequency in absl_sysinfo_test fails occasionally # on aarch64, but see: # @@ -33,7 +33,15 @@ Patch0: abseil-cpp-20211102.0-gtest-unreleased-features.patch # Note also that this test is removed upstream in commit # 732b5580f089101ce4b8cdff55bb6461c59a6720 (internal commit # 7e8da4f14afd25d11713eee6b743ba31605332bf). -Patch1: abseil-cpp-20211102.0-disable-nominalcpufrequency.patch +Patch: abseil-cpp-20211102.0-disable-nominalcpufrequency.patch +# Backport upstream commit 09e96049995584c3489e4bd1467313e3e85af99c, which +# corresponds to: +# +# Do not leak -maes -msse4.1 into pkgconfig +# https://github.com/abseil/abseil-cpp/pull/1216 +# +# Fixes RHBZ#2108658. +Patch: https://github.com/abseil/abseil-cpp/commit/09e96049995584c3489e4bd1467313e3e85af99c.patch BuildRequires: cmake # The default make backend would work just as well; ninja is observably faster @@ -116,6 +124,9 @@ find . -type f -name '*.cc' \ %{_libdir}/pkgconfig/*.pc %changelog +* Fri Jul 29 2022 Benjamin A. Beasley - 20211102.0-4 +- Do not leak -maes -msse4.1 into pkgconfig (fix RHBZ#2108658) + * Wed Jul 20 2022 Fedora Release Engineering - 20211102.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 99fe9af2af90076f75eb11c38ac50d8e7d97e55d Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sat, 13 Aug 2022 09:44:44 -0400 Subject: [PATCH 24/67] Update to 20220623.0 (close RHBZ#2101021) --- .gitignore | 1 + ...211102.0-disable-nominalcpufrequency.patch | 44 ------- ...20211102.0-gtest-unreleased-features.patch | 111 ------------------ abseil-cpp.spec | 46 ++------ sources | 2 +- 5 files changed, 9 insertions(+), 195 deletions(-) delete mode 100644 abseil-cpp-20211102.0-disable-nominalcpufrequency.patch delete mode 100644 abseil-cpp-20211102.0-gtest-unreleased-features.patch diff --git a/.gitignore b/.gitignore index dd28df9..c7d09f3 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /abseil-cpp-20200923.3.tar.gz /abseil-cpp-20210324.2.tar.gz /abseil-cpp-20211102.0.tar.gz +/abseil-cpp-20220623.0.tar.gz diff --git a/abseil-cpp-20211102.0-disable-nominalcpufrequency.patch b/abseil-cpp-20211102.0-disable-nominalcpufrequency.patch deleted file mode 100644 index e1351d8..0000000 --- a/abseil-cpp-20211102.0-disable-nominalcpufrequency.patch +++ /dev/null @@ -1,44 +0,0 @@ -From d984ddf1a64ce9fae36395b423cf6e52afc9a07a Mon Sep 17 00:00:00 2001 -From: "Benjamin A. Beasley" -Date: Wed, 16 Mar 2022 14:33:41 -0400 -Subject: [PATCH] Disable SysinfoTest.NominalCPUFrequency - -SysinfoTest.NominalCPUFrequency in absl_sysinfo_test fails occasionally -on aarch64, but see: - -NominalCPUFrequency Test from SysInfoTest Suite Fails on M1 Mac -https://github.com/abseil/abseil-cpp/issues/1053#issuecomment-961432444 - -in which an upstream author opines: - - If the only problem you are trying to solve is a failing test, this is safe - to ignore since this code is never called. I should consider stripping this - test out of the open source release. NominalCPUFrequency is only called in - code private to Google and we do have tests on the platforms we use it on. - -We therefore disable it on all architectures, since any future failures -will also not be meaningful. - -Note also that this test is removed upstream in commit -732b5580f089101ce4b8cdff55bb6461c59a6720 (internal commit -7e8da4f14afd25d11713eee6b743ba31605332bf). ---- - absl/base/internal/sysinfo_test.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/absl/base/internal/sysinfo_test.cc b/absl/base/internal/sysinfo_test.cc -index 5f9e45f..1a944f0 100644 ---- a/absl/base/internal/sysinfo_test.cc -+++ b/absl/base/internal/sysinfo_test.cc -@@ -44,7 +44,7 @@ TEST(SysinfoTest, NumCPUs) { - // frequency, while others do not. Since we can't predict a priori what a given - // machine is going to do, just disable this test on POWER on Linux. - #if !(defined(__linux) && (defined(__ppc64__) || defined(__PPC64__))) --TEST(SysinfoTest, NominalCPUFrequency) { -+TEST(SysinfoTest, DISABLED_NominalCPUFrequency) { - // Linux only exposes the CPU frequency on certain architectures, and - // Emscripten doesn't expose it at all. - #if defined(__linux__) && \ --- -2.35.1 - diff --git a/abseil-cpp-20211102.0-gtest-unreleased-features.patch b/abseil-cpp-20211102.0-gtest-unreleased-features.patch deleted file mode 100644 index a77bcc0..0000000 --- a/abseil-cpp-20211102.0-gtest-unreleased-features.patch +++ /dev/null @@ -1,111 +0,0 @@ -diff -Naur abseil-cpp-20211102.0-original/absl/strings/internal/cord_rep_btree_test.cc abseil-cpp-20211102.0/absl/strings/internal/cord_rep_btree_test.cc ---- abseil-cpp-20211102.0-original/absl/strings/internal/cord_rep_btree_test.cc 2021-11-03 11:26:14.000000000 -0400 -+++ abseil-cpp-20211102.0/absl/strings/internal/cord_rep_btree_test.cc 2021-12-17 08:44:54.254485697 -0500 -@@ -59,7 +59,6 @@ - using ::testing::_; - using ::testing::AllOf; - using ::testing::AnyOf; --using ::testing::Conditional; - using ::testing::ElementsAre; - using ::testing::ElementsAreArray; - using ::testing::Eq; -@@ -381,7 +380,6 @@ - flats.push_back(MakeHexFlat(i)); - auto* result = CordRepBtree::Append(leaf, flats.back()); - EXPECT_THAT(result->height(), Eq(0)); -- EXPECT_THAT(result, Conditional(shared(), Ne(leaf), Eq(leaf))); - EXPECT_THAT(result->Edges(), ElementsAreArray(flats)); - leaf = result; - } -@@ -399,7 +397,6 @@ - flats.push_front(MakeHexFlat(i)); - auto* result = CordRepBtree::Prepend(leaf, flats.front()); - EXPECT_THAT(result->height(), Eq(0)); -- EXPECT_THAT(result, Conditional(shared(), Ne(leaf), Eq(leaf))); - EXPECT_THAT(result->Edges(), ElementsAreArray(flats)); - leaf = result; - } -@@ -426,7 +423,6 @@ - result = CordRepBtree::Append(leaf, flats.back()); - } - EXPECT_THAT(result->height(), Eq(0)); -- EXPECT_THAT(result, Conditional(shared(), Ne(leaf), Eq(leaf))); - EXPECT_THAT(result->Edges(), ElementsAreArray(flats)); - leaf = result; - } -@@ -483,7 +479,6 @@ - flats.push_back(MakeHexFlat(i)); - CordRepBtree* result = CordRepBtree::Append(tree, flats.back()); - ASSERT_THAT(result, IsNode(1)); -- ASSERT_THAT(result, Conditional(shared(), Ne(tree), Eq(tree))); - std::vector edges = GetLeafEdges(result); - ASSERT_THAT(edges, ElementsAreArray(flats)); - tree = result; -@@ -514,7 +509,6 @@ - flats.push_back(MakeHexFlat(i)); - CordRepBtree* result = CordRepBtree::Append(tree, flats.back()); - ASSERT_THAT(result, IsNode(2)); -- ASSERT_THAT(result, Conditional(shared(), Ne(tree), Eq(tree))); - std::vector edges = GetLeafEdges(result); - ASSERT_THAT(edges, ElementsAreArray(flats)); - tree = result; -@@ -544,7 +538,6 @@ - flats.push_front(MakeHexFlat(i)); - CordRepBtree* result = CordRepBtree::Prepend(tree, flats.front()); - ASSERT_THAT(result, IsNode(1)); -- ASSERT_THAT(result, Conditional(shared(), Ne(tree), Eq(tree))); - std::vector edges = GetLeafEdges(result); - ASSERT_THAT(edges, ElementsAreArray(flats)); - tree = result; -@@ -575,7 +568,6 @@ - flats.push_front(MakeHexFlat(i)); - CordRepBtree* result = CordRepBtree::Prepend(tree, flats.front()); - ASSERT_THAT(result, IsNode(2)); -- ASSERT_THAT(result, Conditional(shared(), Ne(tree), Eq(tree))); - std::vector edges = GetLeafEdges(result); - ASSERT_THAT(edges, ElementsAreArray(flats)); - tree = result; -@@ -889,7 +881,6 @@ - for (size_t i = 1; i < n; ++i) { - refs.RefIf(shared(), leaf); - CordRepBtree* result = BtreeAdd(leaf, append, consumer.Next(3)); -- EXPECT_THAT(result, Conditional(shared(), Ne(leaf), Eq(leaf))); - EXPECT_THAT(CordToString(result), Eq(consumer.Consumed())); - leaf = result; - } -@@ -905,9 +896,6 @@ - CordRepBtree* leaf0 = tree->Edges()[0]->btree(); - CordRepBtree* leaf1 = tree->Edges()[1]->btree(); - CordRepBtree* result = CordRepBtree::Append(tree, "123456789"); -- EXPECT_THAT(result, Conditional(shared(), Ne(tree), Eq(tree))); -- EXPECT_THAT(result->Edges(), -- ElementsAre(leaf0, Conditional(shared(), Ne(leaf1), Eq(leaf1)))); - EXPECT_THAT(CordToString(result), Eq(data + "123456789")); - CordRep::Unref(result); - } -@@ -920,9 +908,6 @@ - CordRepBtree* leaf0 = tree->Edges()[0]->btree(); - CordRepBtree* leaf1 = tree->Edges()[1]->btree(); - CordRepBtree* result = CordRepBtree::Prepend(tree, "123456789"); -- EXPECT_THAT(result, Conditional(shared(), Ne(tree), Eq(tree))); -- EXPECT_THAT(result->Edges(), -- ElementsAre(Conditional(shared(), Ne(leaf0), Eq(leaf0)), leaf1)); - EXPECT_THAT(CordToString(result), Eq("123456789" + data)); - CordRep::Unref(result); - } -@@ -954,7 +939,6 @@ - for (size_t i = max_cap + 1; i < max_cap * max_cap; ++i) { - refs.RefIf(shared(), tree); - result = BtreeAdd(tree, append, consumer.Next(3)); -- ASSERT_THAT(result, Conditional(shared(), Ne(tree), Eq(tree))); - ASSERT_THAT(CordToString(result), Eq(consumer.Consumed())); - tree = result; - } -@@ -970,7 +954,6 @@ - ++i) { - refs.RefIf(shared(), tree); - result = BtreeAdd(tree, append, consumer.Next(3)); -- ASSERT_THAT(result, Conditional(shared(), Ne(tree), Eq(tree))); - ASSERT_THAT(CordToString(result), Eq(consumer.Consumed())); - tree = result; - } diff --git a/abseil-cpp.spec b/abseil-cpp.spec index 43f2f77..0a15ed2 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -1,39 +1,15 @@ # Installed library version -%global lib_version 2111.0.0 +%global lib_version 2206.0.0 Name: abseil-cpp -Version: 20211102.0 -Release: 4%{?dist} +Version: 20220623.0 +Release: 1%{?dist} Summary: C++ Common Libraries License: ASL 2.0 URL: https://abseil.io Source0: https://github.com/abseil/abseil-cpp/archive/%{version}/%{name}-%{version}.tar.gz -# Remove test assertions that use ::testing::Conditional, which is not in a -# released version of GTest. Not submitted upstream, as this is a workaround -# rather than a fix. https://github.com/abseil/abseil-cpp/issues/1063 -Patch: abseil-cpp-20211102.0-gtest-unreleased-features.patch -# SysinfoTest.NominalCPUFrequency in absl_sysinfo_test fails occasionally -# on aarch64, but see: -# -# NominalCPUFrequency Test from SysInfoTest Suite Fails on M1 Mac -# https://github.com/abseil/abseil-cpp/issues/1053#issuecomment-961432444 -# -# in which an upstream author opines: -# -# If the only problem you are trying to solve is a failing test, this is safe -# to ignore since this code is never called. I should consider stripping this -# test out of the open source release. NominalCPUFrequency is only called in -# code private to Google and we do have tests on the platforms we use it on. -# -# We therefore disable it on all architectures, since any future failures -# will also not be meaningful. -# -# Note also that this test is removed upstream in commit -# 732b5580f089101ce4b8cdff55bb6461c59a6720 (internal commit -# 7e8da4f14afd25d11713eee6b743ba31605332bf). -Patch: abseil-cpp-20211102.0-disable-nominalcpufrequency.patch # Backport upstream commit 09e96049995584c3489e4bd1467313e3e85af99c, which # corresponds to: # @@ -83,24 +59,13 @@ Development headers for %{name} %prep %autosetup -p1 -S gendiff -# Replace GTEST_FLAG_GET, which is not in a released version of GTest, with an -# appropriate default value. Not submitted upstream, as this is a workaround -# rather than a fix. https://github.com/abseil/abseil-cpp/issues/1063 -# -# The find-then-sed pattern means we only discard mtimes on files that actually -# needed to be modified. -find . -type f -name '*.cc' \ - -exec gawk '/GTEST_FLAG_GET/ { print FILENAME ; nextfile }' '{}' '+' | - xargs -r -t sed -r -i 's/GTEST_FLAG_GET/::testing::GTEST_FLAG/g' - - %build %cmake \ -GNinja \ -DABSL_USE_EXTERNAL_GOOGLETEST:BOOL=ON \ -DABSL_FIND_GOOGLETEST:BOOL=ON \ -DABSL_ENABLE_INSTALL:BOOL=ON \ - -DBUILD_TESTING:BOOL=ON \ + -DABSL_BUILD_TESTING:BOOL=ON \ -DCMAKE_BUILD_TYPE:STRING=None \ -DCMAKE_CXX_STANDARD:STRING=17 %cmake_build @@ -124,6 +89,9 @@ find . -type f -name '*.cc' \ %{_libdir}/pkgconfig/*.pc %changelog +* Sat Aug 13 2022 Benjamin A. Beasley - 20220623.0-1 +- Update to 20220623.0 (close RHBZ#2101021) + * Fri Jul 29 2022 Benjamin A. Beasley - 20211102.0-4 - Do not leak -maes -msse4.1 into pkgconfig (fix RHBZ#2108658) diff --git a/sources b/sources index 35a1237..2ef3e37 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (abseil-cpp-20211102.0.tar.gz) = fed68aa434c02ec6faa9d1c81f1ad35b60ec024b44957e2e0ac31e6075e385c06a3e1b616afeb4bb7c2413191fd7827d82e1f9f0796b52ed21fb2c41dd9031cf +SHA512 (abseil-cpp-20220623.0.tar.gz) = 6a84254927cac285c77f6b2e77de23ce4f65c28acc0289228f3db552e247fb1dedf2c6e51a98da7df700c062612e27e6acd029122e8abc3fff12f3f5502c8c10 From 13bb6803bb6fd46b3fa2d6dab1cd7311ef24c3bb Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sat, 13 Aug 2022 09:44:55 -0400 Subject: [PATCH 25/67] Update License to SPDX --- abseil-cpp.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/abseil-cpp.spec b/abseil-cpp.spec index 0a15ed2..3065c40 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -6,7 +6,17 @@ Version: 20220623.0 Release: 1%{?dist} Summary: C++ Common Libraries -License: ASL 2.0 +# The entire source is Apache-2.0, except: +# - The following files are LicenseRef-Fedora-Public-Domain: +# absl/time/internal/cctz/src/tzfile.h +# ** This file is in the public domain, so clarified as of +# ** 1996-06-05 by Arthur David Olson. +# absl/time/internal/cctz/testdata/zoneinfo/iso3166.tab +# # This file is in the public domain, so clarified as of +# # 2009-05-17 by Arthur David Olson. +# absl/time/internal/cctz/testdata/zoneinfo/zone1970.tab +# # This file is in the public domain. +License: Apache-2.0 AND LicenseRef-Fedora-Public-Domain URL: https://abseil.io Source0: https://github.com/abseil/abseil-cpp/archive/%{version}/%{name}-%{version}.tar.gz @@ -91,6 +101,7 @@ Development headers for %{name} %changelog * Sat Aug 13 2022 Benjamin A. Beasley - 20220623.0-1 - Update to 20220623.0 (close RHBZ#2101021) +- Update License to SPDX * Fri Jul 29 2022 Benjamin A. Beasley - 20211102.0-4 - Do not leak -maes -msse4.1 into pkgconfig (fix RHBZ#2108658) From 63fe7364ce8c947b3aec82aecd0c6e4568517df8 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 2 Sep 2022 09:36:53 -0400 Subject: [PATCH 26/67] Update to 20220623.1 (close RHBZ#2123181) --- .gitignore | 1 + abseil-cpp.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index c7d09f3..3f8e405 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /abseil-cpp-20210324.2.tar.gz /abseil-cpp-20211102.0.tar.gz /abseil-cpp-20220623.0.tar.gz +/abseil-cpp-20220623.1.tar.gz diff --git a/abseil-cpp.spec b/abseil-cpp.spec index 3065c40..bf79095 100644 --- a/abseil-cpp.spec +++ b/abseil-cpp.spec @@ -2,8 +2,8 @@ %global lib_version 2206.0.0 Name: abseil-cpp -Version: 20220623.0 -Release: 1%{?dist} +Version: 20220623.1 +Release: 2%{?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 +* Fri Sep 02 2022 Benjamin A. Beasley - 20220623.1-2 +- Update to 20220623.1 (close RHBZ#2123181) + * Sat Aug 13 2022 Benjamin A. Beasley - 20220623.0-1 - Update to 20220623.0 (close RHBZ#2101021) - Update License to SPDX diff --git a/sources b/sources index 2ef3e37..e1007ba 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (abseil-cpp-20220623.0.tar.gz) = 6a84254927cac285c77f6b2e77de23ce4f65c28acc0289228f3db552e247fb1dedf2c6e51a98da7df700c062612e27e6acd029122e8abc3fff12f3f5502c8c10 +SHA512 (abseil-cpp-20220623.1.tar.gz) = ab4fccd9a2bfa0c5ad4b56c8e8f8b7ec7a8eca8b6cc6959802acadd1da785e1feb078c6ac621808cd699c82717a9e637dc426d94b70a8db7f2a807059d41cbc2 From cd77648091a006135a380760dc000cdae7bc2a05 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 18 Jan 2023 21:20:10 +0000 Subject: [PATCH 27/67] 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 28/67] 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 29/67] 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 30/67] 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