Commit 43d8cb72 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

starpu-cuda: Fix nvcc build error in the presence of gfortran.

* inria/tainted/storm.scm (gfortran-sans-libstdc++): New variable.
(starpu+cuda)[native-inputs]: Use it instead of GFORTRAN.
parent 8a5b1603
......@@ -14,7 +14,9 @@
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
#:use-module (ice-9 match))
#:use-module (guix build-system trivial)
#:use-module (ice-9 match)
#:use-module (srfi srfi-1))
(define (gnu-build-system-with-compiler compiler)
"Return a variant of GNU-BUILD-SYSTEM that uses COMPILER instead of the
......@@ -36,6 +38,31 @@ implicit GCC."
(inherit gnu-build-system)
(lower lower*)))
(define gfortran-sans-libstdc++
;; XXX: Currently gfortran includes a copy of libstdc++ and its headers.
;; For some reason, nvcc chokes on those:
;;
;; /gnu/store/…-gfortran-7.5.0/include/c++/bits/exception.h(64): error: expected a ";"
;; /gnu/store/…-gfortran-7.5.0/include/c++/bits/exception.h(69): error: expected a ";"
;;
;; Work around it by removing those headers from CPATH and CPLUS_INCLUDE_PATH.
(package
(inherit gfortran)
(outputs '("out"))
(build-system trivial-build-system)
(arguments
'(#:builder (let ((out (assoc-ref %outputs "out"))
(gfortran (assoc-ref %build-inputs "gfortran")))
(mkdir out)
(symlink (string-append gfortran "/bin")
(string-append out "/bin")))))
(native-inputs `(("gfortran" ,gfortran)))
(inputs '())
(propagated-inputs '())
(native-search-paths '())
(search-paths '())
(synopsis "GFortran without libstdc++")))
(define-public starpu+cuda
(package
(inherit starpu)
......@@ -45,7 +72,8 @@ implicit GCC."
(build-system (gnu-build-system-with-compiler gcc-5))
(native-inputs
`(("no-float128" ,no-float128)
,@(package-native-inputs starpu)))
("gfortran" ,gfortran-sans-libstdc++)
,@(alist-delete "gfortran" (package-native-inputs starpu))))
(inputs
`(("cuda" ,cuda)
,@(package-inputs starpu)))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment