This is an automated email from the git hooks/post-receive script.
guix_mirror_bot pushed a commit to branch master
in repository guix.
The following commit(s) were added to refs/heads/master by this push:
new 0a7a1a4cb5 gnu: abseil-cpp-20220623: Fix cross-compilation.
0a7a1a4cb5 is described below
commit 0a7a1a4cb55b887727dac6b9c2585002629e8497
Author: Herman Rimm <[email protected]>
AuthorDate: Tue Aug 25 11:46:53 2026 +0200
gnu: abseil-cpp-20220623: Fix cross-compilation.
* gnu/packages/cpp.scm (abseil-cpp-20220623)[arguments]: Dedent a space.
Add TODO comments. Do not enable tests or set CMAKE_EXE_LINKER_FLAGS if
cross-compiling. Remove remove-gtest-check phase if cross-compiling.
Fixes: guix/guix#2654
Signed-off-by: Andreas Enge <[email protected]>
---
gnu/packages/cpp.scm | 31 ++++++++++++++++++-------------
1 file changed, 18 insertions(+), 13 deletions(-)
diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 3167c1ac94..05cdd9151c 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -2500,11 +2500,15 @@ point and then, after each tween step, plugging back
the result.")
(search-patches
"abseil-cpp-20220623.1-no-kepsilon-i686.patch"))))
(build-system cmake-build-system)
(arguments
- (list
- #:configure-flags
+ (list
+ #:configure-flags
+ (if (%current-target-system)
+ #~'("-DBUILD_SHARED_LIBS=ON")
;; The following convoluted expression has been crafted to avoid
;; changing the derivation when removing inheritance from
;; abseil-cpp-20200923.3.
+ ;; TODO: Simplify and try to remove CMAKE_EXE_LINKER_FLAGS for
+ ;; next world-rebuild.
#~(cons*
"-DABSL_BUILD_TESTING=ON"
(delete
@@ -2518,22 +2522,23 @@ point and then, after each tween step, plugging back
the result.")
;; ld: /gnu/store/...-googletest-1.10.0/lib/libgmock.so:
;; error adding symbols: DSO missing from command line
;; collect2: error: ld returned 1 exit status
- "-DCMAKE_EXE_LINKER_FLAGS=-lgtest -lpthread -lgmock")))
- #:phases
- #~(modify-phases %standard-phases
+ "-DCMAKE_EXE_LINKER_FLAGS=-lgtest -lpthread -lgmock"))))
+ #:phases
+ #~(modify-phases %standard-phases
(add-after 'unpack 'fix-max
(lambda _
(substitute* "absl/debugging/failure_signal_handler.cc"
(("std::max\\(SIGSTKSZ, 65536\\)")
"std::max<size_t>(SIGSTKSZ, 65536)"))))
- (add-before 'configure 'remove-gtest-check
- ;; The CMakeLists fails to find our googletest for some reason, but
- ;; it works nonetheless.
- (lambda _
- (substitute* "CMakeLists.txt"
- (("check_target\\(gtest\\)") "")
- (("check_target\\(gtest_main\\)") "")
- (("check_target\\(gmock\\)") "")))))))
+ ;; TODO: Remove phase unconditionally for next world-rebuild.
+ #$@(if (%current-target-system)
+ #~()
+ #~((add-before 'configure 'remove-gtest-check
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("check_target\\(gtest\\)") "")
+ (("check_target\\(gtest_main\\)") "")
+ (("check_target\\(gmock\\)") "")))))))))
(native-inputs
(list googletest-1.12))
(home-page "https://abseil.io")