unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#61911: error: mate-polkit: unbound variable
@ 2023-03-02 10:03 Maxime Devos
  2023-03-02 14:36 ` Josselin Poiret via Bug reports for GNU Guix
  0 siblings, 1 reply; 4+ messages in thread
From: Maxime Devos @ 2023-03-02 10:03 UTC (permalink / raw)
  To: 61911


[-- Attachment #1.1.1: Type: text/plain, Size: 3090 bytes --]

Unlike https://issues.guix.gnu.org/42601, this happens _outside_ 
./pre-inst-env:

$ LC_ALL=C guix build mate-polkit
Backtrace:
In ice-9/boot-9.scm:
    222:29 19 (map1 (((gnu packages guile)) ((gnu packages image)) # ?))
    222:29 18 (map1 (((gnu packages image)) ((gnu packages #)) ((?)) ?))
    222:29 17 (map1 (((gnu packages kde-frameworks)) ((gnu # #)) (#) ?))
    222:29 16 (map1 (((gnu packages linux)) ((gnu packages #)) ((?)) ?))
    222:29 15 (map1 (((gnu packages pkg-config)) ((gnu packages #)) ?))
    222:29 14 (map1 (((gnu packages python)) ((gnu packages qt)) (#) ?))
    222:29 13 (map1 (((gnu packages qt)) ((gnu packages xdisorg)) # #))
    222:29 12 (map1 (((gnu packages xdisorg)) ((gnu packages xfce)) #))
    222:17 11 (map1 (((gnu packages xfce)) ((gnu packages xorg))))
   3327:17 10 (resolve-interface (gnu packages xfce) #:select _ #:hide ?)
In ice-9/threads.scm:
     390:8  9 (_ _)
In ice-9/boot-9.scm:
   3253:13  8 (_)
In ice-9/threads.scm:
     390:8  7 (_ _)
In ice-9/boot-9.scm:
   3544:20  6 (_)
    2836:4  5 (save-module-excursion #<procedure 7fdaa6fff630 at ice-?>)
   3564:26  4 (_)
In unknown file:
            3 (primitive-load-path "gnu/packages/xfce" #<procedure 7f?>)
In gnu/packages/xfce.scm:
   1156:19  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:
error: mate-polkit: unbound variable

$ guix describe
   guix af95f2d
     bewaarplaats-URL: https://git.savannah.gnu.org/git/guix.git
     tak: master
     commit: af95f2d8f98eb2c8c64954bb2fd0b70838899174
   nonguix 110f914
     bewaarplaats-URL: https://gitlab.com/nonguix/nonguix
     tak: master
     commit: 110f914f81d0d2c67a45f9b2f87a5dc7ec54dfd0

The backtrace only mentions Guix modules, so the bug doesn't appear to 
be in the extra channel should be irrelevant.

gnu/packages/xfce.scm: 1156:19:

[... mate-screenscraver ...]
     (build-system glib-or-gtk-build-system)
     (arguments
      `(#:configure-flags
        ;; FIXME: There is a permissions problem with screen locking
        ;; which effectively locks you out completely. Enable locking
        ;; once this has been fixed.
        (list "--enable-locking" "--with-kbd-layout-indicator"
              "--with-xf86gamma-ext" "--enable-pam"
              "--disable-schemas-compile" "--without-console-kit");L1156
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'autoconf
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
                     (dbus-dir (string-append out 
"/share/dbus-1/services")))
              (setenv "SHELL" (which "sh"))
              (setenv "CONFIG_SHELL" (which "sh"))
              (substitute* "configure"
                (("dbus-1") ""))))))))

Something is screwy with the line number information too, as 
mate-screensaver doesn't mention mate-polkit.

Greetings,
Maxime.

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#61911: error: mate-polkit: unbound variable
  2023-03-02 10:03 bug#61911: error: mate-polkit: unbound variable Maxime Devos
@ 2023-03-02 14:36 ` Josselin Poiret via Bug reports for GNU Guix
  2023-03-02 15:11   ` Maxime Devos
  2023-03-06 23:05   ` Ludovic Courtès
  0 siblings, 2 replies; 4+ messages in thread
From: Josselin Poiret via Bug reports for GNU Guix @ 2023-03-02 14:36 UTC (permalink / raw)
  To: Maxime Devos, 61911; +Cc: Julien Lepiller

[-- Attachment #1: Type: text/plain, Size: 1307 bytes --]

Hi Maxime,

Maxime Devos <maximedevos@telenet.be> writes:

> In unknown file:
>             3 (primitive-load-path "gnu/packages/xfce" #<procedure 7f?>)
> In gnu/packages/xfce.scm:
>    1156:19  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:
> error: mate-polkit: unbound variable

This is the same kind of issue as [1]: both xfce and mate require each
other (the second through mate -> freedesktop -> kde-frameworks ->
kde-plasma -> display-managers -> xfce), and depending on the order in
which they're loaded, mate-polkit-for-xfce might get defined before
mate-polkit is.  The solution I suggested there was to define the
variant in the same file as the original package, but here I'm not sure
if this is the right call.

In general, I'd much rather try to get rid of those pesky module cycles,
as they cause general headaches for guix pull.  I remember Julien
using (guix modules) to do some analysis at the Guix days, maybe we
could get some pointers on how to handle this specific situation?

WDYT?

[1] https://issues.guix.gnu.org/61885
   (mid: F29B8BFE-A175-4128-8093-4A810681E235@winter.cafe)

-- 
Josselin Poiret

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 682 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#61911: error: mate-polkit: unbound variable
  2023-03-02 14:36 ` Josselin Poiret via Bug reports for GNU Guix
@ 2023-03-02 15:11   ` Maxime Devos
  2023-03-06 23:05   ` Ludovic Courtès
  1 sibling, 0 replies; 4+ messages in thread
From: Maxime Devos @ 2023-03-02 15:11 UTC (permalink / raw)
  To: Josselin Poiret, 61911, 61885; +Cc: Julien Lepiller


[-- Attachment #1.1.1: Type: text/plain, Size: 2409 bytes --]



Op 02-03-2023 om 15:36 schreef Josselin Poiret:
> Hi Maxime,
> 
> Maxime Devos <maximedevos@telenet.be> writes:
> 
>> In unknown file:
>>              3 (primitive-load-path "gnu/packages/xfce" #<procedure 7f?>)
>> In gnu/packages/xfce.scm:
>>     1156:19  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:
>> error: mate-polkit: unbound variable
> 
> This is the same kind of issue as [1]: both xfce and mate require each
> other (the second through mate -> freedesktop -> kde-frameworks ->
> kde-plasma -> display-managers -> xfce), and depending on the order in
> which they're loaded, mate-polkit-for-xfce might get defined before
> mate-polkit is.  The solution I suggested there was to define the
> variant in the same file as the original package, but here I'm not sure
> if this is the right call.
> 
> In general, I'd much rather try to get rid of those pesky module cycles,
> as they cause general headaches for guix pull.  I remember Julien
> using (guix modules) to do some analysis at the Guix days, maybe we
> could get some pointers on how to handle this specific situation?
> 
> WDYT?
> 
> [1] https://issues.guix.gnu.org/61885
>     (mid: F29B8BFE-A175-4128-8093-4A810681E235@winter.cafe)

I haven't gone to Guix days so I can't comment on that, but I'd like to 
note that there are some simple patches for breaking up lots of package 
cycles at <https://issues.guix.gnu.org/54539#62> (*).  In particular, 
#:use-module -> #:autoload appears promising (^).

Basically, you can consider a module reference to be 'strong' if its of 
the form (define stuff (package (inherit reference)) ...), and 'weak' if 
its just a package input (or more generally, something thunked). 
'Strong' cycles are problematic, but 'weak' cycles should be resolvable 
by delaying loading the required modules until needed.

I don't know if these patches would solve this particular 'mate-polkit' 
issue -- if the 'mate -> freedesktop -> ... -> xfce' cycle is 'weak', 
something like those patches should work, but if it isn't, those patches 
would be insufficient.

(*) Beware of https://issues.guix.gnu.org/54539#63 though; looks like I 
made some mistakes in hurd.scm and image.scm.

Greetings,
Maxime.

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#61911: error: mate-polkit: unbound variable
  2023-03-02 14:36 ` Josselin Poiret via Bug reports for GNU Guix
  2023-03-02 15:11   ` Maxime Devos
@ 2023-03-06 23:05   ` Ludovic Courtès
  1 sibling, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2023-03-06 23:05 UTC (permalink / raw)
  To: Josselin Poiret; +Cc: Julien Lepiller, Maxime Devos, 61911

Hi Josselin & Maxime,

Josselin Poiret <dev@jpoiret.xyz> skribis:

> Maxime Devos <maximedevos@telenet.be> writes:
>
>> In unknown file:
>>             3 (primitive-load-path "gnu/packages/xfce" #<procedure 7f?>)
>> In gnu/packages/xfce.scm:
>>    1156:19  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:
>> error: mate-polkit: unbound variable
>
> This is the same kind of issue as [1]: both xfce and mate require each
> other (the second through mate -> freedesktop -> kde-frameworks ->
> kde-plasma -> display-managers -> xfce), and depending on the order in
> which they're loaded, mate-polkit-for-xfce might get defined before
> mate-polkit is.  The solution I suggested there was to define the
> variant in the same file as the original package, but here I'm not sure
> if this is the right call.

It is the right call.  The (unwritten?) rule is to always define
variants in the same module as the original module, to avoid top-level
circular references.

I pushed it as 0d963875278d585eb86bc87127efa20a8d627595 as I think it
should be considered a rather serious issue.

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-03-06 23:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-02 10:03 bug#61911: error: mate-polkit: unbound variable Maxime Devos
2023-03-02 14:36 ` Josselin Poiret via Bug reports for GNU Guix
2023-03-02 15:11   ` Maxime Devos
2023-03-06 23:05   ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).