Nikita Karetnikov <[email protected]> skribis:
> I’m trying to package APL, which requires LAPACK, which requires
> Fortran.
Cool.
> Here’s my attempt to add the last one:
>
> (define-public gfortran-4.8
> (package (inherit gcc-4.8)
> (name "gfortran")
> (arguments `(#:configure-flags '("--enable-languages=fortran")))))
>
> I get the following error while trying to build it:
>
> The directory that should contain system headers does not exist:
> /usr/include
Yes, the problem is that the your ‘arguments’ field above completely
overrides that of ‘gcc-4.8’.
Instead, what should do is preserve the arguments; the value associated
with #:configure-flags should be changed to replace any
--enable-languages=.* flag with yours. See ‘gcc-boot0’ in base.scm for
how to do that.
Alternately, you could turn the current ‘gcc-4.8’ definition into a
‘make-gcc-4.8’ procedure like this:
(define* (make-gcc-4.8 #:key languages)
(package
...
#:configure-flags ... ,(string-join languages ",")
...))
(define gcc-4.8
(make-gcc-4.8 #:languages '("c" "c++")))
That would probably be easier to work with.
HTH,
Ludo’.