guix_mirror_bot pushed a commit to branch next-master
in repository guix.
commit f0ab81c097563a5037e0d97d10a9ca91b62c529d
Author: Yelninei <[email protected]>
AuthorDate: Mon Dec 15 11:55:30 2025 +0000
gnu: libgit2: Fix tests on 32bit systems.
This prevents a discrepancy between git_fs_path_lstat using different size
stat structs.
See https://github.com/libgit2/libgit2/issues/7169
* gnu/packages/version-control.scm (libgit2-1.9): Compile with
-D_FILE_OFFSET_BITS=64 on 32bit system.
Change-Id: Iab7df2c930b0fc0cb9030b754ad7b668d49a7034
Signed-off-by: Ludovic Courtès <[email protected]>
Merges: #4860
---
gnu/packages/version-control.scm | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index d8b9c6bfb9..c4cf0cb01a 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -1273,17 +1273,13 @@ other git-like projects such as @code{libgit2}.")
%build-inputs
(string-append "/bin/" ,(%current-target-system)
"-pkg-config"))))
- '())))
+ '())
+ ;; See https://github.com/libgit2/libgit2/issues/7169
+ ,@(if (target-64bit?)
+ '()
+ '("-DCMAKE_C_FLAGS=-D_FILE_OFFSET_BITS=64"))))
#:phases
(modify-phases %standard-phases
- ,@(if (or (target-arm32?) (target-hurd?))
- ;; Some tests are flaky on armhf.
- ;; On GNU/Hurd, the 'diff/workdir' test in libgit2 1.7.1 fails
- ;; while comparing st.st_size to zero.
- '((add-before 'check 'pre-check
- (lambda _
- (setenv "GITTEST_FLAKY_STAT" "true"))))
- '())
;; Run checks more verbosely, unless we are cross-compiling.
(replace 'check
(lambda* (#:key (tests? #t) #:allow-other-keys)