mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-23 10:47:24 +01:00
gnu: idris: Fixes test failure.
* gnu/packages/patches/idris-test-ffi008.patch: New file. * gnu/packages/idris.scm (source): Use it. * gnu/local.mk (dist_patch_DATA): Register it.
This commit is contained in:
parent
8d82d817bc
commit
b5e32d9620
3 changed files with 30 additions and 2 deletions
|
@ -1286,6 +1286,7 @@ dist_patch_DATA = \
|
|||
%D%/packages/patches/idris-disable-test.patch \
|
||||
%D%/packages/patches/idris-build-with-haskeline-0.8.patch \
|
||||
%D%/packages/patches/idris-build-with-megaparsec-9.patch \
|
||||
%D%/packages/patches/idris-test-ffi008.patch \
|
||||
%D%/packages/patches/ilmbase-fix-tests.patch \
|
||||
%D%/packages/patches/imagemagick-CVE-2020-27829.patch \
|
||||
%D%/packages/patches/imagemagick-ReadDCMImage-fix.patch \
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
|
||||
;;; Copyright © 2016, 2017 David Craven <david@craven.ch>
|
||||
;;; Copyright © 2018 Alex ter Weele <alex.ter.weele@gmail.com>
|
||||
;;; Copyright © 2019, 2021 Eric Bavier <bavier@posteo.net>
|
||||
;;; Copyright © 2019, 2022 Eric Bavier <bavier@posteo.net>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -49,7 +49,8 @@ (define-public idris
|
|||
"1pachwc6msw3n1mz2z1r1w6h518w9gbhdvbaa5vi1qp3cn3wm6q4"))
|
||||
(patches (search-patches "idris-disable-test.patch"
|
||||
"idris-build-with-haskeline-0.8.patch"
|
||||
"idris-build-with-megaparsec-9.patch"))))
|
||||
"idris-build-with-megaparsec-9.patch"
|
||||
"idris-test-ffi008.patch"))))
|
||||
(build-system haskell-build-system)
|
||||
(native-inputs ;For tests
|
||||
(list perl ghc-cheapskate ghc-tasty ghc-tasty-golden
|
||||
|
|
26
gnu/packages/patches/idris-test-ffi008.patch
Normal file
26
gnu/packages/patches/idris-test-ffi008.patch
Normal file
|
@ -0,0 +1,26 @@
|
|||
Avoid "multiple definition of `mystruct'" error from `ld`:
|
||||
|
||||
Submitted upstream at https://github.com/idris-lang/Idris-dev/issues/4914
|
||||
|
||||
--- a/test/ffi008/ffi008.h 1969-12-31 18:00:01.000000000 -0600
|
||||
+++ a/test/ffi008/ffi008.h 2022-04-13 00:32:35.561262598 -0500
|
||||
@@ -10,7 +10,7 @@
|
||||
int16_t b;
|
||||
};
|
||||
|
||||
-struct test2 mystruct;
|
||||
+extern struct test2 mystruct;
|
||||
|
||||
int size1(void);
|
||||
int size2(void);
|
||||
--- a/test/ffi008/ffi008.c 1969-12-31 18:00:01.000000000 -0600
|
||||
+++ a/test/ffi008/ffi008.c 2022-04-13 00:32:53.145186302 -0500
|
||||
@@ -11,6 +11,8 @@
|
||||
return sizeof(struct test2);
|
||||
}
|
||||
|
||||
+struct test2 mystruct;
|
||||
+
|
||||
void print_mystruct(void) {
|
||||
printf("a: %d b: %d\n", mystruct.a, mystruct.b);
|
||||
}
|
Loading…
Reference in a new issue