guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: idris: Fixes test failure.


From: guix-commits
Subject: branch master updated: gnu: idris: Fixes test failure.
Date: Wed, 13 Apr 2022 11:10:35 -0400

This is an automated email from the git hooks/post-receive script.

bavier pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new b5e32d9620 gnu: idris: Fixes test failure.
b5e32d9620 is described below

commit b5e32d96202e58bb0e7d640fe54f728d0ca2b4b1
Author: Eric Bavier <bavier@posteo.net>
AuthorDate: Wed Apr 13 09:45:34 2022 -0500

    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.
---
 gnu/local.mk                                 |  1 +
 gnu/packages/idris.scm                       |  5 +++--
 gnu/packages/patches/idris-test-ffi008.patch | 26 ++++++++++++++++++++++++++
 3 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index dbb904e89e..70133e6502 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -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      \
diff --git a/gnu/packages/idris.scm b/gnu/packages/idris.scm
index 3e480e06b4..cdf76244fb 100644
--- a/gnu/packages/idris.scm
+++ b/gnu/packages/idris.scm
@@ -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 @@
                 "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
diff --git a/gnu/packages/patches/idris-test-ffi008.patch 
b/gnu/packages/patches/idris-test-ffi008.patch
new file mode 100644
index 0000000000..530813c20e
--- /dev/null
+++ b/gnu/packages/patches/idris-test-ffi008.patch
@@ -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);
+ }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]