gnome.scm cannot import (gnu packages rust)

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Marius Bakke
Owner
unassigned
Submitted by
Marius Bakke
Severity
normal
M
M
Marius Bakke wrote on 9 May 2018 18:25
(address . bug-guix@gnu.org)
87vabwg5is.fsf@fastmail.com
Hello!

I'm trying to update librsvg, which requires "rust".

However adding this simple diff:

--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -114,6 +114,7 @@
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
#:use-module (gnu packages rdesktop)
+ #:use-module (gnu packages rust)
#:use-module (gnu packages scanner)
#:use-module (gnu packages selinux)
#:use-module (gnu packages slang)

Causes the module to compile (sometimes), but any Guix action results in
a backtrace similar to this:

Toggle snippet (35 lines)
guix build: warning: failed to load '(nonfree packages audio)':
In procedure module-lookup: Unbound variable: gcc
guix build: warning: failed to load '(nonfree packages games)':
Unbound variable: devil
guix build: warning: failed to load '(gnu packages avr)':
In procedure module-lookup: Unbound variable: binutils
guix build: warning: failed to load '(gnu packages axoloti)':
In procedure module-lookup: Unbound variable: gcc-4.9
guix build: warning: failed to load '(gnu packages bioconductor)':
In procedure module-lookup: Unbound variable: perl-module-build
guix build: warning: failed to load '(gnu packages bootloaders)':
no binding `bc' in module (gnu packages algebra)
guix build: warning: failed to load '(gnu packages chemistry)':
In procedure module-lookup: Unbound variable: python2-numpy
guix build: warning: failed to load '(gnu packages commencement)':
In procedure module-lookup: Unbound variable: gnu-make
guix build: warning: failed to load '(gnu packages debug)':
In procedure module-lookup: Unbound variable: gnu-make
guix build: warning: failed to load '(gnu packages display-managers)':
In procedure module-lookup: Unbound variable: gpgme
guix build: warning: failed to load '(gnu packages games)':
In procedure module-lookup: Unbound variable: unzip
guix build: warning: failed to load '(gnu packages image-viewers)':
In procedure module-lookup: Unbound variable: curl
guix build: warning: failed to load '(gnu packages license)':
In procedure module-lookup: Unbound variable: perl
guix build: warning: failed to load '(gnu packages make-bootstrap)':
In procedure module-lookup: Unbound variable: coreutils
guix build: warning: failed to load '(gnu packages syndication)':
In procedure module-lookup: Unbound variable: curl
guix build: warning: failed to load '(gnu packages unrtf)':
In procedure module-lookup: Unbound variable: coreutils
guix build: error: librsvg: unknown package

Not sure how to track down the module cycle. Ideas?
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlrzIQsACgkQoqBt8qM6
VPqCwQgA08i/WrkIckz4gZoPqaRZnmF63e8R2d2OOMJwzTqgmBphlb3AH4iTWxxK
BzhaZEsp5tqQ6CDeB1MaPT5jZOWXKRuwVsedUX6agBqK1icKfCm3Uxu1irpMRRyj
QUFCujqF+Db/9iEdNwnTVUItD5CkuI902VYGE/Xn1A0lqECB2GsRdYTqhf4UDKwQ
vP+UgobDxMEHddsdVoX0FXCy93BlMzpl4xQ+LV7ztoeKppuOMVhfS4Y1oCCeuA0+
hnRxHj9umIDCqM9Cyk1niXCe8YEy/4Rcm8gxVShK+3j87h2+BpFrktfCiKgI3uTo
vXRQ9ahGKHaV5z0h9dczihRBp63p0w==
=ZSxK
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 10 May 2018 00:56
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 31392@debbugs.gnu.org)
87h8ngv3p1.fsf@gnu.org
Hello,

Marius Bakke <mbakke@fastmail.com> skribis:

Toggle quote (2 lines)
> I'm trying to update librsvg, which requires "rust".

Speaking of which, what are other distros doing? Are all of them
switching to the Rust implementation, or are some keeping the C
implementation?

Not that I’m fond of C, but adding Rust (which is not bootstrapped,
etc.) in this place can be problematic.

Toggle quote (16 lines)
> However adding this simple diff:
>
> --- a/gnu/packages/gnome.scm
> +++ b/gnu/packages/gnome.scm
> @@ -114,6 +114,7 @@
> #:use-module (gnu packages pulseaudio)
> #:use-module (gnu packages python)
> #:use-module (gnu packages rdesktop)
> + #:use-module (gnu packages rust)
> #:use-module (gnu packages scanner)
> #:use-module (gnu packages selinux)
> #:use-module (gnu packages slang)
>
> Causes the module to compile (sometimes), but any Guix action results in
> a backtrace similar to this:

Here’s a debugging trick (not as helpful as one might like, but still):

Toggle snippet (70 lines)
$ GUIX_PACKAGE_PATH= ./pre-inst-env guile
GNU Guile 2.2.3
Copyright (C) 1995-2017 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (primitive-load "gnu/packages/abiword.scm")
gnu/packages/rust.scm:241:25: error: gcc: unbound variable

Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(gnu packages rust) [1]> ,bt
1190 (primitive-load "gnu/packages/abiword.scm")
In ice-9/eval.scm:
721:201189 (primitive-eval _)
In ice-9/psyntax.scm:
1235:361188 (expand-top-sequence _ _ _ #f _ _ _)
1182:241187 (parse _ (("placeholder" placeholder)) ((top) #(ribcage () () ())) _ e # …)
285:101186 (parse _ (("placeholder" placeholder)) (()) _ c&e (eval) (hygiene #))
In ice-9/eval.scm:
293:341185 (_ #<directory (guile-user) 995140>)
In ice-9/boot-9.scm:
2862:41184 (define-module* _ #:filename _ #:pure _ #:version _ #:imports _ # _ # _ …)
2071:241183 (call-with-deferred-observers _)
2875:241182 (_)
222:291181 (map1 _)
222:291180 (map1 _)
222:291179 (map1 _)
222:291178 (map1 _)
222:291177 (map1 _)
222:291176 (map1 _)
222:171175 (map1 (((gnu packages autotools)) ((gnu packages boost)) ((gnu # #)) # …))
2788:171174 (resolve-interface (gnu packages autotools) #:select _ #:hide _ #:prefix …)

[...]

In unknown file:
22 (primitive-load-path "gnu/packages/gnome" #<procedure 1311b40 at ice-9/b…>)
In gnu/packages/gnome.scm:
49:0 21 (_)
In ice-9/boot-9.scm:
2862:4 20 (define-module* _ #:filename _ #:pure _ #:version _ #:imports _ #:exports …)
2875:24 19 (_)
222:29 18 (map1 _)
222:29 17 (map1 _)
222:29 16 (map1 _)
222:29 15 (map1 _)
222:29 14 (map1 _)
222:29 13 (map1 _)
222:29 12 (map1 _)
222:29 11 (map1 _)
222:29 10 (map1 _)
222:29 9 (map1 _)
222:29 8 (map1 _)
222:17 7 (map1 (((gnu packages rust)) ((gnu packages admin)) ((gnu packages #)) …))
2788:17 6 (resolve-interface (gnu packages rust) #:select _ #:hide _ #:prefix _ # _ …)
2714:10 5 (_ (gnu packages rust) _ _ #:ensure _)
2982:16 4 (try-module-autoload _ _)
2312:4 3 (save-module-excursion _)
3002:22 2 (_)
In unknown file:
1 (primitive-load-path "gnu/packages/rust" #<procedure 1311a40 at ice-9/bo…>)
In gnu/packages/rust.scm:
241:25 0 (_)
scheme@(gnu packages rust) [1]> ,error
gnu/packages/rust.scm:241:25: error: gcc: unbound variable

The issue was the reference to ‘gcc’ from the ‘native-search-paths’
field (a “top level reference” because it’s executed as soon as we load
rust.scm.) While Guile allows for circular dependencies among modules,
it only works if the top-level of modules don’t look up variables
exported by each other, if you see what I mean.

Fixed in afc2bf53066975558676bc7f4957ad85d0ec170a.

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 10 May 2018 00:56
control message for bug #31392
(address . control@debbugs.gnu.org)
87fu30v3o5.fsf@gnu.org
tags 31392 fixed
close 31392
M
M
Marius Bakke wrote on 10 May 2018 13:56
Re: bug#31392: gnome.scm cannot import (gnu packages rust)
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 31392@debbugs.gnu.org)
87mux7g1wv.fsf@fastmail.com
ludo@gnu.org (Ludovic Courtès) writes:

Toggle quote (13 lines)
> Hello,
>
> Marius Bakke <mbakke@fastmail.com> skribis:
>
>> I'm trying to update librsvg, which requires "rust".
>
> Speaking of which, what are other distros doing? Are all of them
> switching to the Rust implementation, or are some keeping the C
> implementation?
>
> Not that I’m fond of C, but adding Rust (which is not bootstrapped,
> etc.) in this place can be problematic.

I haven't checked a lot of distros, but Arch and Debian Experimental
have the Rust version already. There is no maintained C implementation
any longer AFAIK. It was officially deprecated in version 2.40.20[0],
which is what we have right now.


[...]

Toggle quote (16 lines)
> In unknown file:
> 1 (primitive-load-path "gnu/packages/rust" #<procedure 1311a40 at ice-9/bo…>)
> In gnu/packages/rust.scm:
> 241:25 0 (_)
> scheme@(gnu packages rust) [1]> ,error
> gnu/packages/rust.scm:241:25: error: gcc: unbound variable
> --8<---------------cut here---------------end--------------->8---
>
> The issue was the reference to ‘gcc’ from the ‘native-search-paths’
> field (a “top level reference” because it’s executed as soon as we load
> rust.scm.) While Guile allows for circular dependencies among modules,
> it only works if the top-level of modules don’t look up variables
> exported by each other, if you see what I mean.
>
> Fixed in afc2bf53066975558676bc7f4957ad85d0ec170a.

That was fast, thank you!
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlr0M1AACgkQoqBt8qM6
VPoVsAf/Y1tpZe7KiAqnzaNhZj8yxegyfKjxyOt5xFTEywLG88fKgUE2vtHKxRQq
oaL8sYXtM4cjKYBJjm4BsRgm7yzbzc/r8EMKM4jW5kIusooPhrmyikBiGLfdfofy
DOLGGwU1TpH7r4ky9wQO4ZuWbzOF+GXLnjVnHv6TAAmCr6iA0cnf70KcirysRpNe
I3TBwKV7/9OejSkXxxu/cOboF4r5NCNej8t5CnXdDXeJNsTrhEldv4NSzUaTcBsk
ZJW1IiGayhQbzEqvxw2Sy3mLiUKvvbTIRJag7kl/aAOLfp61ONbm7G8FaESRhyPO
jGhuWIsMg2yeWgDYdmICaAFNEluKJA==
=WGs2
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 10 May 2018 22:25
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 31392@debbugs.gnu.org)
87wowbtfzm.fsf@gnu.org
Hey Marius,

Marius Bakke <mbakke@fastmail.com> skribis:

Toggle quote (20 lines)
> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Hello,
>>
>> Marius Bakke <mbakke@fastmail.com> skribis:
>>
>>> I'm trying to update librsvg, which requires "rust".
>>
>> Speaking of which, what are other distros doing? Are all of them
>> switching to the Rust implementation, or are some keeping the C
>> implementation?
>>
>> Not that I’m fond of C, but adding Rust (which is not bootstrapped,
>> etc.) in this place can be problematic.
>
> I haven't checked a lot of distros, but Arch and Debian Experimental
> have the Rust version already. There is no maintained C implementation
> any longer AFAIK. It was officially deprecated in version 2.40.20[0],
> which is what we have right now.

Oh well, thanks for the info!

Ludo’.
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 31392
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