GNU bug report logs -
#26805
[PATCH] gs-fonts: add missing podule imports
Previous Next
Reported by: Sergei Trofimovich <slyfox <at> inbox.ru>
Date: Sat, 6 May 2017 15:41:01 UTC
Severity: normal
Tags: patch
Done: Danny Milosavljevic <dannym <at> scratchpost.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 26805 in the body.
You can then email your comments to 26805 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#26805
; Package
guix-patches
.
(Sat, 06 May 2017 15:41:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Sergei Trofimovich <slyfox <at> inbox.ru>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sat, 06 May 2017 15:41:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
On code-updates branch 'gs-fonts' build fails as:
ice-9/psyntax.scm:1534:32: In procedure expand-macro:
ice-9/psyntax.scm:1534:32: Syntax error:
...-gs-fonts-8.11-guile-builder:1:2300: source expression failed to match
any pattern in form (%modify-phases phases* (delete (quote configure)))
builder for `/gnu/store/...-gs-fonts-8.11.drv' failed with exit code 1
* gnu/packages/ghostscript.scm (gs-fonts): add missing modules to
%modify-phases call: gnu-build-system, utils, srfi-1
Signed-off-by: Sergei Trofimovich <slyfox <at> inbox.ru>
---
gnu/packages/ghostscript.scm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm
index 076046e72..33b8f51b6 100644
--- a/gnu/packages/ghostscript.scm
+++ b/gnu/packages/ghostscript.scm
@@ -273,6 +273,10 @@ architecture.")
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; nothing to check, just files to copy
+
+ #:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (srfi srfi-1))
#:phases
(modify-phases %standard-phases
(delete 'configure)
--
2.12.2
Reply sent
to
Danny Milosavljevic <dannym <at> scratchpost.org>
:
You have taken responsibility.
(Sun, 07 May 2017 19:08:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Sergei Trofimovich <slyfox <at> inbox.ru>
:
bug acknowledged by developer.
(Sun, 07 May 2017 19:08:01 GMT)
Full text and
rfc822 format available.
Message #10 received at 26805-done <at> debbugs.gnu.org (full text, mbox):
Hi Sergei,
thanks for your contribution.
I've pushed it to core-updates as 809bc3948e2441daae32dfd1beb6c1984b840315.
This causes 3198 dependent packages to rebuild, therefore I'll not push it to master (which I did for the other module import patches - because they caused a lot fewer packages to rebuild).
Information forwarded
to
guix-patches <at> gnu.org
:
bug#26805
; Package
guix-patches
.
(Tue, 09 May 2017 10:21:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 26805 <at> debbugs.gnu.org (full text, mbox):
Hello!
Sergei Trofimovich <slyfox <at> inbox.ru> skribis:
> On code-updates branch 'gs-fonts' build fails as:
>
> ice-9/psyntax.scm:1534:32: In procedure expand-macro:
> ice-9/psyntax.scm:1534:32: Syntax error:
> ...-gs-fonts-8.11-guile-builder:1:2300: source expression failed to match
> any pattern in form (%modify-phases phases* (delete (quote configure)))
> builder for `/gnu/store/...-gs-fonts-8.11.drv' failed with exit code 1
Any idea when this problem appeared? That’s on core-updates, right?
> + #:modules ((guix build gnu-build-system)
> + (guix build utils)
> + (srfi srfi-1))
The first two modules are here by default (see ‘%default-modules’ in
(guix build-system gnu)), so I wonder why adding (srfi srfi-1) would
help here.
Thoughts?
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#26805
; Package
guix-patches
.
(Tue, 09 May 2017 20:38:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 26805 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Tue, 09 May 2017 12:20:46 +0200
ludo <at> gnu.org (Ludovic Courtès) wrote:
> Hello!
>
> Sergei Trofimovich <slyfox <at> inbox.ru> skribis:
>
> > On code-updates branch 'gs-fonts' build fails as:
> >
> > ice-9/psyntax.scm:1534:32: In procedure expand-macro:
> > ice-9/psyntax.scm:1534:32: Syntax error:
> > ...-gs-fonts-8.11-guile-builder:1:2300: source expression failed to match
> > any pattern in form (%modify-phases phases* (delete (quote configure)))
> > builder for `/gnu/store/...-gs-fonts-8.11.drv' failed with exit code 1
>
> Any idea when this problem appeared? That’s on core-updates, right?
Yes, core-updates. It was caused by guile-2.0->guile-2.2 switch.
> > + #:modules ((guix build gnu-build-system)
> > + (guix build utils)
> > + (srfi srfi-1))
>
> The first two modules are here by default (see ‘%default-modules’ in
> (guix build-system gnu)), so I wonder why adding (srfi srfi-1) would
> help here.
>
> Thoughts?
In http://lists.gnu.org/archive/html/guix-devel/2017-05/msg00010.html
thread Andy explains syntax-rules changed the rules on how syntax-match
is done in guile-2.2: now things are matched by binding, not by name.
That means evaluation of -guile-builder needs to keep things in scope at
<some-strange-evaluation-time-i-have-no-understanding-about> :)
The breakage is quite widespread. Danny applied 3 patches already to fix
similar problems. I have at least 5 more packages fixed (or "fixed"?) in a
similar way and more to go.
--
Sergei
[Message part 2 (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#26805
; Package
guix-patches
.
(Wed, 10 May 2017 11:54:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 26805 <at> debbugs.gnu.org (full text, mbox):
Sergei Trofimovich <slyfox <at> inbox.ru> skribis:
> On Tue, 09 May 2017 12:20:46 +0200
> ludo <at> gnu.org (Ludovic Courtès) wrote:
>
>> Hello!
>>
>> Sergei Trofimovich <slyfox <at> inbox.ru> skribis:
>>
>> > On code-updates branch 'gs-fonts' build fails as:
>> >
>> > ice-9/psyntax.scm:1534:32: In procedure expand-macro:
>> > ice-9/psyntax.scm:1534:32: Syntax error:
>> > ...-gs-fonts-8.11-guile-builder:1:2300: source expression failed to match
>> > any pattern in form (%modify-phases phases* (delete (quote configure)))
>> > builder for `/gnu/store/...-gs-fonts-8.11.drv' failed with exit code 1
>>
>> Any idea when this problem appeared? That’s on core-updates, right?
>
> Yes, core-updates. It was caused by guile-2.0->guile-2.2 switch.
>
>> > + #:modules ((guix build gnu-build-system)
>> > + (guix build utils)
>> > + (srfi srfi-1))
>>
>> The first two modules are here by default (see ‘%default-modules’ in
>> (guix build-system gnu)), so I wonder why adding (srfi srfi-1) would
>> help here.
>>
>> Thoughts?
>
> In http://lists.gnu.org/archive/html/guix-devel/2017-05/msg00010.html
> thread Andy explains syntax-rules changed the rules on how syntax-match
> is done in guile-2.2: now things are matched by binding, not by name.
Oooooh, right, terrible.
> That means evaluation of -guile-builder needs to keep things in scope at
> <some-strange-evaluation-time-i-have-no-understanding-about> :)
>
> The breakage is quite widespread. Danny applied 3 patches already to fix
> similar problems. I have at least 5 more packages fixed (or "fixed"?) in a
> similar way and more to go.
What about adding (srfi srfi-1) to ‘%default-modules’ in (guix
build-system gnu)? It’s generally useful anyway.
(Alternately, we could rename SRFI-1’s ‘delete’ in (guix build utils),
so we’d still be matching a literal, but we’d have problems in places
that use both (guix build utils) and (srfi srfi-1).)
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#26805
; Package
guix-patches
.
(Wed, 10 May 2017 20:43:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 26805 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Wed, 10 May 2017 13:53:41 +0200
ludo <at> gnu.org (Ludovic Courtès) wrote:
> What about adding (srfi srfi-1) to ‘%default-modules’ in (guix
> build-system gnu)? It’s generally useful anyway.
>
> (Alternately, we could rename SRFI-1’s ‘delete’ in (guix build utils),
> so we’d still be matching a literal, but we’d have problems in places
> that use both (guix build utils) and (srfi srfi-1).)
I'd personally say the less magic reexports - the better. It's ok to go
through all of core-updates and fix missing imports.
Would be nice the all those syntactic errors could be caught with something
lighter-weight than full 'guix build'.
I'm afraid I have no idea how symbol visibility works in guix as I'm
still struggling to find which code builds and evaluates '*-guile-builder' files.
For example what is the difference between
(use-modules ....
and
(arguments '(#:modules
?
Should be one preferred over another? The latter creeps in core-updates :)
https://git.savannah.gnu.org/cgit/guix.git/log/?h=core-updates
A few recent examples:
https://git.savannah.gnu.org/cgit/guix.git/commit/?h=core-updates&id=a8f25449114bd9035898eec3455db51c0f4d928d
https://git.savannah.gnu.org/cgit/guix.git/commit/?h=core-updates&id=bc81e6cae40098684c14b10d0aa4c6257acbbdb6
https://git.savannah.gnu.org/cgit/guix.git/commit/?h=core-updates&id=47babd445a9f0e6fe9356cbe362d390f09df4e3b
etc.
--
Sergei
[Message part 2 (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#26805
; Package
guix-patches
.
(Thu, 11 May 2017 20:50:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 26805 <at> debbugs.gnu.org (full text, mbox):
Hi!
Sergei Trofimovich <slyfox <at> inbox.ru> skribis:
> On Wed, 10 May 2017 13:53:41 +0200
> ludo <at> gnu.org (Ludovic Courtès) wrote:
>
>> What about adding (srfi srfi-1) to ‘%default-modules’ in (guix
>> build-system gnu)? It’s generally useful anyway.
>>
>> (Alternately, we could rename SRFI-1’s ‘delete’ in (guix build utils),
>> so we’d still be matching a literal, but we’d have problems in places
>> that use both (guix build utils) and (srfi srfi-1).)
>
> I'd personally say the less magic reexports - the better. It's ok to go
> through all of core-updates and fix missing imports.
I wouldn’t call it “magic”. It’s just about providing a useful set of
bindings in ‘%default-modules’, to save typing essentially.
Also, for this ‘delete’ issue, I’m pretty sure we’re going to miss many
occurrences no matter what (same problem as with the ‘_’ binding from
(guix ui), which wasn’t resolved until I finally realized that renaming
it would have saved a lot of time…)
Note that there’s also the second solution above.
Thoughts?
> Would be nice the all those syntactic errors could be caught with something
> lighter-weight than full 'guix build'.
The problem is that this is “build-side code” and we can’t really tell
much about it until we’ve assembled it in on of those -guile-builder
files.
> I'm afraid I have no idea how symbol visibility works in guix as I'm
> still struggling to find which code builds and evaluates '*-guile-builder' files.
>
> For example what is the difference between
> (use-modules ....
> and
> (arguments '(#:modules
> ?
Hopefully the intro of the “G-Expressions” section can shed some light
on this, specifically on the build-side vs. host-side story. Otherwise
let me know. :-)
“(arguments '(#:modules …))” specifies modules in scope on the build
side.
HTH!
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#26805
; Package
guix-patches
.
(Sun, 14 May 2017 16:32:02 GMT)
Full text and
rfc822 format available.
Message #28 received at 26805 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Thu, 11 May 2017 22:49:05 +0200
ludo <at> gnu.org (Ludovic Courtès) wrote:
> Hi!
>
> Sergei Trofimovich <slyfox <at> inbox.ru> skribis:
>
> > On Wed, 10 May 2017 13:53:41 +0200
> > ludo <at> gnu.org (Ludovic Courtès) wrote:
> >
> >> What about adding (srfi srfi-1) to ‘%default-modules’ in (guix
> >> build-system gnu)? It’s generally useful anyway.
A bunch of python-guild-system based packages fail in a similar way.
I tried reexporting 'delete' from '(guix build utils)'. It works at
least for many packages I have tested. But maybe it's too broad.
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index e8efb0653..4bc55f219 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -25,21 +25,22 @@
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-60)
#:use-module (ice-9 ftw)
#:use-module (ice-9 match)
#:use-module (ice-9 regex)
#:use-module (ice-9 rdelim)
#:use-module (ice-9 format)
#:use-module (rnrs bytevectors)
#:use-module (rnrs io ports)
#:re-export (alist-cons
- alist-delete)
+ alist-delete
+ delete)
#:export (%store-directory
store-file-name?
strip-store-file-name
package-name->name+version
parallel-job-count
directory-exists?
executable-file?
symbolic-link?
call-with-ascii-input-file
> >> (Alternately, we could rename SRFI-1’s ‘delete’ in (guix build utils),
> >> so we’d still be matching a literal, but we’d have problems in places
> >> that use both (guix build utils) and (srfi srfi-1).)
> >
> > I'd personally say the less magic reexports - the better. It's ok to go
> > through all of core-updates and fix missing imports.
>
> I wouldn’t call it “magic”. It’s just about providing a useful set of
> bindings in ‘%default-modules’, to save typing essentially.
>
> Also, for this ‘delete’ issue, I’m pretty sure we’re going to miss many
> occurrences no matter what (same problem as with the ‘_’ binding from
> (guix ui), which wasn’t resolved until I finally realized that renaming
> it would have saved a lot of time…)
Yeah. Having tried to edit 10 more packages I have to agree it's tedious
to fix each package :)
Can you explain what is the problem of renaming ‘delete’ from srfi-1 in
(guix build utils) module? How would hypothetical breakage happen?
Is it because 'delete' from srfi-1 and renamed binding srfi-1 are not
treated as the same binding by syntax rule?
> Note that there’s also the second solution above.
>
> Thoughts?
--
Sergei
[Message part 2 (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#26805
; Package
guix-patches
.
(Sun, 14 May 2017 20:03:02 GMT)
Full text and
rfc822 format available.
Message #31 received at 26805 <at> debbugs.gnu.org (full text, mbox):
Hi,
Sergei Trofimovich <slyfox <at> inbox.ru> skribis:
> On Thu, 11 May 2017 22:49:05 +0200
[...]
>> >> (Alternately, we could rename SRFI-1’s ‘delete’ in (guix build utils),
>> >> so we’d still be matching a literal, but we’d have problems in places
>> >> that use both (guix build utils) and (srfi srfi-1).)
[...]
> Can you explain what is the problem of renaming ‘delete’ from srfi-1 in
> (guix build utils) module? How would hypothetical breakage happen?
> Is it because 'delete' from srfi-1 and renamed binding srfi-1 are not
> treated as the same binding by syntax rule?
The only problem would be in packages that use both (guix build utils)
and (srfi srfi-1), *and* do (modify-phase … (delete …)). Those packages
would have a syntax error due to ‘delete’ being shadowed by SRFI-1’s
‘delete’.
It’s easy to fix them, for example by using the #:prefix option when
importing (srfi srfi-1)… but it’s also easy to miss some of the
problems.
There’s yet another option, which is to:
(define-modules (guix build utils)
…
#:use-module (srfi srfi-1)
#:re-export (delete))
I think that one had none of the previously-discussed drawbacks.
Thoughts? Would you like to give it a try?
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#26805
; Package
guix-patches
.
(Sun, 14 May 2017 23:16:01 GMT)
Full text and
rfc822 format available.
Message #34 received at 26805 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Sun, 14 May 2017 22:02:21 +0200
ludo <at> gnu.org (Ludovic Courtès) wrote:
> There’s yet another option, which is to:
>
> (define-modules (guix build utils)
> …
> #:use-module (srfi srfi-1)
> #:re-export (delete))
>
> I think that one had none of the previously-discussed drawbacks.
>
> Thoughts? Would you like to give it a try?
Attached 0001-reexport-delete-symbol-bound-at-modify-phases-syntax.patch
that hopefully does exactly the same. This fix allows bootstrapping bash-minimal
and gs-fonts with #:modules patch reverted \o/
--
Sergei
[0001-reexport-delete-symbol-bound-at-modify-phases-syntax.patch (text/x-patch, attachment)]
[Message part 3 (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#26805
; Package
guix-patches
.
(Fri, 26 May 2017 13:03:01 GMT)
Full text and
rfc822 format available.
Message #37 received at 26805-done <at> debbugs.gnu.org (full text, mbox):
Hi Sergei,
Sergei Trofimovich <slyfox <at> inbox.ru> skribis:
> Attached 0001-reexport-delete-symbol-bound-at-modify-phases-syntax.patch
> that hopefully does exactly the same. This fix allows bootstrapping bash-minimal
> and gs-fonts with #:modules patch reverted \o/
[...]
> From 18d1c9cf8252891c5c98ebb18a9937b5881e4ddd Mon Sep 17 00:00:00 2001
> From: Sergei Trofimovich <slyfox <at> inbox.ru>
> Date: Sat, 13 May 2017 22:08:27 +0100
> Subject: [PATCH] reexport 'delete' symbol bound at %modify-phases syntax match
>
> * guix/build/utils.scm: reexport 'delete' binding
I added an explanatory comment and pushed as
8b14773ab6cafbd138e0c6cbfd2fc48818e2e0b5.
If there are core packages where we added #:modules ((srfi srfi-1) …),
we should probably remove it. Packages with few dependents don’t matter
much.
Thoughts?
Thank you, and apologies for the delay!
Ludo’.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 24 Jun 2017 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 279 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.