error: mate-polkit: unbound variable

  • Done
  • quality assurance status badge
Details
3 participants
  • Josselin Poiret
  • Ludovic Courtès
  • Maxime Devos
Owner
unassigned
Submitted by
Maxime Devos
Severity
important
M
M
Maxime Devos wrote on 2 Mar 2023 11:03
(name . bug-guix)(address . bug-guix@gnu.org)
df5d8424-064c-fac0-24b8-d52e8280bf06@telenet.be
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
tak: master
commit: af95f2d8f98eb2c8c64954bb2fd0b70838899174
nonguix 110f914
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: OpenPGP_signature
J
J
Josselin Poiret wrote on 2 Mar 2023 15:36
(name . Julien Lepiller)(address . julien@lepiller.eu)
874jr3kyp3.fsf@jpoiret.xyz
Hi Maxime,

Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (11 lines)
> 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?

(mid: F29B8BFE-A175-4128-8093-4A810681E235@winter.cafe)

--
Josselin Poiret
-----BEGIN PGP SIGNATURE-----

iQHEBAEBCAAuFiEEOSSM2EHGPMM23K8vUF5AuRYXGooFAmQAtFgQHGRldkBqcG9p
cmV0Lnh5egAKCRBQXkC5FhcaiqyWC/9va6hqDTEpmQ/z0Glfr50D94VrJCxoHaxt
3Ud5T2iMY15I8arfz24usLtGcC/d7yYRty5bEfdYDiLKIkuZvwBMlc1vUPARr4Ik
/lnl2wCKsDmsDqs5IrQqTAiXpp7jWd7U5NZuXVU0iBQICq9NgOfD0dMKlJ+fxm1v
wLjG8OxB4UqHM1Ua6sOSWXvrvPcgmFeFfZHgYBDm+kLt90G4jK9T/eZKR0MXulSy
qfg8Z5xJWIkmVLpxixnMo0BJ0eUwcQCEDVOV/ZPtm5ucOmXf82EWmMLOhBCHbqa+
5D3Xa8drnnvCMHHIP0+AYt0HIllP7njvhUJr9aiofhxza6uE3DWSIh16fht5PCSp
mQMqWlXlloZZ3bxKr5zLx5EKwzGWEo8CGvYEmk1QdK7EgDzwL+7yrVr0JVqOuIsV
XbVfhpsToohjfNN+ToG5fEXISHcK2Exqw5DvYRPFbhUXIBplw67rujHrhHgAnM7b
w9Qqj0yE0QVDChwJVnELxbVg+UGtD9M=
=qkBm
-----END PGP SIGNATURE-----

M
M
Maxime Devos wrote on 2 Mar 2023 16:11
(name . Julien Lepiller)(address . julien@lepiller.eu)
27cd1079-8e93-f9b8-42b3-584d7bfbf1e8@telenet.be
Op 02-03-2023 om 15:36 schreef Josselin Poiret:
Toggle quote (32 lines)
> 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#63though; looks like I
made some mistakes in hurd.scm and image.scm.
Greetings,
Maxime.
Attachment: OpenPGP_signature
L
L
Ludovic Courtès wrote on 6 Mar 2023 23:51
control message for bug #61911
(address . control@debbugs.gnu.org)
87fsahfq8r.fsf@gnu.org
severity 61911 important
quit
L
L
Ludovic Courtès wrote on 7 Mar 2023 00:05
Re: bug#61911: error: mate-polkit: unbound variable
(name . Josselin Poiret)(address . dev@jpoiret.xyz)
87356hfpks.fsf@gnu.org
Hi Josselin & Maxime,

Josselin Poiret <dev@jpoiret.xyz> skribis:

Toggle quote (21 lines)
> 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’.
L
L
Ludovic Courtès wrote on 7 Mar 2023 00:05
control message for bug #61911
(address . control@debbugs.gnu.org)
871qm1fpkd.fsf@gnu.org
close 61911
quit
?
Your comment

This issue is archived.

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

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