guix-commits
[Top][All Lists]
Advanced

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

02/03: gnu: dune-istl: Fix build failure.


From: guix-commits
Subject: 02/03: gnu: dune-istl: Fix build failure.
Date: Tue, 14 Apr 2020 16:49:32 -0400 (EDT)

mbakke pushed a commit to branch core-updates
in repository guix.

commit f7cbf403efa5368b5585f763262b152577339919
Author: Marius Bakke <address@hidden>
AuthorDate: Tue Apr 14 22:29:35 2020 +0200

    gnu: dune-istl: Fix build failure.
    
    * gnu/packages/maths.scm (dune-istl)[arguments]: Add phase 'hide-gfortran'.
---
 gnu/packages/maths.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index e3d3216..08e0e7d 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4863,6 +4863,18 @@ This package contains the basic DUNE grid classes.")
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         ;; XXX: istl/test/matrixtest.cc includes <fenv.h> and fails to find
+         ;; the stdlib types when the gfortran header is used.  Remove gfortran
+         ;; from CPLUS_INCLUDE_PATH as a workaround.
+         (add-after 'set-paths 'hide-gfortran
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((gfortran (assoc-ref inputs "gfortran")))
+               (setenv "CPLUS_INCLUDE_PATH"
+                       (string-join
+                        (delete (string-append gfortran "/include/c++")
+                                (string-split (getenv "CPLUS_INCLUDE_PATH") 
#\:))
+                        ":"))
+               #t)))
          (add-after 'build 'build-tests
            (lambda* (#:key make-flags #:allow-other-keys)
              (apply invoke "make" "build_tests" make-flags))))))



reply via email to

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