Guix stumbles on duplicates?

  • Done
  • quality assurance status badge
Details
3 participants
  • Ludovic Courtès
  • Ricardo Wurmus
  • swedebugia
Owner
unassigned
Submitted by
swedebugia
Severity
normal
S
S
swedebugia wrote on 1 Jul 2019 10:38
(name . Report new Guix bug)(address . bug-guix@gnu.org)
533efcca-c21b-750c-2209-21203f38b715@riseup.net
Hi

Yesterday Arne posted a list of 1000 crates-io packages to the devel list.

When I inserted them in my 200+ crates-io.scm I got this error when
trying to build rust-backtrace:

$ ./pre-inst-env guix build rust-backtrace
Backtrace:
In guix/scripts/build.scm:
902:6 19 (_)
In guix/status.scm:
768:4 18 (call-with-status-report _ _)
In guix/store.scm:
623:10 17 (call-with-store _)
In guix/scripts/build.scm:
909:26 16 (_ #<store-connection 256.99 2726f00>)
In ice-9/boot-9.scm:
829:9 15 (catch unbound-variable #<procedure 260ac80 at guix/ui…> …)
In guix/ui.scm:
382:6 14 (_)
In guix/scripts/build.scm:
874:5 13 (_)
In srfi/srfi-1.scm:
679:15 12 (append-map _ _ . _)
592:17 11 (map1 ("x86_64-linux"))
679:15 10 (append-map _ _ . _)
592:17 9 (map1 (#<package rust-backtrace@0.3.32 /home/user/src/…>))
In guix/scripts/build.scm:
835:18 8 (_ _)
In guix/packages.scm:
936:16 7 (cache! #<weak-table 0/113> #<package rust-backtrace@0…> …)
1254:22 6 (thunk)
936:16 5 (cache! #<weak-table 0/223> #<package rust-backtrace@0…> …)
1038:19 4 (thunk)
In guix/build-system/cargo.scm:
260:27 3 (lower "rust-backtrace-0.3.32" #:source _ #:inputs _ # . #)
231:4 2 (expand-crate-sources _ _)
170:23 1 (crate-closure _)
128:4 0 (_ #:cargo-inputs _)

guix/build-system/cargo.scm:128:4: Invalid keyword: ("rust-lazy-static"
#<package rust-lazy-static@1.3.0
/home/user/src/guix/gnu/packages/crates-io.scm:98 3690d10>)

I tried building rust-lazy-static and it build fine and said:
successfully built
/gnu/store/0z3giv8ba2383zqaz6m7ayyixhm2jicf-rust-lazy-static-1.3.0.drv
/gnu/store/ssw3gh2ydw1bwp01r6z9sgy2i1zsq1q0-rust-lazy-static-1.3.0

I narrowed it down by inserting smaller and smaller fragments of arnes
list of packages and this one package (the last in the crates-io.scm)
causes the error:

(define-public rust-redox-termios

(package

(name "rust-redox-termios")

(version "0.1.1")

(source

(origin

(method url-fetch)

(uri (crate-uri "redox_termios" version))

(file-name

(string-append name "-" version ".tar.gz"))

(sha256

(base32

"0xhgvdh62mymgdl3jqrngl8hr4i8xwpnbsxnldq0l47993z1r2by"))))

(build-system cargo-build-system)

(arguments

`(#:cargo-inputs

(("rust-redox-syscall" ,rust-redox-syscall))))


(synopsis

"A Rust library to access Redox termios functions")

(description

"This package provides a Rust library to access Redox termios
functions")

(license #f)))

When it is commented out guix says:

$ ./pre-inst-env guix build rust-backtrace
ice-9/eval.scm:223:20: In procedure proc:
error: rust-redox-termios: unbound variable
hint: Did you forget `(use-modules (gnu packages rust))'?

this happens on a guix git pulled && maked yesterday @
Git checkout:
repository: /home/egil/src/guix
branch: master
commit: a3d1a3487a34820d2a0b3d5e6206e4df1c77c15c

My rust is this (from tobias' CI-server @ guix.tobias.gr):
/gnu/store/s89kb99c07wvyxjcq3rc6aap8rkcfwqx-rust-1.35.0-cargo
/gnu/store/2dc71v5jlbd6rpz7qx04iyzwl7kcqrjm-rust-1.35.0

--
Cheers Swedebugia
S
S
swedebugia wrote on 1 Jul 2019 11:01
(address . bug-guix@gnu.org)
a0916e9e-3b01-bd9a-f34c-b86232e1a792@riseup.net
On 2019-07-01 10:38, swedebugia wrote:
Toggle quote (118 lines)
> Hi
>
> Yesterday Arne posted a list of 1000 crates-io packages to the devel list.
>
> When I inserted them in my 200+ crates-io.scm I got this error when
> trying to build rust-backtrace:
>
> $ ./pre-inst-env guix build rust-backtrace
> Backtrace:
> In guix/scripts/build.scm:
>     902:6 19 (_)
> In guix/status.scm:
>     768:4 18 (call-with-status-report _ _)
> In guix/store.scm:
>    623:10 17 (call-with-store _)
> In guix/scripts/build.scm:
>    909:26 16 (_ #<store-connection 256.99 2726f00>)
> In ice-9/boot-9.scm:
>     829:9 15 (catch unbound-variable #<procedure 260ac80 at guix/ui…> …)
> In guix/ui.scm:
>     382:6 14 (_)
> In guix/scripts/build.scm:
>     874:5 13 (_)
> In srfi/srfi-1.scm:
>    679:15 12 (append-map _ _ . _)
>    592:17 11 (map1 ("x86_64-linux"))
>    679:15 10 (append-map _ _ . _)
>    592:17  9 (map1 (#<package rust-backtrace@0.3.32 /home/user/src/…>))
> In guix/scripts/build.scm:
>    835:18  8 (_ _)
> In guix/packages.scm:
>    936:16  7 (cache! #<weak-table 0/113> #<package rust-backtrace@0…> …)
>   1254:22  6 (thunk)
>    936:16  5 (cache! #<weak-table 0/223> #<package rust-backtrace@0…> …)
>   1038:19  4 (thunk)
> In guix/build-system/cargo.scm:
>    260:27  3 (lower "rust-backtrace-0.3.32" #:source _ #:inputs _ # . #)
>     231:4  2 (expand-crate-sources _ _)
>    170:23  1 (crate-closure _)
>     128:4  0 (_ #:cargo-inputs _)
>
> guix/build-system/cargo.scm:128:4: Invalid keyword: ("rust-lazy-static"
> #<package rust-lazy-static@1.3.0
> /home/user/src/guix/gnu/packages/crates-io.scm:98 3690d10>)
>
> I tried building rust-lazy-static and it build fine and said:
> successfully built
> /gnu/store/0z3giv8ba2383zqaz6m7ayyixhm2jicf-rust-lazy-static-1.3.0.drv
> /gnu/store/ssw3gh2ydw1bwp01r6z9sgy2i1zsq1q0-rust-lazy-static-1.3.0
>
> I narrowed it down by inserting smaller and smaller fragments of arnes
> list of packages and this one package (the last in the crates-io.scm)
> causes the error:
>
> (define-public rust-redox-termios
>
>   (package
>
>     (name "rust-redox-termios")
>
>     (version "0.1.1")
>
>     (source
>
>      (origin
>
>        (method url-fetch)
>
>        (uri (crate-uri "redox_termios" version))
>
>        (file-name
>
>         (string-append name "-" version ".tar.gz"))
>
>        (sha256
>
>         (base32
>
>          "0xhgvdh62mymgdl3jqrngl8hr4i8xwpnbsxnldq0l47993z1r2by"))))
>
>     (build-system cargo-build-system)
>
>     (arguments
>
>      `(#:cargo-inputs
>
>        (("rust-redox-syscall" ,rust-redox-syscall))))
>
>     (home-page "https://github.com/redox-os/termios")
>
>     (synopsis
>
>      "A Rust library to access Redox termios functions")
>
>     (description
>
>      "This package provides a Rust library to access Redox termios
> functions")
>     (license #f)))
>
> When it is commented out guix says:
>
> $ ./pre-inst-env guix build rust-backtrace
> ice-9/eval.scm:223:20: In procedure proc:
> error: rust-redox-termios: unbound variable
> hint: Did you forget `(use-modules (gnu packages rust))'?
>
> this happens on a guix git pulled && maked yesterday @
> Git checkout:
>   repository: /home/egil/src/guix
>   branch: master
>   commit: a3d1a3487a34820d2a0b3d5e6206e4df1c77c15c
>
> My rust is this (from tobias' CI-server @ guix.tobias.gr):
>     /gnu/store/s89kb99c07wvyxjcq3rc6aap8rkcfwqx-rust-1.35.0-cargo
>    /gnu/store/2dc71v5jlbd6rpz7qx04iyzwl7kcqrjm-rust-1.35.0
>

crates-io.scm attached.

--
Cheers Swedebugia
Attachment: crates-io.scm
R
R
Ricardo Wurmus wrote on 1 Jul 2019 21:54
(name . swedebugia)(address . swedebugia@riseup.net)(address . 36456@debbugs.gnu.org)
87sgrpv8cj.fsf@elephly.net
Hi swedebugia,

I don’t understand the bug you are reporting. What duplicates are you
referring to? How can I reproduce this bug?

Toggle quote (4 lines)
> guix/build-system/cargo.scm:128:4: Invalid keyword:
> ("rust-lazy-static" #<package rust-lazy-static@1.3.0
> /home/user/src/guix/gnu/packages/crates-io.scm:98 3690d10>)

What’s the code at the reported line?

--
Ricardo
S
S
swedebugia wrote on 2 Jul 2019 11:30
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 36456@debbugs.gnu.org)
2ad3fe4d-1528-96b4-800b-4a305f707a75@riseup.net
On 2019-07-01 21:54, Ricardo Wurmus wrote:
Toggle quote (6 lines)
>
> Hi swedebugia,
>
> I don’t understand the bug you are reporting. What duplicates are you
> referring to? How can I reproduce this bug?

I sent the whole crates-io.scm to the bug-adress which you can use to
reproduce.

The duplicates in that file are a lot of double imported crates by arne.
I'm pruning the duplicates by hand right now and building some of the
most referenced packages (like rust-rand) with some degree of success.

The error reported only arises with arnes duplicates added to my own
~200 imported crates.

Toggle quote (8 lines)
>
>> guix/build-system/cargo.scm:128:4: Invalid keyword:
>> ("rust-lazy-static" #<package rust-lazy-static@1.3.0
>> /home/user/src/guix/gnu/packages/crates-io.scm:98 3690d10>)
>
> What’s the code at the reported line?
>

(define-public rust-lazy-static

(package

(name "rust-lazy-static") <--- line 98

(version "1.3.0")

(source

(origin

(method url-fetch)

(uri (crate-uri "lazy_static" version))

(file-name

(string-append name "-" version ".tar.gz"))

(sha256

(base32

"052ac27w189hrf1j3hz7sga46rp84zl2hqnzyihxv78mgzr2jmxw"))))

(build-system cargo-build-system)

(arguments

`(#:cargo-inputs (("rust-spin" ,rust-spin))))

(home-page


(synopsis

"A macro for declaring lazily evaluated statics in Rust.")

(description

"This package provides a macro for declaring lazily evaluated
statics in Rust.")

(license #f)))

--
Cheers Swedebugia
L
L
Ludovic Courtès wrote on 5 Jul 2019 23:33
(name . swedebugia)(address . swedebugia@riseup.net)(address . 36456@debbugs.gnu.org)
87d0ioi2tn.fsf@gnu.org
Hi swedebugia,

swedebugia <swedebugia@riseup.net> skribis:

Toggle quote (10 lines)
> In guix/build-system/cargo.scm:
> 260:27 3 (lower "rust-backtrace-0.3.32" #:source _ #:inputs _ # . #)
> 231:4 2 (expand-crate-sources _ _)
> 170:23 1 (crate-closure _)
> 128:4 0 (_ #:cargo-inputs _)
>
> guix/build-system/cargo.scm:128:4: Invalid keyword:
> ("rust-lazy-static" #<package rust-lazy-static@1.3.0
> /home/user/src/guix/gnu/packages/crates-io.scm:98 3690d10>)

This is Guile’s way of saying that you passed an arbitrary value where a
keyword was expected, as in this example:

Toggle snippet (4 lines)
scheme@(guile-user)> ((lambda* (x #:key foo) (list x foo)) 1 2)
<unnamed port>:1209:1: Invalid keyword: 2

IOW, the error is in the ‘arguments’ field of this rust-backtrace-0.3.32
package.

HTH!

Ludo’.
L
L
Ludovic Courtès wrote on 5 Jul 2019 23:34
control message for bug #36456
(address . control@debbugs.gnu.org)
87bly8i2ry.fsf@gnu.org
tags 36456 notabug
close 36456
quit
?
Your comment

This issue is archived.

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

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