* gfortran seems to require gcc-toolchain @ 2019-11-08 16:09 Konrad Hinsen 2019-11-09 23:03 ` Marius Bakke 0 siblings, 1 reply; 15+ messages in thread From: Konrad Hinsen @ 2019-11-08 16:09 UTC (permalink / raw) To: help-guix 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. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: gfortran seems to require gcc-toolchain 2019-11-08 16:09 gfortran seems to require gcc-toolchain Konrad Hinsen @ 2019-11-09 23:03 ` Marius Bakke 2019-11-10 7:14 ` Efraim Flashner 2019-11-11 18:08 ` Konrad Hinsen 0 siblings, 2 replies; 15+ messages in thread From: Marius Bakke @ 2019-11-09 23:03 UTC (permalink / raw) To: Konrad Hinsen, help-guix [-- Attachment #1.1: Type: text/plain, Size: 629 bytes --] Konrad Hinsen <konrad.hinsen@fastmail.net> 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? [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1.2: diff --] [-- Type: text/x-patch, Size: 0 bytes --] [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: gfortran seems to require gcc-toolchain 2019-11-09 23:03 ` Marius Bakke @ 2019-11-10 7:14 ` Efraim Flashner 2019-11-10 19:50 ` Marius Bakke 2019-11-11 18:08 ` Konrad Hinsen 1 sibling, 1 reply; 15+ messages in thread From: Efraim Flashner @ 2019-11-10 7:14 UTC (permalink / raw) To: Marius Bakke; +Cc: help-guix [-- Attachment #1: Type: text/plain, Size: 1041 bytes --] On Sun, Nov 10, 2019 at 12:03:37AM +0100, Marius Bakke wrote: > Konrad Hinsen <konrad.hinsen@fastmail.net> 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 <efraim@flashner.co.il> אפרים פלשנר GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: gfortran seems to require gcc-toolchain 2019-11-10 7:14 ` Efraim Flashner @ 2019-11-10 19:50 ` Marius Bakke 0 siblings, 0 replies; 15+ messages in thread From: Marius Bakke @ 2019-11-10 19:50 UTC (permalink / raw) To: Efraim Flashner; +Cc: help-guix [-- Attachment #1.1: Type: text/plain, Size: 941 bytes --] Efraim Flashner <efraim@flashner.co.il> writes: > On Sun, Nov 10, 2019 at 12:03:37AM +0100, Marius Bakke wrote: >> Konrad Hinsen <konrad.hinsen@fastmail.net> 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: [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1.2: diff --] [-- Type: text/x-patch, Size: 1216 bytes --] 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 #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: gfortran seems to require gcc-toolchain 2019-11-09 23:03 ` Marius Bakke 2019-11-10 7:14 ` Efraim Flashner @ 2019-11-11 18:08 ` Konrad Hinsen 2019-11-15 17:41 ` Marius Bakke 1 sibling, 1 reply; 15+ messages in thread From: Konrad Hinsen @ 2019-11-11 18:08 UTC (permalink / raw) To: Marius Bakke, help-guix 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 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: gfortran seems to require gcc-toolchain 2019-11-11 18:08 ` Konrad Hinsen @ 2019-11-15 17:41 ` Marius Bakke 2019-11-16 8:44 ` Konrad Hinsen 0 siblings, 1 reply; 15+ messages in thread From: Marius Bakke @ 2019-11-15 17:41 UTC (permalink / raw) To: Konrad Hinsen, help-guix [-- Attachment #1: Type: text/plain, Size: 732 bytes --] Konrad Hinsen <konrad.hinsen@fastmail.net> 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? [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: gfortran seems to require gcc-toolchain 2019-11-15 17:41 ` Marius Bakke @ 2019-11-16 8:44 ` Konrad Hinsen 2019-11-18 10:40 ` zimoun 2019-11-18 10:43 ` Konrad Hinsen 0 siblings, 2 replies; 15+ messages in thread From: Konrad Hinsen @ 2019-11-16 8:44 UTC (permalink / raw) To: Marius Bakke, help-guix 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. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: gfortran seems to require gcc-toolchain 2019-11-16 8:44 ` Konrad Hinsen @ 2019-11-18 10:40 ` zimoun 2019-11-18 12:09 ` Konrad Hinsen 2019-11-18 10:43 ` Konrad Hinsen 1 sibling, 1 reply; 15+ messages in thread From: zimoun @ 2019-11-18 10:40 UTC (permalink / raw) To: Konrad Hinsen; +Cc: help-guix 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 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: gfortran seems to require gcc-toolchain 2019-11-18 10:40 ` zimoun @ 2019-11-18 12:09 ` Konrad Hinsen 2019-11-19 21:26 ` Marius Bakke 2019-11-30 14:52 ` gfortran seems to require gcc-toolchain Konrad Hinsen 0 siblings, 2 replies; 15+ messages in thread From: Konrad Hinsen @ 2019-11-18 12:09 UTC (permalink / raw) To: zimoun; +Cc: help-guix 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. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: gfortran seems to require gcc-toolchain 2019-11-18 12:09 ` Konrad Hinsen @ 2019-11-19 21:26 ` Marius Bakke 2019-11-19 21:28 ` brettg 2019-11-30 14:52 ` gfortran seems to require gcc-toolchain Konrad Hinsen 1 sibling, 1 reply; 15+ messages in thread From: Marius Bakke @ 2019-11-19 21:26 UTC (permalink / raw) To: Konrad Hinsen, zimoun; +Cc: help-guix [-- Attachment #1: Type: text/plain, Size: 305 bytes --] Konrad Hinsen <konrad.hinsen@fastmail.net> 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. :-) [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: gfortran seems to require gcc-toolchain 2019-11-19 21:26 ` Marius Bakke @ 2019-11-19 21:28 ` brettg 2019-11-20 4:37 ` John Soo 0 siblings, 1 reply; 15+ messages in thread From: brettg @ 2019-11-19 21:28 UTC (permalink / raw) To: Marius Bakke; +Cc: Help-Guix, help-guix On 19.11.2019 22:26, Marius Bakke wrote: > Konrad Hinsen <konrad.hinsen@fastmail.net> 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))))) ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: gfortran seems to require gcc-toolchain 2019-11-19 21:28 ` brettg @ 2019-11-20 4:37 ` John Soo 2019-11-20 5:48 ` ML on Guix (Was: Re: gfortran seems to require gcc-toolchain) brettg 0 siblings, 1 reply; 15+ messages in thread From: John Soo @ 2019-11-20 4:37 UTC (permalink / raw) To: brettg; +Cc: help-guix, Help-Guix 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 ^ permalink raw reply [flat|nested] 15+ messages in thread
* ML on Guix (Was: Re: gfortran seems to require gcc-toolchain) 2019-11-20 4:37 ` John Soo @ 2019-11-20 5:48 ` brettg 0 siblings, 0 replies; 15+ messages in thread From: brettg @ 2019-11-20 5:48 UTC (permalink / raw) To: John Soo; +Cc: help-guix, Help-Guix 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 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: gfortran seems to require gcc-toolchain 2019-11-18 12:09 ` Konrad Hinsen 2019-11-19 21:26 ` Marius Bakke @ 2019-11-30 14:52 ` Konrad Hinsen 1 sibling, 0 replies; 15+ messages in thread From: Konrad Hinsen @ 2019-11-30 14:52 UTC (permalink / raw) To: zimoun; +Cc: help-guix Konrad Hinsen <konrad.hinsen@fastmail.net> 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 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: gfortran seems to require gcc-toolchain 2019-11-16 8:44 ` Konrad Hinsen 2019-11-18 10:40 ` zimoun @ 2019-11-18 10:43 ` Konrad Hinsen 1 sibling, 0 replies; 15+ messages in thread From: Konrad Hinsen @ 2019-11-18 10:43 UTC (permalink / raw) To: Marius Bakke, help-guix 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. ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2019-11-30 14:52 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-11-08 16:09 gfortran seems to require gcc-toolchain Konrad Hinsen 2019-11-09 23:03 ` Marius Bakke 2019-11-10 7:14 ` Efraim Flashner 2019-11-10 19:50 ` Marius Bakke 2019-11-11 18:08 ` Konrad Hinsen 2019-11-15 17:41 ` Marius Bakke 2019-11-16 8:44 ` Konrad Hinsen 2019-11-18 10:40 ` zimoun 2019-11-18 12:09 ` Konrad Hinsen 2019-11-19 21:26 ` Marius Bakke 2019-11-19 21:28 ` brettg 2019-11-20 4:37 ` John Soo 2019-11-20 5:48 ` ML on Guix (Was: Re: gfortran seems to require gcc-toolchain) brettg 2019-11-30 14:52 ` gfortran seems to require gcc-toolchain Konrad Hinsen 2019-11-18 10:43 ` Konrad Hinsen
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.