From 541cd25711fad2d04056ff21aff78bbc97a7e710 Mon Sep 17 00:00:00 2001 From: Yelninei Date: Mon, 15 Dec 2025 11:55:30 +0000 Subject: [PATCH] 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 --- 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 9ff85282677..6f5f6d6f568 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -1274,17 +1274,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)