Missing dependency for Xournal++

  • Open
  • quality assurance status badge
Details
4 participants
  • Alexander Asteroth
  • Daniel Meißner
  • Ludovic Courtès
  • Maxime Devos
Owner
unassigned
Submitted by
Daniel Meißner
Severity
normal
D
D
Daniel Meißner wrote on 19 Nov 2021 10:19
(address . bug-guix@gnu.org)(name . Alexander Asteroth)(address . alexander.asteroth@h-brs.de)
87fsrsijtk.fsf@ruhr-uni-bochum.de
Hi Guix,

there is a problem with the package xournalpp on Guix master. To
reproduce run:

Toggle snippet (24 lines)
$ guix shell --pure xournalpp -- xournalpp
** Message: 10:08:54.258: TEXTDOMAINDIR = (null), PACKAGE_LOCALE_DIR = /gnu/store/dw4ca44bncb2cl0q7yx53lh1md90dcwg-xournalpp-1.1.0/share/locale, chosen directory = /gnu/store/dw4ca44bncb2cl0q7yx53lh1md90dcwg-xournalpp-1.1.0/share/locale
ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
** Message: 10:08:54.289: Plugin "MigrateFontSizes" UI initialized
**
Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme Adwaita (gtk-icon-theme-error-quark, 0)
Bail out! Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme Adwaita (gtk-icon-theme-error-quark, 0)

** (xournalpp:2068): WARNING **: 10:08:54.371: [Crash Handler] Crashed with signal 6

** (xournalpp:2068): WARNING **: 10:08:54.371: [Crash Handler] Wrote crash log to: /home/daniel/.cache/xournalpp/errorlogs/errorlog.20211119-100854.log

** (xournalpp:2068): WARNING **: 10:08:54.478: Trying to emergency save the current open document?

** (xournalpp:2068): WARNING **: 10:08:54.478: Successfully saved document to "/home/daniel/.config/xournalpp/emergencysave.xopp"

Alexander Asteroth, who discovered the problem, wrote to help-guix:
Toggle quote (4 lines)
> I found the reason. Xournal++ needs gnome-icon-theme to be installed
> as well. So it should probably go into the dependencies of the
> package.

This problem is easily missed when installing Xournal++ on a Guix system
with Gnome as DE.

Best
Daniel
D
D
Daniel Meißner wrote on 19 Nov 2021 10:49
Re: xounalpp package issues
(address . 51968@debbugs.gnu.org)(name . Alexander Asteroth)(address . alexander.asteroth@h-brs.de)
875ysoiif0.fsf@ruhr-uni-bochum.de
Hi!

Further investigation reveals that the missing file `image-missing.png'
is in the package adwaita-icon-theme and not gnome-icon-theme. Note
that simply installing the package in the same profile does not help:

Toggle snippet (24 lines)
$ guix shell --pure xournalpp adwaita-icon-theme -- xournalpp
** Message: 10:46:08.511: TEXTDOMAINDIR = (null), PACKAGE_LOCALE_DIR = /gnu/store/dw4ca44bncb2cl0q7yx53lh1md90dcwg-xournalpp-1.1.0/share/locale, chosen directory = /gnu/store/dw4ca44bncb2cl0q7yx53lh1md90dcwg-xournalpp-1.1.0/share/locale
ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
** Message: 10:46:08.543: Plugin "MigrateFontSizes" UI initialized
**
Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme Adwaita (gtk-icon-theme-error-quark, 0)
Bail out! Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme Adwaita (gtk-icon-theme-error-quark, 0)

** (xournalpp:4093): WARNING **: 10:46:08.624: [Crash Handler] Crashed with signal 6

** (xournalpp:4093): WARNING **: 10:46:08.624: [Crash Handler] Wrote crash log to: /home/daniel/.cache/xournalpp/errorlogs/errorlog.20211119-104608.log

** (xournalpp:4093): WARNING **: 10:46:08.723: Trying to emergency save the current open document?

** (xournalpp:4093): WARNING **: 10:46:08.724: Successfully saved document to "/home/daniel/.config/xournalpp/emergencysave.xopp"

This is because the variable XDG_DATA_DIRS is not set. Setting it to
the correct value fixes the problem:

Toggle snippet (18 lines)
$ guix shell --pure xournalpp adwaita-icon-theme
[env]$ echo $XDG_DATA_DIRS

[env]$ export XDG_DATA_DIRS=$GUIX_ENVIRONMENT/share
[env]$ xournalpp
** Message: 10:48:30.406: TEXTDOMAINDIR = (null), PACKAGE_LOCALE_DIR = /gnu/store/dw4ca44bncb2cl0q7yx53lh1md90dcwg-xournalpp-1.1.0/share/locale, chosen directory = /gnu/store/dw4ca44bncb2cl0q7yx53lh1md90dcwg-xournalpp-1.1.0/share/locale
ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
** Message: 10:48:30.439: Plugin "MigrateFontSizes" UI initialized
[env]$

Best
Daniel
L
L
Ludovic Courtès wrote on 10 Dec 2021 14:32
Re: bug#51968: Missing dependency for Xournal++
(name . Daniel Meißner)(address . daniel.meissner-i4k@ruhr-uni-bochum.de)
87k0gca8lj.fsf@gnu.org
Hi Daniel,

Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de> skribis:

Toggle quote (31 lines)
> there is a problem with the package xournalpp on Guix master. To
> reproduce run:
>
> $ guix shell --pure xournalpp -- xournalpp
> ** Message: 10:08:54.258: TEXTDOMAINDIR = (null), PACKAGE_LOCALE_DIR = /gnu/store/dw4ca44bncb2cl0q7yx53lh1md90dcwg-xournalpp-1.1.0/share/locale, chosen directory = /gnu/store/dw4ca44bncb2cl0q7yx53lh1md90dcwg-xournalpp-1.1.0/share/locale
> ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
> ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
> ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
> ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
> ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
> ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
> ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
> ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
> ** Message: 10:08:54.289: Plugin "MigrateFontSizes" UI initialized
> **
> Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme Adwaita (gtk-icon-theme-error-quark, 0)
> Bail out! Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Icon 'image-missing' not present in theme Adwaita (gtk-icon-theme-error-quark, 0)
>
> ** (xournalpp:2068): WARNING **: 10:08:54.371: [Crash Handler] Crashed with signal 6
>
> ** (xournalpp:2068): WARNING **: 10:08:54.371: [Crash Handler] Wrote crash log to: /home/daniel/.cache/xournalpp/errorlogs/errorlog.20211119-100854.log
>
> ** (xournalpp:2068): WARNING **: 10:08:54.478: Trying to emergency save the current open document?
>
> ** (xournalpp:2068): WARNING **: 10:08:54.478: Successfully saved document to "/home/daniel/.config/xournalpp/emergencysave.xopp"
>
> Alexander Asteroth, who discovered the problem, wrote to help-guix:
>> I found the reason. Xournal++ needs gnome-icon-theme to be installed
>> as well. So it should probably go into the dependencies of the
>> package.

How should this be addressed? Adding ‘gnome-icon-theme’ as a propagated
input would be quite unusual, but maybe it’s become necessary?

Thanks,
Ludo’.
D
D
Daniel Meißner wrote on 10 Dec 2021 14:54
(name . Ludovic Courtès)(address . ludo@gnu.org)
87fsr0k1jw.fsf@ruhr-uni-bochum.de
Hi Ludo,

Ludovic Courtès writes:
Toggle quote (10 lines)
> Daniel Meißner skribis:
>
>> there is a problem with the package xournalpp on Guix master. To
>> reproduce run:
>>
>> $ guix shell --pure xournalpp -- xournalpp
>> [...]
> How should this be addressed? Adding ‘gnome-icon-theme’ as a propagated
> input would be quite unusual, but maybe it’s become necessary?

In fact, I think it should be adwaita-icon-theme. Anyways, I am not
familiar with how GTK loads its icons but maybe we could patch the
sources to look for the icon in the right places so that we can just add
it as an input?

Best
Daniel
D
D
Daniel Meißner wrote on 17 Dec 2021 11:06
(address . 51968@debbugs.gnu.org)
87a6gzv94l.fsf@ruhr-uni-bochum.de
Hi Alexander, hi Ludo’,

Ludovic Courtès writes:
Toggle quote (9 lines)
> Hi Daniel,
>
> Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de> skribis:
>
>> there is a problem with the package xournalpp on Guix master. To
>> reproduce run:
>>
>> $ guix shell --pure xournalpp -- xournalpp

[...]

Toggle quote (4 lines)
> How should this be addressed? Adding ‘gnome-icon-theme’ as a
> propagated input would be quite unusual, but maybe it’s become
> necessary?

I have done some more analysis. First of all, I was wrong in pointing
out it has to be ‘adwaita-icon-theme’ for it to work, ‘gnome-icon-theme’
does also work. Of course, you then get a different ‘image-missing’
icon. However, let me elaborate a bit:

The following command tries to invoke xournalpp in a pure and
environment. It crashes because it cannot find ‘image-missing.png’. It
tries to load this icon in the first place because it cannot load its
own toolbar icons.

#+begin_src bash
guix shell --pure xournalpp -- xournalpp
#+end_src

However, when run from within Gnome it works without problems and the
toolbar icons show up. Running the following prevents the crash but
most of the toolbar icons now show the ‘image-missing’ icon:

#+begin_src bash
guix shell --pure xournalpp gnome-icon-theme
export XDG_DATA_DIRS=$GUIX_ENVIRONMENT/share
xournalpp
#+end_src

Depending on whether one uses ‘gnome-icon-theme’ or ‘adwaita-icon-theme’
different icons for ‘image-missing’ are used.

It seems to me that evince also does not find all of its icons.
However, it does not crash because it has ‘adwaita-icon-theme’ as one of
its inputs (although it is just an input, not a propagated input). The
missing icon is the ‘view-sidebar-symbolic-ltr’ and is complained about
after opening some PDF.

#+begin_src bash
guix shell --pure evince -- evince
#+end_src

Also in this case when run from Gnome the sidebar icon is correctly
displayed.

So in order to address the crash it seems natural to add either
‘gnome-icon-theme’ or ’adwaita-icon-theme’ to the list of inputs. For
example, the following package definition yields a “working” Xournalpp
in the sense that it does not crash.

#+begin_src scheme
(use-modules (guix packages)
(gnu packages pdf)
(gnu packages gnome))

(package/inherit xournalpp
(inputs (modify-inputs (package-inputs xournalpp)
(append adwaita-icon-theme))))
#+end_src

Put the above in a file named ‘xournalpp-fix.scm’ and then run:

#+begin_src bash
guix shell --pure -f xournalpp-fix.scm -- xournalpp
#+end_src

Xournalpp does not crash, however, the correct toolbar icons are still
missing and this seems to be the actual problem. Any ideas where to
look for the problem? I have not tried to run Xournalpp in an XFCE
environment to see if the toolbar icons are missing there, too. But
maybe Alexander has, since he discovered the problem in the first place.
As I am using Gnome, I have never run into this issue before despite
having been using Xournalpp under Guix for a while now.

Since evince also shows this behaviour in an isolated environment:
Might there be a general underlying problem?

Best
Daniel
A
A
Alexander Asteroth wrote on 17 Dec 2021 17:14
(name . Daniel Meißner)(address . daniel.meissner-i4k@ruhr-uni-bochum.de)
87czlvkxd7.fsf@h-brs.de
Hi Daniel, Hi Ludovic,

I can reproduce the missing icons issue by running

Toggle quote (2 lines)
> guix shell --pure -f xournalpp-fix.scm -- xournalpp

as suggested below. Wondering why the icons are not missing when I run
xournalpp in my environment I discovered that

Toggle quote (2 lines)
> guix shell --pure gtk+ -f xournalpp-fix.scm -- xournalpp

resolves this problem.

Looking at your xournalpp-fix.scm file I wondered what the function
modify-input exactly does (and how to add gtk+ to the append clause). I
don't find neither documentation in the manuals nor code for it in a
guix checkout (when I do a recursive grep in the source for guix or gnu
modules the result is empty).

Cheers,
Alex

On Fri, Dec 17 2021, 11:06:02, Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de> wrote:

Toggle quote (96 lines)
> Hi Alexander, hi Ludo’,
>
> Ludovic Courtès writes:
>> Hi Daniel,
>>
>> Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de> skribis:
>>
>>> there is a problem with the package xournalpp on Guix master. To
>>> reproduce run:
>>>
>>> $ guix shell --pure xournalpp -- xournalpp
>
> [...]
>
>> How should this be addressed? Adding ‘gnome-icon-theme’ as a
>> propagated input would be quite unusual, but maybe it’s become
>> necessary?
>
> I have done some more analysis. First of all, I was wrong in pointing
> out it has to be ‘adwaita-icon-theme’ for it to work, ‘gnome-icon-theme’
> does also work. Of course, you then get a different ‘image-missing’
> icon. However, let me elaborate a bit:
>
> The following command tries to invoke xournalpp in a pure and
> environment. It crashes because it cannot find ‘image-missing.png’. It
> tries to load this icon in the first place because it cannot load its
> own toolbar icons.
>
> #+begin_src bash
> guix shell --pure xournalpp -- xournalpp
> #+end_src
>
>
> However, when run from within Gnome it works without problems and the
> toolbar icons show up. Running the following prevents the crash but
> most of the toolbar icons now show the ‘image-missing’ icon:
>
> #+begin_src bash
> guix shell --pure xournalpp gnome-icon-theme
> export XDG_DATA_DIRS=$GUIX_ENVIRONMENT/share
> xournalpp
> #+end_src
>
>
> Depending on whether one uses ‘gnome-icon-theme’ or ‘adwaita-icon-theme’
> different icons for ‘image-missing’ are used.
>
> It seems to me that evince also does not find all of its icons.
> However, it does not crash because it has ‘adwaita-icon-theme’ as one of
> its inputs (although it is just an input, not a propagated input). The
> missing icon is the ‘view-sidebar-symbolic-ltr’ and is complained about
> after opening some PDF.
>
> #+begin_src bash
> guix shell --pure evince -- evince
> #+end_src
>
>
> Also in this case when run from Gnome the sidebar icon is correctly
> displayed.
>
> So in order to address the crash it seems natural to add either
> ‘gnome-icon-theme’ or ’adwaita-icon-theme’ to the list of inputs. For
> example, the following package definition yields a “working” Xournalpp
> in the sense that it does not crash.
>
> #+begin_src scheme
> (use-modules (guix packages)
> (gnu packages pdf)
> (gnu packages gnome))
>
> (package/inherit xournalpp
> (inputs (modify-inputs (package-inputs xournalpp)
> (append adwaita-icon-theme))))
> #+end_src
>
>
> Put the above in a file named ‘xournalpp-fix.scm’ and then run:
>
> #+begin_src bash
> guix shell --pure -f xournalpp-fix.scm -- xournalpp
> #+end_src
>
> Xournalpp does not crash, however, the correct toolbar icons are still
> missing and this seems to be the actual problem. Any ideas where to
> look for the problem? I have not tried to run Xournalpp in an XFCE
> environment to see if the toolbar icons are missing there, too. But
> maybe Alexander has, since he discovered the problem in the first place.
> As I am using Gnome, I have never run into this issue before despite
> having been using Xournalpp under Guix for a while now.
>
> Since evince also shows this behaviour in an isolated environment:
> Might there be a general underlying problem?
>
> Best
> Daniel
-----BEGIN PGP SIGNATURE-----

iQFQBAEBCAA6FiEEXU8UwBfdlxG/YNXXLg/GxGpHPCwFAmG8uxQcHGFsZXhhbmRl
ci5hc3Rlcm90aEBoLWJycy5kZQAKCRAuD8bEakc8LKwvB/9AYaD3wmvxPq2+vz5V
VSRsq1axW+WYFaSDKEPrbLQEoITazvOSwpiOB4Y5cRkhvF46psDAjTCEVdzl28XK
8+Fqw464fNjcdIrcN2nP6tkRLaUmSN64U2CLesrny21VubPVNmg6mEgJfjj4d4P3
3cZ/yeIESES2RT9q4SOpoNiiDL5q7shuYlatx9qwBdPe+7cD4yKYBvdkddjiG4gr
w3HyeDlIBEuV4MTzkktXr8SAf0DY6ldMoQn756YVrNdDW7OP+B2jqj+xf/JDa6C2
6oRsMmUCuhSKiO9GoplK1251UFysiJYQy3F4diD8+j1928TZ/NVbGEbvRg8ZHYQe
3Gzi
=KCvH
-----END PGP SIGNATURE-----

A
A
Alexander Asteroth wrote on 21 Dec 2021 09:45
(name . Daniel Meißner)(address . daniel.meissner-i4k@ruhr-uni-bochum.de)
87ee66e3wp.fsf@h-brs.de
Hi Daniel,

On Mon, Dec 20 2021, 14:47:24, Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de> wrote:
Toggle quote (14 lines)
>> I can reproduce the missing icons issue by running
>>
>>> guix shell --pure -f xournalpp-fix.scm -- xournalpp
>>
>> as suggested below. Wondering why the icons are not missing when I run
>> xournalpp in my environment I discovered that
>>
>>> guix shell --pure gtk+ -f xournalpp-fix.scm -- xournalpp
>>
>> resolves this problem.
>
> This is weird since gtk+ already is an input to xournalpp (despite not a
> propagated one). What desktop environment are you using?

That is *really* strange, is it? I'm using no desktop environment. Just
EXWM as window manager.

Toggle quote (12 lines)
>
>> Looking at your xournalpp-fix.scm file I wondered what the function
>> modify-input exactly does (and how to add gtk+ to the append
>> clause). I don't find neither documentation in the manuals nor code
>> for it in a guix checkout (when I do a recursive grep in the source
>> for guix or gnu modules the result is empty).
>
> This ‘modify-input’ form is actually a macro and it is documented in the
> latest version of the manual [1]. This macro is part of a big surface
> level syntax change for packages which arrived with the
> core-updates-frozen merge. See [2] for a nice blog post.

In the meantime I found that as well. But the documentation (from my
perspective) is unfortunately incomplete. It neither specifies the full
semantics (without looking into the macro-code) nor does it tell me,
what kind of clauses I can put e.g. into (modify-input ...). How is
(append ...) translated? The web document links to the list append
function which it might somehow translate to but that is not documented
either (at least I dont find it).

This seems to be a general problem with the documentation to me (that
it doesn't fully document neither syntax nor semantics). Others have
problems using guile (which I don't have)...

Cheers,

Alex

Toggle quote (12 lines)
> As I have
> mentioned, gtk+ is already an input for xournalpp. If it were not, you
> could add it using:
>
> (modify-inputs (package-inputs xournalpp)
> (append adwaita-icon-theme gtk+))
>
> Best,
> Daniel
>
> 1: https://guix.gnu.org/manual/devel/en/html_node/Defining-Package-Variants.html#index-modify_002dinputs
> 2: https://guix.gnu.org/de/blog/2021/the-big-change/
M
M
Maxime Devos wrote on 21 Dec 2021 11:51
(address . 51968@debbugs.gnu.org)
8428aecd8d2d15dbcf057a8e85f40ea70705311f.camel@telenet.be
Hi,

Alexander Asteroth schreef op di 21-12-2021 om 09:45 [+0100]:
Toggle quote (6 lines)
> [...]
> In the meantime I found that as well. But the documentation (from my
> perspective) is unfortunately incomplete. It neither specifies the
> full
> semantics (without looking into the macro-code)

‘Modify the given package inputs, as returned by package-inputs & co.,
according to the given clauses. The example below removes the GMP and
ACL inputs of Coreutils and _adds libcap to the back of the input
list_:

(modify-inputs (package-inputs coreutils)
(delete "gmp" "acl")
(append libcap))’

(Emphasis mine.) Seems like the behaviour of 'append' is specified?
Except that it isn't explicitely stated there can be multiple
arguments, although this seems implied by the 'delete' example.

Toggle quote (3 lines)
> nor does it tell me,
> what kind of clauses I can put e.g. into (modify-input ...).

The manual documnets ‘delete’, ’append’ and ‘replace’, and ends with
‘the last type of clause is prepend’, no?

Toggle quote (6 lines)
> How is
> (append ...) translated? The web document links to the list append
> function which it might somehow translate to but that is not
> documented
> either (at least I dont find it).

The ‘append’ procedure is from Guile, not Guix.
Also, it doesn't link to the 'append' procedure?
--- nevermind, the 'append' in the code example does link to the Guile
manual. Seems like a bug, because 'append' accepts lists, not elements
of lists. Likewise for 'delete'.

About how ‘(append ...)’ is translated:

‘The example below [...] adds libcap to the back of the input list’.

I don't see how the documentation could be more complete,
unless you're looking for a less informal description of the syntax,
e.g. as in the documentation for 'match' or 'define-record-type' in
Guile.

Greetings,
Maxime

Toggle quote (1 lines)
>
D
D
Daniel Meißner wrote on 21 Dec 2021 12:43
(name . Alexander Asteroth)(address . alexander.asteroth@h-brs.de)
87wnjy18um.fsf@ruhr-uni-bochum.de
Alexander Asteroth writes:

Toggle quote (19 lines)
> On Mon, Dec 20 2021, 14:47:24, Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de> wrote:
>>> I can reproduce the missing icons issue by running
>>>
>>>> guix shell --pure -f xournalpp-fix.scm -- xournalpp
>>>
>>> as suggested below. Wondering why the icons are not missing when I run
>>> xournalpp in my environment I discovered that
>>>
>>>> guix shell --pure gtk+ -f xournalpp-fix.scm -- xournalpp
>>>
>>> resolves this problem.
>>
>> This is weird since gtk+ already is an input to xournalpp (despite not a
>> propagated one). What desktop environment are you using?
>
> That is *really* strange, is it? I'm using no desktop environment. Just
> EXWM as window manager.
>

I can confirm that adding gtk+ to the profile makes Xournal++ find its
icons. I did a comparison of the environment variables of the two ‘guix
shell’ invocations and here’s the thing:

Toggle snippet (24 lines)
$ guix shell --pure -f xournalpp-fix.scm -- /usr/bin/env
LOGNAME=daniel
XAUTHORITY=/run/user/1000/gdm/Xauthority
HOME=/home/daniel
TERM=dumb
USER=daniel
DISPLAY=:1
PATH=/gnu/store/jrhzgh2pjzq2jbvcp4jgy7zznprkigh4-profile/bin
GUIX_ENVIRONMENT=/gnu/store/jrhzgh2pjzq2jbvcp4jgy7zznprkigh4-profile
$ guix shell --pure gtk+ -f xournalpp-fix.scm -- /usr/bin/env
LOGNAME=daniel
XAUTHORITY=/run/user/1000/gdm/Xauthority
HOME=/home/daniel
TERM=dumb
USER=daniel
DISPLAY=:1
PATH=/gnu/store/n6fkzsjvppxaqaw5a2whgxw0zzs85563-profile/bin:/gnu/store/n6fkzsjvppxaqaw5a2whgxw0zzs85563-profile/sbin
GUIX_GTK3_PATH=/gnu/store/n6fkzsjvppxaqaw5a2whgxw0zzs85563-profile/lib/gtk-3.0
XDG_DATA_DIRS=/gnu/store/n6fkzsjvppxaqaw5a2whgxw0zzs85563-profile/share
XCURSOR_PATH=/gnu/store/n6fkzsjvppxaqaw5a2whgxw0zzs85563-profile/share/icons
GDK_PIXBUF_MODULE_FILE=/gnu/store/n6fkzsjvppxaqaw5a2whgxw0zzs85563-profile/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
GUIX_ENVIRONMENT=/gnu/store/n6fkzsjvppxaqaw5a2whgxw0zzs85563-profile

As you can see: among others the XDG_DATA_DIRS is set which causes
Xournal++ to find its icons. Plus the GDK_PIXBUF_MODULE_FILE also
resolves the problem that Xournal++ cannot recognize the file format of
its application icon ‘pixmaps/com.github.xournalpp.xournalpp.svg’ which
also happens with ‘guix shell --pure -f xournalpp-fix.scm -- xournalpp’.

These missing environment variables are probably because the package
definition does not use glib-or-gtk-build-system but cmake-build-system.
WDYT? Maxime, can you confirm this and how should we fix this?

Toggle quote (13 lines)
>> This ‘modify-input’ form is actually a macro and it is documented in the
>> latest version of the manual [1]. This macro is part of a big surface
>> level syntax change for packages which arrived with the
>> core-updates-frozen merge. See [2] for a nice blog post.
>
> In the meantime I found that as well. But the documentation (from my
> perspective) is unfortunately incomplete. It neither specifies the full
> semantics (without looking into the macro-code) nor does it tell me,
> what kind of clauses I can put e.g. into (modify-input ...). How is
> (append ...) translated? The web document links to the list append
> function which it might somehow translate to but that is not documented
> either (at least I dont find it).

As Maxime writes, the examples show how to use the syntax. However,
honestly, I looked up the definition of ‘modify-inputs’ in (guix
packages) because I felt a bit like guessing which is probably what you
were feeling while reading the manual. It could indeed state more
clearly that each of CLAUSES can be one of the following forms:

(append names ...)
(prepend names ...)
(delete names ...)
(replace name replacement)

Especially because ‘replace’ breaks the pattern. Also it would be nice
to mention that the names can be specified be either the package name as
a string or a package object.

Best
Daniel
M
M
Maxime Devos wrote on 21 Dec 2021 23:46
573f1192b63e39255ac46053a235e94a8015a7cf.camel@telenet.be
Daniel Meißner schreef op di 21-12-2021 om 12:43 [+0100]:
Toggle quote (10 lines)
> As you can see: among others the XDG_DATA_DIRS is set which causes
> Xournal++ to find its icons.  Plus the GDK_PIXBUF_MODULE_FILE also
> resolves the problem that Xournal++ cannot recognize the file format of
> its application icon ‘pixmaps/com.github.xournalpp.xournalpp.svg’ which
> also happens with ‘guix shell --pure -f xournalpp-fix.scm -- xournalpp’.
>
> These missing environment variables are probably because the package
> definition does not use glib-or-gtk-build-system but cmake-build-system.
> WDYT?  Maxime, can you confirm this and how should we fix this?

Now I read these two paragraphs, I think what was going wrong with the
modify-inputs adding gtk+: that modify-inputs only adds gtk+ to the
inputs, it doesn't cause gtk+ to be added to the profile whenever
xournalpp is added to the profile. For the latter, you need
propagated-inputs, but that's to be avoided due to $REASONS
(propagation conflicts, profile building performance, profile
pollution, ...).

Anyway, a wrap-program setting XDG_DATA_DIRS (and
GDK_PIXBUF_MODULE_FILE?) appropriately might be sufficient here (see
e.g. the package definition of gedit).

Adding XDG_DATA_DIRS as a native-search-path to xournalpp might work as
well, but it's a rather generic search path so I'd try to avoid that.

Greetings,
Maxime.
?
Your comment

Commenting via the web interface is currently disabled.

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

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