GNU bug report logs - #55367
guix refresh fails. struct-vtable: Wrong type argument in position 1 (expecting struct)

Previous Next

Package: guix;

Reported by: Rostislav Svoboda <rostislav.svoboda <at> gmail.com>

Date: Wed, 11 May 2022 13:12:02 UTC

Severity: normal

To reply to this bug, email your comments to 55367 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#55367; Package guix. (Wed, 11 May 2022 13:12:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rostislav Svoboda <rostislav.svoboda <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 11 May 2022 13:12:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Rostislav Svoboda <rostislav.svoboda <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: guix refresh fails. struct-vtable: Wrong type argument in position 1
 (expecting struct)
Date: Wed, 11 May 2022 15:10:51 +0200
[Message part 1 (text/plain, inline)]
The /home/bost/.config/guix/current/bin/guix is attached.
Greetings,
Bost


$ guix refresh
nongnu/packages/wine.scm:160:13: dxvk would be upgraded from 1.9 to 1.10.1
nongnu/packages/wasm.scm:146:13: wasm32-wasi-libcxx would be upgraded
from 13.0.0 to 14.0.3
nongnu/packages/vpn.scm:31:13: zerotier would be upgraded from 1.8.4 to 1.8.9
nongnu/packages/video.scm:56:13: intel-media-driver would be upgraded
from 22.2.2 to 2018Q2.1
nongnu/packages/video.scm:31:13: gmmlib would be upgraded from 22.0.3 to 22.1.2
nongnu/packages/playonlinux.scm:41:13: playonlinux would be upgraded
from 4.3.4 to 4.4
nongnu/packages/nvidia.scm:410:2: nvidia-settings would be upgraded
from 470.86 to 510.68.02
nongnu/packages/mozilla.scm:94:13: firefox would be upgraded from
100.0 to 100.0.
nongnu/packages/linux.scm:194:11: raspberrypi-firmware would be
upgraded from 1.20220120 to 1.20220331
following redirection to
`https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/'...
nongnu/packages/linux.scm:790:5: warning: no valid tags found for
intel-microcode
nongnu/packages/linux.scm:576:7: warning: no tags were found for
rtl8192eu-linux-module
nongnu/packages/linux.scm:841:13: sof-firmware would be upgraded from
1.7 to 2.1.1
nongnu/packages/linux.scm:53:2: linux would be upgraded from 5.17.5 to 5.17.6
nongnu/packages/gog.scm:36:13: lgogdownloader would be upgraded from 3.7 to 3.9
nongnu/packages/game-development.scm:280:2: warning: no valid tags
found for fury
nongnu/packages/game-development.scm:185:7: warning: no valid tags
found for eduke32
following redirection to
`http://downloads.sourceforge.net/mirrorproblem?failedmirror=deac-ams.dl.sourceforge.net'...
Backtrace:
          15 (primitive-load "/home/bost/.config/guix/current/bin/gu…")
In guix/ui.scm:
   2230:7 14 (run-guix . _)
  2193:10 13 (run-guix-command _ . _)
In ice-9/boot-9.scm:
  1752:10 12 (with-exception-handler _ _ #:unwind? _ # _)
  1752:10 11 (with-exception-handler _ _ #:unwind? _ # _)
In guix/store.scm:
   658:37 10 (thunk)
  2129:25  9 (run-with-store #<store-connection 256.99 7f3142848a00> …)
In guix/scripts/refresh.scm:
   578:14  8 (_ _)
In srfi/srfi-1.scm:
    634:9  7 (for-each #<procedure 7f31509298a0 at guix/scripts/ref…> …)
In guix/scripts/refresh.scm:
   378:10  6 (check-for-package-update #<package gog-world-of-goo <at> 1…> …)
In srfi/srfi-1.scm:
   858:15  5 (any1 #<procedure 7f314c55de60 at guix/upstream.scm:28…> …)
In guix/upstream.scm:
   284:15  4 (_ _)
In guix/memoization.scm:
    101:0  3 (_ #<hash-table 7f31422cfce0 55/113> #<package gog-wor…> …)
In guix/gnu-maintenance.scm:
   188:20  2 (_)
In ice-9/boot-9.scm:
  1685:16  1 (raise-exception _ #:continuable? _)
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure struct-vtable: Wrong type argument in position 1
(expecting struct): #f
[guix (application/octet-stream, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#55367; Package guix. (Wed, 11 May 2022 13:17:01 GMT) Full text and rfc822 format available.

Message #8 received at 55367 <at> debbugs.gnu.org (full text, mbox):

From: Rostislav Svoboda <rostislav.svoboda <at> gmail.com>
To: 55367 <at> debbugs.gnu.org
Subject: Re: bug#55367: Acknowledgement (guix refresh fails. struct-vtable:
 Wrong type argument in position 1 (expecting struct))
Date: Wed, 11 May 2022 15:15:58 +0200
And also I just noticed, for firefox the indicated version numbers are
the same. I.e. from 100.0 to 100.0
```
nongnu/packages/mozilla.scm:94:13: firefox would be upgraded from
100.0 to 100.0.
```




Information forwarded to bug-guix <at> gnu.org:
bug#55367; Package guix. (Wed, 11 May 2022 13:50:02 GMT) Full text and rfc822 format available.

Message #11 received at 55367 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Rostislav Svoboda <rostislav.svoboda <at> gmail.com>
Cc: 55367 <at> debbugs.gnu.org
Subject: Re: bug#55367: guix refresh fails. struct-vtable: Wrong type
 argument in position 1 (expecting struct)
Date: Wed, 11 May 2022 15:49:27 +0200
Hi,

Rostislav Svoboda <rostislav.svoboda <at> gmail.com> skribis:

> In guix/scripts/refresh.scm:
>    378:10  6 (check-for-package-update #<package gog-world-of-goo <at> 1…> …)
> In srfi/srfi-1.scm:
>    858:15  5 (any1 #<procedure 7f314c55de60 at guix/upstream.scm:28…> …)
> In guix/upstream.scm:
>    284:15  4 (_ _)
> In guix/memoization.scm:
>     101:0  3 (_ #<hash-table 7f31422cfce0 55/113> #<package gog-wor…> …)
> In guix/gnu-maintenance.scm:
>    188:20  2 (_)
> In ice-9/boot-9.scm:
>   1685:16  1 (raise-exception _ #:continuable? _)
>   1685:16  0 (raise-exception _ #:continuable? _)
>
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> In procedure struct-vtable: Wrong type argument in position 1
> (expecting struct): #f

This happens with a package that’s not in the ‘guix’ channel (see
above).  I can’t find the definition of that package though, so I can’t
really help.

If you can reproduce it with a package that’s in Guix, or if you can
point me to the source, we might be able to better understand.

The code at guix/gnu-maintenance.scm:188:20 checks a URI, so my guess is
that the source of that package is not a valid URI, and thus
‘string->uri’ returns #false.

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#55367; Package guix. (Wed, 11 May 2022 14:09:02 GMT) Full text and rfc822 format available.

Message #14 received at 55367 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Ludovic Courtès <ludo <at> gnu.org>, Rostislav Svoboda
 <rostislav.svoboda <at> gmail.com>
Cc: 55367 <at> debbugs.gnu.org
Subject: Re: bug#55367: guix refresh fails. struct-vtable: Wrong type
 argument in position 1 (expecting struct)
Date: Wed, 11 May 2022 16:08:52 +0200
[Message part 1 (text/plain, inline)]
Ludovic Courtès schreef op wo 11-05-2022 om 15:49 [+0200]:
> The code at guix/gnu-maintenance.scm:188:20 checks a URI, so my guess is
> that the source of that package is not a valid URI, and thus
> ‘string->uri’ returns #false.

It's "gogdownloader://world_of_goo/en3installer0".

(string->uri "gogdownloader://world_of_goo/en3installer0")
$1 = #f
(string->uri "gogdownloader://worldofgoo/en3installer0")
$2 = #f

Apparently it doesn't like _ characters.  Makes some sense for http,
https and ftp, but what about other protocols?  Do the Internet RFCs
say anything about this?

Worse, looks like non-ASCII characters (that are valid DNS names, at
least ignoring punycode encodings and such) aren't supported:

(string->uri "https://www.étoile.fr")
$3 = #f

though maybe that's due to the URI -- IRI distinction.  Even then, not
supporting IRIs (even if in a separate module or such) seems like quite
a limitation.  (What does Guile aim to implement -- the strict version
of URIs, or the more general IRIs, sometimes just named URIs?)

However, non-ASCII in 'path' is supported:

(string->uri "https://etoile.fr/étoile.html")

#<<uri> scheme: https userinfo: #f host: "etoile.fr" port: #f path: "/étoile.html" query: #f fragment: #f>

Seems a bit arbitrary to me ...
I guess 'top-level-regexp' and 'domain-label-regexp' might need to be adjusted.

Though there's a comment

;; See RFC 3986 #3.2.2 for comments on percent-encodings, IDNA (RFC
;; 3490), and non-ASCII host names.

in the Guile module ... maybe we want IRIs instead?

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#55367; Package guix. (Wed, 11 May 2022 14:14:01 GMT) Full text and rfc822 format available.

Message #17 received at 55367 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Ludovic Courtès <ludo <at> gnu.org>, Rostislav Svoboda
 <rostislav.svoboda <at> gmail.com>
Cc: 55367 <at> debbugs.gnu.org
Subject: Re: bug#55367: guix refresh fails. struct-vtable: Wrong type
 argument in position 1 (expecting struct)
Date: Wed, 11 May 2022 16:13:00 +0200
[Message part 1 (text/plain, inline)]
Maxime Devos schreef op wo 11-05-2022 om 16:08 [+0200]:
> Though there's a comment
> 
> ;; See RFC 3986 #3.2.2 for comments on percent-encodings, IDNA (RFC
> ;; 3490), and non-ASCII host names.
> 
> in the Guile module ... maybe we want IRIs instead?

Some URI and IRI things on debbugs:

<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=49085> (handling more
unicode characters, though I don't know if this is also supports them
in the host component)

<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=53201> -- allow a
terminating dot (not i18n related).

Greetings,
Maxime

[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#55367; Package guix. (Thu, 12 May 2022 08:19:02 GMT) Full text and rfc822 format available.

Message #20 received at 55367 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: 55367 <at> debbugs.gnu.org, Rostislav Svoboda <rostislav.svoboda <at> gmail.com>
Subject: Re: bug#55367: guix refresh fails. struct-vtable: Wrong type
 argument in position 1 (expecting struct)
Date: Thu, 12 May 2022 10:18:24 +0200
Hi,

Maxime Devos <maximedevos <at> telenet.be> skribis:

> Ludovic Courtès schreef op wo 11-05-2022 om 15:49 [+0200]:
>> The code at guix/gnu-maintenance.scm:188:20 checks a URI, so my guess is
>> that the source of that package is not a valid URI, and thus
>> ‘string->uri’ returns #false.
>
> It's "gogdownloader://world_of_goo/en3installer0".
>
> (string->uri "gogdownloader://world_of_goo/en3installer0")
> $1 = #f
> (string->uri "gogdownloader://worldofgoo/en3installer0")
> $2 = #f

The second one works for me:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)>  (string->uri "gogdownloader://worldofgoo/en3installer0")
$7 = #<<uri> scheme: gogdownloader userinfo: #f host: "worldofgoo" port: #f path: "/en3installer0" query: #f fragment: #f>
--8<---------------cut here---------------end--------------->8---

The first one has an invalid authority part, which doesn’t match
‘authority-regexp’ (underscores are not permitted; I believe (web uri)
is correct here.)

> Worse, looks like non-ASCII characters (that are valid DNS names, at
> least ignoring punycode encodings and such) aren't supported:
>
> (string->uri "https://www.étoile.fr")
> $3 = #f

Right; I think ‘string->uri’ expects a Punycode-encoded string, which is
probably correct per RFC 3986.

That said, it’s beyond this scope of this bug report.

To me, the conclusion is that the package has a invalid URI, so it’s not
a Guix bug strictly speaking.  However, we could change
gnu-maintenance.scm so that it deals with invalid URIs gracefully.

Thoughts?

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#55367; Package guix. (Thu, 12 May 2022 08:58:01 GMT) Full text and rfc822 format available.

Message #23 received at 55367 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 55367 <at> debbugs.gnu.org, Rostislav Svoboda <rostislav.svoboda <at> gmail.com>
Subject: Re: bug#55367: guix refresh fails. struct-vtable: Wrong type
 argument in position 1 (expecting struct)
Date: Thu, 12 May 2022 10:57:09 +0200
[Message part 1 (text/plain, inline)]
Ludovic Courtès schreef op do 12-05-2022 om 10:18 [+0200]:
> > (string->uri "gogdownloader://worldofgoo/en3installer0")
> > $2 = #f
> 

Oops I miscopied this, needs to be

scheme@(guile-user)>  (string->uri
"gogdownloader://worldofgoo/en3installer0")
$7 = #<<uri> scheme: gogdownloader userinfo: #f host: "worldofgoo"
port: #f path: "/en3installer0" query: #f fragment: #f>

[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#55367; Package guix. (Thu, 12 May 2022 09:08:01 GMT) Full text and rfc822 format available.

Message #26 received at 55367 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 55367 <at> debbugs.gnu.org, Rostislav Svoboda <rostislav.svoboda <at> gmail.com>
Subject: Re: bug#55367: guix refresh fails. struct-vtable: Wrong type
 argument in position 1 (expecting struct)
Date: Thu, 12 May 2022 11:07:31 +0200
[Message part 1 (text/plain, inline)]
Ludovic Courtès schreef op do 12-05-2022 om 10:18 [+0200]:
> To me, the conclusion is that the package has a invalid URI, so it’s not
> a Guix bug strictly speaking.  However, we could change
> gnu-maintenance.scm so that it deals with invalid URIs gracefully.
> 
> Thoughts?

Maybe emit a warning and skip them?  Or just skip them (by returning
#false in the is-it-a-gnu-package procedure)?

Extending Guile to support IRIs can be left for later I think.

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#55367; Package guix. (Thu, 12 May 2022 09:48:02 GMT) Full text and rfc822 format available.

Message #29 received at 55367 <at> debbugs.gnu.org (full text, mbox):

From: Rostislav Svoboda <rostislav.svoboda <at> gmail.com>
To: Maxime Devos <maximedevos <at> telenet.be>, a <at> ajgrf.com
Cc: Ludovic Courtès <ludo <at> gnu.org>, 55367 <at> debbugs.gnu.org
Subject: Re: bug#55367: guix refresh fails. struct-vtable: Wrong type argument
 in position 1 (expecting struct)
Date: Thu, 12 May 2022 11:47:11 +0200
That invalid uri string comes from
    (uri "gogdownloader://world_of_goo/en3installer0")
https://gitlab.com/guix-gaming-channels/games/-/blob/master/games/packages/world-of-goo.scm#L122
and the commit was made by Alex Griffin <a <at> ajgrf.com> ~2,5 years ago
on Dec 17 2019.

@Alex if you remember, can you tell us please how it got committed?
(See the package definition below. The whole discussion is here
https://issues.guix.gnu.org/55367) Thanks

Greetings,
Bost

(define-public gog-world-of-goo
  (let ((buildno "29337")
        (binary (if (target-64bit?)
                  "data/x86_64/WorldOfGoo.bin.x86_64"
                  "data/x86/WorldOfGoo.bin.x86")))
    (package
      (inherit world-of-goo)
      (name "gog-world-of-goo")
      (version "1.51")
      (source
       (origin
        (method gog-fetch)
        (uri "gogdownloader://world_of_goo/en3installer0")
        (file-name (string-append "world_of_goo_"
                                  (string-replace-substring version "." "_")
                                  "_" buildno ".sh"))
        (sha256
         (base32
          "01bhwnlgpkrjz6sb72z8ci51pwb38b9bp4ifncw480022qlswya1"))))
      (build-system mojo-build-system)
      (arguments
       `(#:patchelf-plan
         `((,,binary
            ("libc" "sdl2" "sdl2-mixer" "libvorbis" "libogg" "gcc"
"mesa" "glu")))))
      (license (undistributable
                (string-append "file://data/noarch/docs/"
                               "End User License Agreement.txt"))))))




Information forwarded to bug-guix <at> gnu.org:
bug#55367; Package guix. (Sat, 18 Jan 2025 17:06:01 GMT) Full text and rfc822 format available.

Message #32 received at 55367 <at> debbugs.gnu.org (full text, mbox):

From: Navajeeth <yvv0 <at> proton.me>
To: "55367 <at> debbugs.gnu.org" <55367 <at> debbugs.gnu.org>
Subject: (No Subject)
Date: Sat, 18 Jan 2025 17:05:28 +0000
[Message part 1 (text/plain, inline)]
I still get this nearly two-and-a-half years on with the same package from guix-gaming.

Writing as a user, can’t Guix just skip over and not refresh packages with malformed definitions, and warn me about them at the end? I don’t want to have to go and find the offending package and remove it.

—Navajeeth
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#55367; Package guix. (Fri, 04 Apr 2025 13:30:03 GMT) Full text and rfc822 format available.

Message #35 received at 55367 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 55367 <at> debbugs.gnu.org, Maxime Devos <maximedevos <at> telenet.be>,
 Rostislav Svoboda <rostislav.svoboda <at> gmail.com>
Subject: Re: bug#55367: guix refresh fails. struct-vtable: Wrong type
 argument in position 1 (expecting struct)
Date: Fri, 04 Apr 2025 22:29:10 +0900
Hi,

Ludovic Courtès <ludo <at> gnu.org> writes:

[...]

> To me, the conclusion is that the package has a invalid URI, so it’s not
> a Guix bug strictly speaking.  However, we could change
> gnu-maintenance.scm so that it deals with invalid URIs gracefully.
>
> Thoughts?

+1 for your suggestion above.

-- 
Thanks,
Maxim




This bug report was last modified 74 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.