Message ID | dd62cec2706aabf66c565abac302e3ba4dc658c4.1683721736.git.mail@cbaines.net |
---|---|
State | New |
Headers | show |
Series | Fix more derivation builder gexp issues. | expand |
Hi, Christopher Baines <mail@cbaines.net> skribis: > As this seems to be generating broken derivations for i586-gnu otherwise. “Seems” isn’t confidence-inspiring. ;-) Here’s one: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build gccgo -s i586-gnu -d /gnu/store/yzlmgxq20bk9xcbksi7q1f839056wzhr-gccgo-12.3.0.drv $ guix gc --references /gnu/store/yzlmgxq20bk9xcbksi7q1f839056wzhr-gccgo-12.3.0.drv |grep builder /gnu/store/jizw9gjvzb21jm7q7xlm71pw6fr24hhv-gccgo-12.3.0-builder $ grep -q '#<' /gnu/store/jizw9gjvzb21jm7q7xlm71pw6fr24hhv-gccgo-12.3.0-builder ; echo $? 0 --8<---------------cut here---------------end--------------->8--- > * gnu/packages/gcc.scm (custom-gcc): Use gexp's for the generated package > arguments. [...] > As otherwise this seems to generate broken derivations for i586-gnu. > > * gnu/packages/gcc.scm (make-gccgo): Use gexp's for the package arguments. [...] > +++ b/gnu/packages/gcc.scm > @@ -1156,34 +1156,34 @@ (define (make-gccgo gcc) > (arguments > (substitute-keyword-arguments (package-arguments gccgo) > ((#:phases phases) > - `(modify-phases ,phases > - (add-after 'install 'wrap-go-with-tool-path If ‘phases’ might be a gexp, then this should be a gexp as well. Put differently, if one of the gcc* packages starts using gexps, then all those that inherit from it should switch as well. Since ‘gcc-11’ uses gexps (only when targeting the Hurd), all the other ones should use gexps. That probably includes all those in gcc.scm and all those in commencement.scm. Ludo’.
Ludovic Courtès <ludo@gnu.org> writes: > Christopher Baines <mail@cbaines.net> skribis: > >> As this seems to be generating broken derivations for i586-gnu otherwise. > > “Seems” isn’t confidence-inspiring. ;-) > > Here’s one: > > $ ./pre-inst-env guix build gccgo -s i586-gnu -d > /gnu/store/yzlmgxq20bk9xcbksi7q1f839056wzhr-gccgo-12.3.0.drv > $ guix gc --references /gnu/store/yzlmgxq20bk9xcbksi7q1f839056wzhr-gccgo-12.3.0.drv |grep builder > /gnu/store/jizw9gjvzb21jm7q7xlm71pw6fr24hhv-gccgo-12.3.0-builder > $ grep -q '#<' /gnu/store/jizw9gjvzb21jm7q7xlm71pw6fr24hhv-gccgo-12.3.0-builder ; echo $? > 0 > >> * gnu/packages/gcc.scm (custom-gcc): Use gexp's for the generated package >> arguments. > > [...] > >> As otherwise this seems to generate broken derivations for i586-gnu. >> >> * gnu/packages/gcc.scm (make-gccgo): Use gexp's for the package arguments. > > > [...] > >> +++ b/gnu/packages/gcc.scm >> @@ -1156,34 +1156,34 @@ (define (make-gccgo gcc) >> (arguments >> (substitute-keyword-arguments (package-arguments gccgo) >> ((#:phases phases) >> - `(modify-phases ,phases >> - (add-after 'install 'wrap-go-with-tool-path > > If ‘phases’ might be a gexp, then this should be a gexp as well. > > Put differently, if one of the gcc* packages starts using gexps, then > all those that inherit from it should switch as well. > > Since ‘gcc-11’ uses gexps (only when targeting the Hurd), all the other > ones should use gexps. That probably includes all those in gcc.scm and > all those in commencement.scm. Yep, I think these changes were sufficient, but I missed replacing a few unquote bits with ungexp, so as QA shows this affected a bunch of derivations for all systems. I've fixed those bits now and sent a v2.
Christopher Baines <mail@cbaines.net> writes: > Ludovic Courtès <ludo@gnu.org> writes: > >> Christopher Baines <mail@cbaines.net> skribis: >> >>> As this seems to be generating broken derivations for i586-gnu otherwise. >> >> “Seems” isn’t confidence-inspiring. ;-) >> >> Here’s one: >> >> $ ./pre-inst-env guix build gccgo -s i586-gnu -d >> /gnu/store/yzlmgxq20bk9xcbksi7q1f839056wzhr-gccgo-12.3.0.drv >> $ guix gc --references /gnu/store/yzlmgxq20bk9xcbksi7q1f839056wzhr-gccgo-12.3.0.drv |grep builder >> /gnu/store/jizw9gjvzb21jm7q7xlm71pw6fr24hhv-gccgo-12.3.0-builder >> $ grep -q '#<' /gnu/store/jizw9gjvzb21jm7q7xlm71pw6fr24hhv-gccgo-12.3.0-builder ; echo $? >> 0 >> >>> * gnu/packages/gcc.scm (custom-gcc): Use gexp's for the generated package >>> arguments. >> >> [...] >> >>> As otherwise this seems to generate broken derivations for i586-gnu. >>> >>> * gnu/packages/gcc.scm (make-gccgo): Use gexp's for the package arguments. >> >> >> [...] >> >>> +++ b/gnu/packages/gcc.scm >>> @@ -1156,34 +1156,34 @@ (define (make-gccgo gcc) >>> (arguments >>> (substitute-keyword-arguments (package-arguments gccgo) >>> ((#:phases phases) >>> - `(modify-phases ,phases >>> - (add-after 'install 'wrap-go-with-tool-path >> >> If ‘phases’ might be a gexp, then this should be a gexp as well. >> >> Put differently, if one of the gcc* packages starts using gexps, then >> all those that inherit from it should switch as well. >> >> Since ‘gcc-11’ uses gexps (only when targeting the Hurd), all the other >> ones should use gexps. That probably includes all those in gcc.scm and >> all those in commencement.scm. > > Yep, I think these changes were sufficient, but I missed replacing a few > unquote bits with ungexp, so as QA shows this affected a bunch of > derivations for all systems. > > I've fixed those bits now and sent a v2. v2 looked good in QA, so I pushed this to master as 70986f052a2b60ccb5f3bd5da520f9cdf5ea60ad.
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 47fb443155..2bd4cad6ec 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -1043,18 +1043,18 @@ (define* (custom-gcc gcc name languages (srfi srfi-26) (ice-9 regex))) ((#:configure-flags flags) - `(cons (string-append "--enable-languages=" - ,(string-join languages ",")) - (remove (cut string-match "--enable-languages.*" <>) - ,flags))) + #~(cons (string-append "--enable-languages=" + ,(string-join languages ",")) + (remove (cut string-match "--enable-languages.*" <>) + #$flags))) ((#:phases phases) - `(modify-phases ,phases - (add-after 'install 'remove-broken-or-conflicting-files - (lambda* (#:key outputs #:allow-other-keys) - (for-each - delete-file - (find-files (string-append (assoc-ref outputs "out") "/bin") - ".*(c\\+\\+|cpp|g\\+\\+|gcov|gcc|lto)(-.*)?$")))))))))) + #~(modify-phases #$phases + (add-after 'install 'remove-broken-or-conflicting-files + (lambda* (#:key outputs #:allow-other-keys) + (for-each + delete-file + (find-files (string-append (assoc-ref outputs "out") "/bin") + ".*(c\\+\\+|cpp|g\\+\\+|gcov|gcc|lto)(-.*)?$")))))))))) (define %generic-search-paths ;; This is the language-neutral search path for GCC. Entries in $CPATH are