summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-04-11 15:41:45 +0200
committerMarius Bakke <mbakke@fastmail.com>2020-04-11 15:41:45 +0200
commit8cc103cb01c1f13090ecfb34a6dcdd7d68710f31 (patch)
tree54ad016e6713f0dd9d6d23a8cc7a6a17797e154e /gnu
parent72cf14948dd2f9ef049479bdb1321e2568e10ac5 (diff)
gnu: gRPC@1.16: Fix build with glibc 2.30 and later.
* gnu/packages/rpc.scm (grpc-1.16.1)[arguments]: Add phase to rename custom gettid() function.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/rpc.scm19
1 files changed, 18 insertions, 1 deletions
diff --git a/gnu/packages/rpc.scm b/gnu/packages/rpc.scm
index e73695b613..28c61b54f9 100644
--- a/gnu/packages/rpc.scm
+++ b/gnu/packages/rpc.scm
@@ -23,6 +23,7 @@
#:use-module (guix packages)
#:use-module (guix git-download)
#:use-module (guix download)
+ #:use-module (guix utils)
#:use-module (guix build-system cmake)
#:use-module (guix build-system python)
#:use-module (gnu packages adns)
@@ -122,7 +123,23 @@ browsers to backend services.")
(file-name (git-file-name "grpc" version))
(sha256
(base32
- "1jimqz3115f9pli5w6ik9wi7mjc7ix6y7yrq4a1ab9fc3dalj7p2"))))))
+ "1jimqz3115f9pli5w6ik9wi7mjc7ix6y7yrq4a1ab9fc3dalj7p2"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments grpc)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ ;; Note: This would be nicer as a snippet, but that creates a tarball
+ ;; instead of a checkout and breaks assumptions made by the builder.
+ (add-after 'unpack 'rename-gettid
+ (lambda _
+ ;; Rename custom gettid() syscall wrapper to avoid conflict
+ ;; with gettid() from glibc 2.30.
+ (substitute* '("src/core/lib/gpr/log_linux.cc"
+ "src/core/lib/gpr/log_posix.cc"
+ "src/core/lib/iomgr/ev_epollex_linux.cc")
+ (("gettid\\(")
+ "sys_gettid("))
+ #t))))))))
(define-public python-grpcio
(package