Re: gfortran seems to require gcc-toolchain
Konrad Hinsen writes: >> Maybe a "gfortran-toolchain" package with all the battery included? > > That sounds like a very good idea! And I even volunteer to > implement it. Except if someone comes up with a better > solution of course. Here it comes: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=38436 Cheers, Konrad
ML on Guix (Was: Re: gfortran seems to require gcc-toolchain)
On 20.11.2019 05:37, John Soo wrote: Hi Brett, A touch off-topic. That is what I do, like in my mlton package. Do you have urweb packaged by any chance, too? It would really save me the trouble! - John John, I am familiar with it but I do not have it packaged. If you would like I might be able to see if I can do that. I really would like to get the ML situation on Guix spiffed up but there are some obstacles that need to be addressed (namely around bootstrapping, of course.) You can reach out to me off list, or on Telegram @brettmg. Best, Brett Gilio https://git.sr.ht/~brettgilio
Re: gfortran seems to require gcc-toolchain
Hi Brett, A touch off-topic. > That is what I do, like in my mlton package. Do you have urweb packaged by any chance, too? It would really save me the trouble! - John
Re: gfortran seems to require gcc-toolchain
On 19.11.2019 22:26, Marius Bakke wrote: Konrad Hinsen writes: Hi Simon, Maybe a "gfortran-toolchain" package with all the battery included? That sounds like a very good idea! And I even volunteer to implement it. Except if someone comes up with a better solution of course. Sounds great to me. :-) That is what I do, like in my mlton package. (define-public mlton (package (inherit mlton-no-gcc) (name "mlton") (propagated-inputs `(("gcc-toolchain" ,gcc-toolchain) ,@(package-propagated-inputs mlton-no-gcc)
Re: gfortran seems to require gcc-toolchain
Konrad Hinsen writes: > Hi Simon, > >> Maybe a "gfortran-toolchain" package with all the battery included? > > That sounds like a very good idea! And I even volunteer to > implement it. Except if someone comes up with a better > solution of course. Sounds great to me. :-) signature.asc Description: PGP signature
Re: gfortran seems to require gcc-toolchain
Hi Simon, > Maybe a "gfortran-toolchain" package with all the battery included? That sounds like a very good idea! And I even volunteer to implement it. Except if someone comes up with a better solution of course. Cheers, Konrad.
Re: gfortran seems to require gcc-toolchain
Hi Marius, >>> With your patch, I can compile Fortran programs in an environment >>> containing nothing but "gfortran", so I'd say it works! Not quite, in fact. What I had tested successfully is compiling a Fortran file to a .o file. Linking .o files into an executable still fails: /gnu/store/wzia23i6ngqaaz0kd2il7s30758dxvca-profile/bin/ld: cannot find crt1.o: No such file or directory I had to add glibc to my environment to get an executable. So it seems that compiling Fortran programs requires gfortran + binutils + glibc. Cheers, Konrad.
Re: gfortran seems to require gcc-toolchain
Hi Marius and Konrad, IMHO, the average Fortran programmers do not play with "as" and they want "Just Works(tm)" as expected, because they are mainly programming Scientific stuff -- I am not sure the average Fortran programmers clearly understand what the program "as" does. Maybe a "gfortran-toolchain" package with all the battery included? All the best, simon
Re: gfortran seems to require gcc-toolchain
Hi Marius, >> With your patch, I can compile Fortran programs in an environment >> containing nothing but "gfortran", so I'd say it works! > > On second though, the patch increases the size of 'gcc' from 238.0 MiB > to 291.5 MiB. It may also make it difficult to use a different 'as' > executable. > > So I'm not sure whether the added convenience is worth it. I'd prefer a compiler that works at 291.5 MiB to a compiler that doesn't work at 238.0 MiB. When you know how to fix the problem (by installing binutils), it's perhaps just a convenience. If you don't know, it's a show-stopper. I see the point of wanting to use a different 'as', but are there any concrete alternatives in Guix that someone might wish to substitute? Personally I have never cared much about 'as'. It's a necessary tool but also a very boring and predictable one. I don't see what I could gain by replacing it. Cheers, Konrad.
Re: gfortran seems to require gcc-toolchain
Konrad Hinsen writes: > Hi Marius, > >> '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? > > Thanks for looking into this! > > With your patch, I can compile Fortran programs in an environment > containing nothing but "gfortran", so I'd say it works! On second though, the patch increases the size of 'gcc' from 238.0 MiB to 291.5 MiB. It may also make it difficult to use a different 'as' executable. So I'm not sure whether the added convenience is worth it. Thoughts? signature.asc Description: PGP signature
Re: gfortran seems to require gcc-toolchain
Hi Marius, > '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? Thanks for looking into this! With your patch, I can compile Fortran programs in an environment containing nothing but "gfortran", so I'd say it works! Thanks, Konrad
Re: gfortran seems to require gcc-toolchain
Efraim Flashner writes: > On Sun, Nov 10, 2019 at 12:03:37AM +0100, Marius Bakke wrote: >> Konrad Hinsen 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 signature.asc Description: PGP signature
Re: gfortran seems to require gcc-toolchain
On Sun, Nov 10, 2019 at 12:03:37AM +0100, Marius Bakke wrote: > Konrad Hinsen 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 -- Efraim Flashner אפרים פלשנר GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted signature.asc Description: PGP signature
Re: gfortran seems to require gcc-toolchain
Konrad Hinsen 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? signature.asc Description: PGP signature
gfortran seems to require gcc-toolchain
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. If gfortran cannot be used without gcc-toolchain, shouldn't gcc-toolchain be a propagated input of gfortran? Cheers, Konrad.