[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gfortran seems to require gcc-toolchain

From: Marius Bakke
Subject: Re: gfortran seems to require gcc-toolchain
Date: Sun, 10 Nov 2019 20:50:16 +0100
User-agent: Notmuch/0.29.1 ( Emacs/26.3 (x86_64-pc-linux-gnu)

Efraim Flashner <address@hidden> writes:

> On Sun, Nov 10, 2019 at 12:03:37AM +0100, Marius Bakke wrote:
>> Konrad Hinsen <address@hidden> writes:
>> > Hi Guix,
>> >
>> > I am trying to recompile old Fortran code under Guix. I made an (pure)
>> > environment containing "gfortran" plus a few required tools (make etc.),
>> > but found that every Fortran compilation stops with an error message
>> > complaining about "as" missing. Installing gcc-toolchain fixes the
>> > problem.
>> 'as' is part of Binutils, you don't need the entire toolchain.
>> That said, there are various other workarounds in Guix due to GCC
>> (and apparently gfortran) lacking an absolute reference to 'as'.
>> Can you try the following patch and see if it works for your case?
> Unfortunately the diff is empty. Unless you were implying Guix is
> perfect ;D

Lol, whoops.  Let me try this again:

diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index bda6a2b48a..e01beaca86 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -623,10 +623,14 @@ as the 'native-search-paths' field."
                                                 (srfi srfi-26))
                                                ,@(package-arguments gcc))
        ((#:configure-flags flags)
-        `(cons (string-append "--enable-languages="
-                              ,(string-join languages ","))
-               (remove (cut string-match "--enable-languages.*" <>)
-                       ,flags)))
+        `(append (list (string-append "--enable-languages="
+                                      ,(string-join languages ","))
+                       ;; TODO: Move to 'gcc' in the next rebuild cycle.
+                       (string-append "--with-as="
+                                      (assoc-ref %build-inputs "binutils")
+                                      "/bin/as"))
+                 (remove (cut string-match "--enable-languages.*" <>)
+                         ,flags)))
        ((#:phases phases)
         `(modify-phases ,phases
            (add-after 'install 'remove-broken-or-conflicting-files

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]