summaryrefslogtreecommitdiff
path: root/gnu/packages/maths.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-04-14 22:29:35 +0200
committerMarius Bakke <mbakke@fastmail.com>2020-04-14 22:33:01 +0200
commitf7cbf403efa5368b5585f763262b152577339919 (patch)
treea35b20b5ca90f3ead63423214c5fa9724f44e0e5 /gnu/packages/maths.scm
parent83e6b0640acf933ef54a674dbbadf71f51e8cc14 (diff)
gnu: dune-istl: Fix build failure.
* gnu/packages/maths.scm (dune-istl)[arguments]: Add phase 'hide-gfortran'.
Diffstat (limited to 'gnu/packages/maths.scm')
-rw-r--r--gnu/packages/maths.scm12
1 files changed, 12 insertions, 0 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index e3d3216eab..08e0e7dd7a 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))))))