~ruther/guix-local

d25166c06db1a28c7dc7fe5746a8922c7559bdb3 — Yelninei 2 months ago bea1874
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 <ludo@gnu.org>
Merges: #4860
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
1 files changed, 5 insertions(+), 9 deletions(-)

M gnu/packages/version-control.scm
M gnu/packages/version-control.scm => gnu/packages/version-control.scm +5 -9
@@ 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)