[PATCH] gnu; Add gfortran-toolchain

  • Done
  • quality assurance status badge
Details
3 participants
  • Jonathan Brielmaier
  • Konrad Hinsen
  • Ludovic Courtès
Owner
unassigned
Submitted by
Konrad Hinsen
Severity
normal
K
K
Konrad Hinsen wrote on 29 Nov 2019 18:46
(address . guix-patches@gnu.org)
m1lfrx5sga.fsf@khs-macbook.home
* gnu/packages/commencement.scm: (gfortran-toolchain): New variable.
* gnu/packages/commencement.scm: (make-gcc-toolchain): Added argument "language"
---
gnu/packages/commencement.scm | 52 +++++++++++++++++++++++------------
1 file changed, 34 insertions(+), 18 deletions(-)

Toggle diff (103 lines)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 6a382c7517..8c57af749e 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2515,16 +2515,23 @@ COREUTILS-FINAL vs. COREUTILS, etc."
;;; GCC toolchain.
;;;
+;;; Toolchain packages combine everything needed for compilation,
+;;; and ensure that ld-wrapper comes before binutils' ld in the
+;;; user's profile, as otherwise dynamic library lookup would not
+;;; work correctly.
+
;; Using the following procedure, a gcc toolchain targeting glibc-2.27 can be
;; instantiated like this:
;;
;; (define-public gcc-glibc-2.27-toolchain
;; (make-gcc-toolchain gcc glibc-2.27))
-(define* (make-gcc-toolchain gcc
- #:optional
- (libc #f))
- "Return a complete toolchain for GCC. If LIBC is specified, target that libc."
+(define* (make-gcc-toolchain language
+ gcc
+ #:optional
+ (libc #f))
+ "Return a complete toolchain for GCC. If LIBC is specified, target that libc.
+ Insert LANGUAGE into the documentation strings."
(let ((gcc (if libc (make-gcc-libc gcc libc) gcc))
(libc (if libc libc glibc-final)))
(package
@@ -2557,17 +2564,19 @@ COREUTILS-FINAL vs. COREUTILS, etc."
(search-paths (package-search-paths gcc))
(license (package-license gcc))
- (synopsis "Complete GCC tool chain for C/C++ development")
+ (synopsis (format #f
+ "Complete GCC tool chain for ~a development"
+ language))
(description
- "This package provides a complete GCC tool chain for C/C++ development to
-be installed in user profiles. This includes GCC, as well as libc (headers
-an d binaries, plus debugging symbols in the @code{debug} output), and Binutils.")
+ (format
+ #f
+ "This package provides a complete GCC tool chain for ~a development to
+be installed in user profiles. This includes GCC, as well as libc (headers
+and binaries, plus debugging symbols in the @code{debug} output), and Binutils."
+ language))
(home-page "https://gcc.gnu.org/")
(outputs '("out" "debug" "static"))
- ;; The main raison d'être of this "meta-package" is (1) to conveniently
- ;; install everything that we need, and (2) to make sure ld-wrapper comes
- ;; before Binutils' ld in the user's profile.
(inputs `(("gcc" ,gcc)
("ld-wrapper" ,(car (assoc-ref %final-inputs "ld-wrapper")))
("binutils" ,binutils-final)
@@ -2576,27 +2585,34 @@ an d binaries, plus debugging symbols in the @code{debug} output), and Binutils
("libc-static" ,libc "static"))))))
(define-public gcc-toolchain
- (make-gcc-toolchain gcc-final))
+ (make-gcc-toolchain "C/C++" gcc-final))
(define-public gcc-toolchain-4.8
- (make-gcc-toolchain gcc-4.8))
+ (make-gcc-toolchain "C/C++" gcc-4.8))
(define-public gcc-toolchain-4.9
- (make-gcc-toolchain gcc-4.9))
+ (make-gcc-toolchain "C/C++" gcc-4.9))
(define-public gcc-toolchain-5
- (make-gcc-toolchain gcc-5))
+ (make-gcc-toolchain "C/C++" gcc-5))
(define-public gcc-toolchain-6
- (make-gcc-toolchain gcc-6))
+ (make-gcc-toolchain "C/C++" gcc-6))
(define-public gcc-toolchain-7
gcc-toolchain)
(define-public gcc-toolchain-8
- (make-gcc-toolchain gcc-8))
+ (make-gcc-toolchain "C/C++" gcc-8))
(define-public gcc-toolchain-9
- (make-gcc-toolchain gcc-9))
+ (make-gcc-toolchain "C/C++" gcc-9))
+
+;; Provide the toolchain package only for the version of gfortran
+;; that is used by Guix intenally to build Fortran libraries,
+;; because combining code compiled with different versions can
+;; cause problems.
+(define-public gfortran-toolchain
+ (make-gcc-toolchain "Fortran" gfortran))
;;; commencement.scm ends here
--
2.24.0
K
K
Konrad Hinsen wrote on 2 Dec 2019 16:01
[PATCH] gnu: Add gfortran-toolchain
(address . 38436@debbugs.gnu.org)
m1a78arcu8.fsf@fastmail.net
* gnu/packages/commencement.scm: (gfortran-toolchain): New variable.
* gnu/packages/commencement.scm: (make-gcc-toolchain): Added argument "language"
---
gnu/packages/commencement.scm | 52 +++++++++++++++++++++++------------
1 file changed, 34 insertions(+), 18 deletions(-)

Toggle diff (104 lines)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 6a382c7517..8c57af749e 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2515,16 +2515,23 @@ COREUTILS-FINAL vs. COREUTILS, etc."
;;; GCC toolchain.
;;;

+;;; Toolchain packages combine everything needed for compilation,
+;;; and ensure that ld-wrapper comes before binutils' ld in the
+;;; user's profile, as otherwise dynamic library lookup would not
+;;; work correctly.
+
;; Using the following procedure, a gcc toolchain targeting glibc-2.27 can be
;; instantiated like this:
;;
;; (define-public gcc-glibc-2.27-toolchain
;; (make-gcc-toolchain gcc glibc-2.27))

-(define* (make-gcc-toolchain gcc
- #:optional
- (libc #f))
- "Return a complete toolchain for GCC. If LIBC is specified, target that libc."
+(define* (make-gcc-toolchain language
+ gcc
+ #:optional
+ (libc #f))
+ "Return a complete toolchain for GCC. If LIBC is specified, target that libc.
+ Insert LANGUAGE into the documentation strings."
(let ((gcc (if libc (make-gcc-libc gcc libc) gcc))
(libc (if libc libc glibc-final)))
(package
@@ -2557,17 +2564,19 @@ COREUTILS-FINAL vs. COREUTILS, etc."
(search-paths (package-search-paths gcc))

(license (package-license gcc))
- (synopsis "Complete GCC tool chain for C/C++ development")
+ (synopsis (format #f
+ "Complete GCC tool chain for ~a development"
+ language))
(description
- "This package provides a complete GCC tool chain for C/C++ development to
-be installed in user profiles. This includes GCC, as well as libc (headers
-an d binaries, plus debugging symbols in the @code{debug} output), and Binutils.")
+ (format
+ #f
+ "This package provides a complete GCC tool chain for ~a development to
+be installed in user profiles. This includes GCC, as well as libc (headers
+and binaries, plus debugging symbols in the @code{debug} output), and Binutils."
+ language))
(home-page "https://gcc.gnu.org/")
(outputs '("out" "debug" "static"))

- ;; The main raison d'être of this "meta-package" is (1) to conveniently
- ;; install everything that we need, and (2) to make sure ld-wrapper comes
- ;; before Binutils' ld in the user's profile.
(inputs `(("gcc" ,gcc)
("ld-wrapper" ,(car (assoc-ref %final-inputs "ld-wrapper")))
("binutils" ,binutils-final)
@@ -2576,27 +2585,34 @@ an d binaries, plus debugging symbols in the @code{debug} output),
and Binutils
("libc-static" ,libc "static"))))))

(define-public gcc-toolchain
- (make-gcc-toolchain gcc-final))
+ (make-gcc-toolchain "C/C++" gcc-final))

(define-public gcc-toolchain-4.8
- (make-gcc-toolchain gcc-4.8))
+ (make-gcc-toolchain "C/C++" gcc-4.8))

(define-public gcc-toolchain-4.9
- (make-gcc-toolchain gcc-4.9))
+ (make-gcc-toolchain "C/C++" gcc-4.9))

(define-public gcc-toolchain-5
- (make-gcc-toolchain gcc-5))
+ (make-gcc-toolchain "C/C++" gcc-5))

(define-public gcc-toolchain-6
- (make-gcc-toolchain gcc-6))
+ (make-gcc-toolchain "C/C++" gcc-6))

(define-public gcc-toolchain-7
gcc-toolchain)

(define-public gcc-toolchain-8
- (make-gcc-toolchain gcc-8))
+ (make-gcc-toolchain "C/C++" gcc-8))

(define-public gcc-toolchain-9
- (make-gcc-toolchain gcc-9))
+ (make-gcc-toolchain "C/C++" gcc-9))
+
+;; Provide the toolchain package only for the version of gfortran
+;; that is used by Guix intenally to build Fortran libraries,
+;; because combining code compiled with different versions can
+;; cause problems.
+(define-public gfortran-toolchain
+ (make-gcc-toolchain "Fortran" gfortran))

;;; commencement.scm ends here
--
2.24.0
L
L
Ludovic Courtès wrote on 9 Dec 2019 15:30
(name . Konrad Hinsen)(address . konrad.hinsen@fastmail.net)(address . 38436@debbugs.gnu.org)
87zhg1efld.fsf@gnu.org
Hi Konrad,

Konrad Hinsen <konrad.hinsen@fastmail.net> skribis:

Toggle quote (3 lines)
> * gnu/packages/commencement.scm: (gfortran-toolchain): New variable.
> * gnu/packages/commencement.scm: (make-gcc-toolchain): Added argument "language"

This LGTM, though I’d have a minor request:

Toggle quote (15 lines)
> - (synopsis "Complete GCC tool chain for C/C++ development")
> + (synopsis (format #f
> + "Complete GCC tool chain for ~a development"
> + language))
> (description
> - "This package provides a complete GCC tool chain for C/C++ development to
> -be installed in user profiles. This includes GCC, as well as libc (headers
> -an d binaries, plus debugging symbols in the @code{debug} output), and Binutils.")
> + (format
> + #f
> + "This package provides a complete GCC tool chain for ~a development to
> +be installed in user profiles. This includes GCC, as well as libc (headers
> +and binaries, plus debugging symbols in the @code{debug} output), and Binutils."
> + language))

There’s this weird requirement that for the sake of i18n, we must not
construct synopses/descriptions like this:


I’d suggest something as shown below.

Could you update the patch along those lines?

Thanks,
Ludo’.
Toggle diff (27 lines)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 68030376fc..00de771bc4 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2523,8 +2523,12 @@ COREUTILS-FINAL vs. COREUTILS, etc."
;; (define-public gcc-glibc-2.27-toolchain
;; (make-gcc-toolchain gcc glibc-2.27))
-(define* (make-gcc-toolchain gcc
+(define* (make-gcc-toolchain language gcc
#:optional
+ ;; Note: Keep the synopsis literal string here so
+ ;; that xgettext "sees" it.
+ (synopsis
+ "Complete GCC tool chain for C/C++ development")
(libc #f))
"Return a complete toolchain for GCC. If LIBC is specified, target that libc."
(let ((gcc (if libc (make-gcc-libc gcc libc) gcc))
@@ -2559,7 +2563,7 @@ COREUTILS-FINAL vs. COREUTILS, etc."
(search-paths (package-search-paths gcc))
(license (package-license gcc))
- (synopsis "Complete GCC tool chain for C/C++ development")
+ (synopsis synopsis)
(description
"This package provides a complete GCC tool chain for C/C++ development to
be installed in user profiles. This includes GCC, as well as libc (headers
K
K
Konrad Hinsen wrote on 10 Dec 2019 14:11
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 38436@debbugs.gnu.org)
m18snkiavr.fsf@khs-macbook.home
Hi Ludo,

Toggle quote (5 lines)
> There’s this weird requirement that for the sake of i18n, we must not
> construct synopses/descriptions like this:
>
> https://guix.gnu.org/manual/devel/en/html_node/Synopses-and-Descriptions.html

Is that a specific rule for Guix? GNU gettext allows format strings,
and its manual refers to


for format string syntax in Scheme. For Guile specifically,
it refers to (ice-9 format).

Cheers,
Konrad
L
L
Ludovic Courtès wrote on 10 Dec 2019 15:38
(name . Konrad Hinsen)(address . konrad.hinsen@fastmail.net)(address . 38436@debbugs.gnu.org)
87pngwxn3c.fsf@gnu.org
Hi,

Konrad Hinsen <konrad.hinsen@fastmail.net> skribis:

Toggle quote (7 lines)
>> There’s this weird requirement that for the sake of i18n, we must not
>> construct synopses/descriptions like this:
>>
>> https://guix.gnu.org/manual/devel/en/html_node/Synopses-and-Descriptions.html
>
> Is that a specific rule for Guix?

Specific to the ‘guix-package’ domain, even.

Concretely, the idea is that <package> objects carry the untranslated
English-language synopsis and description. This is useful for things
like ‘guix search’ or for web page generators, because they can query
translation explicitly when they need it.

We could allow constructed strings in there, like this:

(package
;; …
(synopsis (format #f (G_ "This is a ~a compiler") "C")))

But in that case, we’d have to perform translation right in the ‘G_’
call, and thus <package> would end up carrying a translated string.

So far we’ve managed to avoid that, it’s a constraint, but hopefully one
we can live with.

I hope that makes sense!

Ludo’.
K
K
Konrad Hinsen wrote on 11 Dec 2019 11:30
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 38436@debbugs.gnu.org)
m136dri28m.fsf@fastmail.net
Hi Ludo,

Toggle quote (4 lines)
>> Is that a specific rule for Guix?
>
> Specific to the ‘guix-package’ domain, even.

Thanks for the explanation! That all makes sense, it's just not very
obvious.

I'll send a revised patch in which all synopses and descriptions are
literal string.

Cheers,
Konrad.
K
K
Konrad Hinsen wrote on 11 Dec 2019 11:30
[PATCH] gnu: Add gfortran-toolchain
(address . 38436@debbugs.gnu.org)
m1zhfzgnn5.fsf@fastmail.net
* gnu/packages/commencement.scm: (gfortran-toolchain): New variable.
* gnu/packages/commencement.scm: (make-gcc-toolchain): Added argument "language"
---
gnu/packages/commencement.scm | 54 ++++++++++++++++++++++++-----------
1 file changed, 38 insertions(+), 16 deletions(-)

Toggle diff (84 lines)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 68030376fc..e147836fc5 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2517,16 +2517,29 @@ COREUTILS-FINAL vs. COREUTILS, etc."
;;; GCC toolchain.
;;;
-;; Using the following procedure, a gcc toolchain targeting glibc-2.27 can be
-;; instantiated like this:
-;;
-;; (define-public gcc-glibc-2.27-toolchain
-;; (make-gcc-toolchain gcc glibc-2.27))
+;;; Toolchain packages combine everything needed for compilation,
+;;; and ensure that ld-wrapper comes before binutils' ld in the
+;;; user's profile, as otherwise dynamic library lookup would not
+;;; work correctly.
+
+;; The synopsis and description must be literal strings (not constructed
+;; using string-append or format) to make them translatable.
+(define gcc-synopsis
+ "Complete GCC tool chain for C/C++ development")
+(define gcc-description
+ "This package provides a complete GCC tool chain for C/C++ development to
+be installed in user profiles. This includes GCC, as well as libc (headers
+and binaries, plus debugging symbols in the @code{debug} output), and
+binutils.")
(define* (make-gcc-toolchain gcc
- #:optional
- (libc #f))
- "Return a complete toolchain for GCC. If LIBC is specified, target that libc."
+ #:optional
+ (synopsis gcc-synopsis)
+ (description gcc-description)
+ (libc #f))
+ "Return a complete toolchain for GCC. If SYNOPSIS and/or
+DESCRIPTION are given, use them for documentation instead of the
+defaults for the C/C++ toolchain. If LIBC is specified, target that libc."
(let ((gcc (if libc (make-gcc-libc gcc libc) gcc))
(libc (if libc libc glibc-final)))
(package
@@ -2559,17 +2572,11 @@ COREUTILS-FINAL vs. COREUTILS, etc."
(search-paths (package-search-paths gcc))
(license (package-license gcc))
- (synopsis "Complete GCC tool chain for C/C++ development")
- (description
- "This package provides a complete GCC tool chain for C/C++ development to
-be installed in user profiles. This includes GCC, as well as libc (headers
-an d binaries, plus debugging symbols in the @code{debug} output), and Binutils.")
+ (synopsis synopsis)
+ (description description)
(home-page "https://gcc.gnu.org/")
(outputs '("out" "debug" "static"))
- ;; The main raison d'être of this "meta-package" is (1) to conveniently
- ;; install everything that we need, and (2) to make sure ld-wrapper comes
- ;; before Binutils' ld in the user's profile.
(inputs `(("gcc" ,gcc)
("ld-wrapper" ,(car (assoc-ref %final-inputs "ld-wrapper")))
("binutils" ,binutils-final)
@@ -2601,4 +2608,19 @@ an d binaries, plus debugging symbols in the @code{debug} output), and Binutils
(define-public gcc-toolchain-9
(make-gcc-toolchain gcc-9))
+;; Provide the Fortran toolchain package only for the version of gfortran that
+;; is used by Guix intenally to build Fortran libraries, because combining
+;; code compiled with different versions can cause problems.
+
+(define gfortran-synopsis
+ "Complete GCC tool chain for Fortran development")
+(define gfortran-description
+ "This package provides a complete GCC tool chain for Fortran development to
+be installed in user profiles. This includes GCC, as well as libc (headers
+and binaries, plus debugging symbols in the @code{debug} output), and
+binutils.")
+
+(define-public gfortran-toolchain
+ (make-gcc-toolchain gfortran gfortran-synopsis gfortran-description))
+
;;; commencement.scm ends here
--
2.24.0
L
L
Ludovic Courtès wrote on 11 Dec 2019 12:12
(name . Konrad Hinsen)(address . konrad.hinsen@fastmail.net)(address . 38436@debbugs.gnu.org)
87y2vjjeuz.fsf@gnu.org
Hi Konrad,

Konrad Hinsen <konrad.hinsen@fastmail.net> skribis:

Toggle quote (3 lines)
> * gnu/packages/commencement.scm: (gfortran-toolchain): New variable.
> * gnu/packages/commencement.scm: (make-gcc-toolchain): Added argument "language"

We’re almost there. :-)

Toggle quote (18 lines)
> +;; The synopsis and description must be literal strings (not constructed
> +;; using string-append or format) to make them translatable.
> +(define gcc-synopsis
> + "Complete GCC tool chain for C/C++ development")
> +(define gcc-description
> + "This package provides a complete GCC tool chain for C/C++ development to
> +be installed in user profiles. This includes GCC, as well as libc (headers
> +and binaries, plus debugging symbols in the @code{debug} output), and
> +binutils.")
>
> (define* (make-gcc-toolchain gcc
> - #:optional
> - (libc #f))
> - "Return a complete toolchain for GCC. If LIBC is specified, target that libc."
> + #:optional
> + (synopsis gcc-synopsis)
> + (description gcc-description)

xgettext recognizes (synopsis "foo"), but it won’t catch the variables
defined above, because they’re not preceded by the ‘synopsis’ keyword or
anything.

That’s why I proposed in https://issues.guix.gnu.org/issue/38436#2 to
arrange to keep the string wrapped in (synopsis …).

It’d be great if you could give it a spin, or I can make the change on
your behalf if you prefer.

Apologies for making something simple somewhat complicated!

Thanks,
Ludo’.
K
K
Konrad Hinsen wrote on 11 Dec 2019 21:34
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 38436@debbugs.gnu.org)
m1immm38jy.fsf@ordinateur-de-catherine--konrad.home
Hi Ludo,

Toggle quote (4 lines)
> xgettext recognizes (synopsis "foo"), but it won’t catch the variables
> defined above, because they’re not preceded by the ‘synopsis’ keyword or
> anything.

OK, so what's the exact rule? If the literal string has to be right
after the symbol "synopsis", then your optional-arg approach shouldn't
work when the argument is supplied at the call site (in
gfortran-toolchain).

That would still leave the option of doing something like

(define-public gfortran-toolchain
(package (inherit (make-gcc-toolchain gfortran))
(synopsis ...)
(description ...)

Cheers,
Konrad.
L
L
Ludovic Courtès wrote on 12 Dec 2019 14:20
(name . Konrad Hinsen)(address . konrad.hinsen@fastmail.net)(address . 38436@debbugs.gnu.org)
87wob17k95.fsf@gnu.org
Hi Konrad,

Konrad Hinsen <konrad.hinsen@fastmail.net> skribis:

Toggle quote (9 lines)
>> xgettext recognizes (synopsis "foo"), but it won’t catch the variables
>> defined above, because they’re not preceded by the ‘synopsis’ keyword or
>> anything.
>
> OK, so what's the exact rule? If the literal string has to be right
> after the symbol "synopsis", then your optional-arg approach shouldn't
> work when the argument is supplied at the call site (in
> gfortran-toolchain).

Good point!

The exact rule is given the the ‘--keyword’ options in
po/packages/Makevars. Namely, xgettext will recognize:

(synopsis "…")

Thus, something like:

(define* (foo #:key (synopsis "…"))
…)

works.

Now, for gfortran, you could resort to a not-so-fancy hack (used in
‘define-word-list-dictionary’ in (gnu packages aspell)) like this:

(let-syntax ((synopsis (syntax-rules () ((_ str) str))))
(make-gcc-toolchain gfortran #:synopsis (synopsis "…")))

Quite an effort for this little thing, but I couldn’t find of anything
simpler.

HTH,
Ludo’.
K
K
Konrad Hinsen wrote on 12 Dec 2019 16:19
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 38436@debbugs.gnu.org)
m1eex9fu6b.fsf@khs-macbook.home
Hi Ludo,

Toggle quote (3 lines)
> The exact rule is given the the ‘--keyword’ options in
> po/packages/Makevars. Namely, xgettext will recognize:

Great, good to know!

Toggle quote (6 lines)
> (let-syntax ((synopsis (syntax-rules () ((_ str) str))))
> (make-gcc-toolchain gfortran #:synopsis (synopsis "…")))
>
> Quite an effort for this little thing, but I couldn’t find of anything
> simpler.

It looks like I still don't understand how this works. Why wouldn't
the simpler

(let ((synopsis (lambda (_) _)))
(make-gcc-toolchain gfortran #:synopsis (synopsis "…")))

be sufficient? And is there a good reason to prefer such constructs
to

(define-public gfortran-toolchain
(package (inherit (make-gcc-toolchain gfortran))
(synopsis ...)
(description ...)

which I think expresses the intention more clearly?

Cheers,
Konrad
L
L
Ludovic Courtès wrote on 12 Dec 2019 22:22
(name . Konrad Hinsen)(address . konrad.hinsen@fastmail.net)(address . 38436@debbugs.gnu.org)
87sglp44t1.fsf@gnu.org
Konrad Hinsen <konrad.hinsen@fastmail.net> skribis:

Toggle quote (12 lines)
>> (let-syntax ((synopsis (syntax-rules () ((_ str) str))))
>> (make-gcc-toolchain gfortran #:synopsis (synopsis "…")))
>>
>> Quite an effort for this little thing, but I couldn’t find of anything
>> simpler.
>
> It looks like I still don't understand how this works. Why wouldn't
> the simpler
>
> (let ((synopsis (lambda (_) _)))
> (make-gcc-toolchain gfortran #:synopsis (synopsis "…")))

Ah yes, that would work too.

Toggle quote (10 lines)
> be sufficient? And is there a good reason to prefer such constructs
> to
>
> (define-public gfortran-toolchain
> (package (inherit (make-gcc-toolchain gfortran))
> (synopsis ...)
> (description ...)
>
> which I think expresses the intention more clearly?

Oh I guess I had overlooked this proposal, I agree that it’s nicer.

Apologies for the confusion!

Ludo’.
K
K
Konrad Hinsen wrote on 13 Dec 2019 13:53
[PATCH] gnu: Add gfortran-toolchain
(address . 38436@debbugs.gnu.org)
m18sngfktg.fsf@khs-macbook.home
* gnu/packages/commencement.scm: (gfortran-toolchain): New variable.
---
gnu/packages/commencement.scm | 13 +++++++++++++
1 file changed, 13 insertions(+)

Toggle diff (24 lines)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 68030376fc..541dedce0d 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2601,4 +2601,17 @@ an d binaries, plus debugging symbols in the @code{debug} output), and Binutils
(define-public gcc-toolchain-9
(make-gcc-toolchain gcc-9))
+;; Provide the Fortran toolchain package only for the version of gfortran that
+;; is used by Guix intenally to build Fortran libraries, because combining
+;; code compiled with different versions can cause problems.
+
+(define-public gfortran-toolchain
+ (package (inherit (make-gcc-toolchain gfortran))
+ (synopsis "Complete GCC tool chain for Fortran development")
+ (description "This package provides a complete GCC tool chain for
+Fortran development to be installed in user profiles. This includes
+gfortran, as well as libc (headers and binaries, plus debugging symbols
+in the @code{debug} output), and binutils.")))
+
+
;;; commencement.scm ends here
--
2.24.0
K
K
Konrad Hinsen wrote on 13 Dec 2019 13:56
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 38436@debbugs.gnu.org)
m136dofkoq.fsf@khs-macbook.home
Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (2 lines)
> Oh I guess I had overlooked this proposal, I agree that it’s nicer.

Patch submitted. It's probably also the shortest possible
patch to get the desired result.

Cheers,
Konrad
J
J
Jonathan Brielmaier wrote on 13 Dec 2019 13:56
4b4a40c9-ef4c-107f-8f2a-8bfcbe6b8527@web.de
On 13.12.19 13:53, Konrad Hinsen wrote:
Toggle quote (16 lines)
> * gnu/packages/commencement.scm: (gfortran-toolchain): New variable.
> ---
> gnu/packages/commencement.scm | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
> index 68030376fc..541dedce0d 100644
> --- a/gnu/packages/commencement.scm
> +++ b/gnu/packages/commencement.scm
> @@ -2601,4 +2601,17 @@ an d binaries, plus debugging symbols in the @code{debug} output), and Binutils
> (define-public gcc-toolchain-9
> (make-gcc-toolchain gcc-9))
>
> +;; Provide the Fortran toolchain package only for the version of gfortran that
> +;; is used by Guix intenally to build Fortran libraries, because combining

^ internally
L
L
Ludovic Courtès wrote on 15 Dec 2019 00:22
(name . Konrad Hinsen)(address . konrad.hinsen@fastmail.net)(address . 38436-done@debbugs.gnu.org)
87r216wkzn.fsf@gnu.org
Hi,

Konrad Hinsen <konrad.hinsen@fastmail.net> skribis:

Toggle quote (2 lines)
> * gnu/packages/commencement.scm: (gfortran-toolchain): New variable.

Applied, thanks! I fixed that typo that Jonathan reported.

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 38436@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 38436
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch