diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2024-05-21 09:25:07 +0300 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2024-05-21 09:25:07 +0300 |
commit | 81d08d797059c4af633c48048dbcd97de4a01a12 (patch) | |
tree | 12c7a01109451a19d302a6ac68a20183618d2609 | |
parent | e50fc5380ea0f875790e5cd924b4048cae55df3c (diff) | |
download | guix-81d08d797059c4af633c48048dbcd97de4a01a12.tar.gz |
gnu: abseil-cpp: Fix build on i686-linux.
* gnu/packages/cpp.scm (abseil-cpp)[source]: Add patch. (abseil-cpp-20220623.1)[source]: Same. * gnu/packages/patches/abseil-cpp-20220623.1-no-kepsilon-i686.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Change-Id: I27b9abc2c44ff6dc313209f4b0b12542a92d6fcd
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/cpp.scm | 8 | ||||
-rw-r--r-- | gnu/packages/patches/abseil-cpp-20220623.1-no-kepsilon-i686.patch | 23 |
3 files changed, 30 insertions, 2 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 3624d6a2a8..87867a18a7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -913,6 +913,7 @@ dist_patch_DATA = \ %D%/packages/patches/abiword-explictly-cast-bools.patch \ %D%/packages/patches/abseil-cpp-20200923.3-adjust-sysinfo.patch \ %D%/packages/patches/abseil-cpp-20200923.3-duration-test.patch \ + %D%/packages/patches/abseil-cpp-20220623.1-no-kepsilon-i686.patch \ %D%/packages/patches/abseil-cpp-fix-strerror_test.patch \ %D%/packages/patches/adb-add-libraries.patch \ %D%/packages/patches/adb-libssl_11-compatibility.patch \ diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 5c7ca8965b..e96a354551 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -1456,7 +1456,9 @@ Google's C++ code base.") (file-name (git-file-name name version)) (sha256 (base32 - "0vxh2a74g4s45yr8kdjqnzl64k10qdlc0hbnn987a4cnwdj4bp9r")))) + "0vxh2a74g4s45yr8kdjqnzl64k10qdlc0hbnn987a4cnwdj4bp9r")) + (patches + (search-patches "abseil-cpp-20220623.1-no-kepsilon-i686.patch")))) (arguments (substitute-keyword-arguments (package-arguments base) ((#:configure-flags flags) @@ -1477,7 +1479,9 @@ Google's C++ code base.") (file-name (git-file-name name version)) (sha256 (base32 - "1ydkkbanrpkp5i814arzsk973kyzhhjhagnp392rq6rrv16apldq")))) + "1ydkkbanrpkp5i814arzsk973kyzhhjhagnp392rq6rrv16apldq")) + (patches + (search-patches "abseil-cpp-20220623.1-no-kepsilon-i686.patch")))) (arguments (substitute-keyword-arguments (package-arguments base) ((#:phases phases) diff --git a/gnu/packages/patches/abseil-cpp-20220623.1-no-kepsilon-i686.patch b/gnu/packages/patches/abseil-cpp-20220623.1-no-kepsilon-i686.patch new file mode 100644 index 0000000000..ba4e27511b --- /dev/null +++ b/gnu/packages/patches/abseil-cpp-20220623.1-no-kepsilon-i686.patch @@ -0,0 +1,23 @@ +After an upstream code dump on 20220314 when this code was added this test started to fail on i686-linux. + +diff --git a/absl/random/uniform_real_distribution_test.cc b/absl/random/uniform_real_distribution_test.cc +index 260aac96..0abef9b0 100644 +--- a/absl/random/uniform_real_distribution_test.cc ++++ b/absl/random/uniform_real_distribution_test.cc +@@ -228,6 +228,8 @@ TYPED_TEST(UniformRealDistributionTest, ViolatesPreconditionsDeathTest) { + + #endif // GTEST_HAS_DEATH_TEST + #if defined(NDEBUG) ++ // Except apparently not with 387 math ++#if !((defined(__i386__) || defined(_M_IX86)) && FLT_EVAL_METHOD != 0) + // opt-mode, for invalid parameters, will generate a garbage value, + // but should not enter an infinite loop. + absl::InsecureBitGen gen; +@@ -243,6 +245,7 @@ TYPED_TEST(UniformRealDistributionTest, ViolatesPreconditionsDeathTest) { + // Infinite result. + EXPECT_FALSE(std::isfinite(x)) << x; + } ++#endif // skip on i386 + #endif // NDEBUG + } + #ifdef _MSC_VER |