Commit 8a5b1603 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

starpu-cuda: Keep only one compiler in the inputs.

Previously, both GCC 7 and GCC 5 would be among the inputs.  Thus, both
libstdc++ versions would show up in CPLUS_INCLUDE_PATH, followed by
libc.  Consequently, #include_next logic would fail: <math.h> from
GCC 7's libstdc++ would be picked up instead of <math.h> from libc.  The
end result was a build failure like this:

  In file included from /gnu/store/…-gcc-7.5.0/include/c++/stdlib.h:36:0,
		   from ../include/starpu.h:22,
		   from core/simgrid_cpp.cpp:19:
  /gnu/store/6wn346cbw1mh6264v426pwj2klgvxr0z-gcc-5.5.0/include/c++/cstdlib:118:11: error: ‘::div_t’ has not been declared
     using ::div_t;
	     ^

Notice the mixture of GCC 7 and GCC 5 libstdc++ headers.

The regression is presumably a consequence of Guix commit
2073b55e6b964cb8ca15e8c74cb32dac00f05f0d, which switched by to
CPLUS_INCLUDE_PATH & co. instead of CPATH.

* inria/tainted/storm.scm (gnu-build-system-with-compiler): New
procedure.
(starpu+cuda)[build-system]: New field.
[native-inputs]: Remove GCC-5.
parent 161a5f2f
......@@ -4,23 +4,47 @@
;;; Note that this module provides packages that depend on "non-free"
;;; software, which denies users the ability to study and modify it.
;;;
;;; Copyright © 2018, 2019 Inria
;;; Copyright © 2018, 2019, 2020 Inria
(define-module (inria tainted storm)
#:use-module (guix)
#:use-module (gnu packages gcc)
#:use-module (inria storm)
#:use-module (non-free cuda))
#:use-module (non-free cuda)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
#:use-module (ice-9 match))
(define (gnu-build-system-with-compiler compiler)
"Return a variant of GNU-BUILD-SYSTEM that uses COMPILER instead of the
implicit GCC."
(define lower
(build-system-lower gnu-build-system))
(define (lower* . args)
(let ((lowered (apply lower args)))
(bag
(inherit lowered)
(build-inputs (map (match-lambda
(("gcc" _ rest ...)
`("compiler" ,compiler ,@rest))
(input input))
(bag-build-inputs lowered))))))
(build-system
(inherit gnu-build-system)
(lower lower*)))
(define-public starpu+cuda
(package
(inherit starpu)
(name "starpu-cuda")
;; "host_config.h" in 'cuda-toolkit' says "gcc versions later than 5 are
;; not supported". Thus, provide GCC 5.x.
(build-system (gnu-build-system-with-compiler gcc-5))
(native-inputs
;; "host_config.h" in 'cuda-toolkit' says "gcc versions later than 5 are
;; not supported". Thus, provide GCC 5.x.
`(("gcc-5" ,gcc-5)
("no-float128" ,no-float128)
`(("no-float128" ,no-float128)
,@(package-native-inputs starpu)))
(inputs
`(("cuda" ,cuda)
......
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