[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/03: gnu: dune-localfunctions: Fix build failure.
From: |
guix-commits |
Subject: |
03/03: gnu: dune-localfunctions: 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 109bf6a0e7111a75a54924be8a58c0fbc9a55c7d
Author: Marius Bakke <address@hidden>
AuthorDate: Tue Apr 14 22:30:05 2020 +0200
gnu: dune-localfunctions: Fix build failure.
* gnu/packages/maths.scm (dune-localfunctions)[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 08e0e7d..b814105 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -4921,6 +4921,18 @@ aggregation-based algebraic multigrid.")
(arguments
`(#:phases
(modify-phases %standard-phases
+ ;; XXX: localfunctions/test/lagrangeshapefunctiontest.cc includes
<fenv.h>
+ ;; and fails to find the stdlib types when the gfortran header is
used.
+ ;; Hide gfortran from CPLUS_INCLUDE_PATH to ensure we get the GCC
header.
+ (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))))))