GIMP startup crash on minimal xorg/wm unless gtk+ in profile

  • Done
  • quality assurance status badge
Details
2 participants
  • Maxim Cournoyer
  • Runciter
Owner
unassigned
Submitted by
Runciter
Severity
normal
Merged with

Debbugs page

R
R
Runciter wrote on 21 May 08:34 -0700
(address . bug-guix@gnu.org)
877c2a3rle.fsf@whispers-vpn.org
Hello Guix,

I've noticed that the new Gimp version 3.0.0 crashed on startup for me.
The error message is:

(gimp:5025): GLib-GIO-ERROR **: 22:39:28.588: Settings schema 'org.gtk.Settings.FileChooser' is not installed
/gnu/store/vk8xddd7cr2dcsqjwvvyrhidg1brdsaq-gimp-3.0.0/lib/gimp/3.0/plug-ins/script-fu/script-fu: fatal error: GIMP crashed
Trace/breakpoint trap

Or a variant thereof.

This probably happens because my GUI is a relatively minimal Xorg + dwm.
If I install the package gtk+ onto my home profile, then Gimp 3.0.0
starts, and its file chooser apparently works.

Anyway, I don't want to have dbus in my profile anymore, and although
I've seen on the news that Gimp is now a full-blown Gtk app, it *still*
does not seem to want to play completely nice with my window
manager. Well, that is to say, its main window doesn't tile. So, I put
my foot down, no Gimp for Runciter in the near future.

Still, it occurs to me that gtk+ should probably be a propagated
input of gimp-3. Some Package(s) which probably have a similar run-time
dependency situation seem to proceed like this; such as zathura having a
propagated input to girara having a propagated input to gtk+.

I'm going to submit a patch, in case it is helpful.

Regards,
Runciter
R
R
Runciter wrote on 21 May 08:57 -0700
[PATCH v1] gnu: gimp-3: make gtk+ a propagated input.
(address . 78537@debbugs.gnu.org)(name . Runciter)(address . runciter@whispers-vpn.org)
7d5bf58e70febeecd84b82a9572d989d5cd195f0.1747843051.git.runciter@whispers-vpn.org
* gnu/packages/gimp.scm (gimp-3) [inputs]: Remove gtk+.
[propagated-inputs]: Add gtk+.

Signed-off-by: Runciter <runciter@whispers-vpn.org>
---
gnu/packages/gimp.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (26 lines)
diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm
index 08f71b9b1f..d059b2ac86 100644
--- a/gnu/packages/gimp.scm
+++ b/gnu/packages/gimp.scm
@@ -471,14 +471,15 @@ (define-public gimp-3
(lambda (_ stat)
(eq? 'regular (stat:type stat))))))))))
(inputs (modify-inputs (package-inputs gimp-2)
- (replace "gtk+" gtk+)
+ (delete "gtk+")
(prepend libxmu libxt)
(prepend python python-pygobject gjs)
(prepend libxslt)))
(native-inputs (modify-inputs (package-native-inputs gimp-2)
(prepend appstream-glib
gi-docgen
- libarchive)))))
+ libarchive)))
+ (propagated-inputs (list gtk+))))
(define-public gimp gimp-3)
(define-public gimp-next

base-commit: 646fef769d995122cca8f2aa2c82fa4cd32fb609
--
2.49.0
M
M
Maxim Cournoyer wrote on 3 Jun 03:54 -0700
Re: bug#78537: GIMP startup crash on minimal xorg/wm unless gtk+ in profile
(name . Runciter via Bug reports for GNU Guix)(address . bug-guix@gnu.org)
87a56payde.fsf@gmail.com
Hi,

Runciter via Bug reports for GNU Guix <bug-guix@gnu.org> writes:

Toggle quote (11 lines)
> Hello Guix,
>
> I've noticed that the new Gimp version 3.0.0 crashed on startup for me.
> The error message is:
>
> (gimp:5025): GLib-GIO-ERROR **: 22:39:28.588: Settings schema
> 'org.gtk.Settings.FileChooser' is not installed
> /gnu/store/vk8xddd7cr2dcsqjwvvyrhidg1brdsaq-gimp-3.0.0/lib/gimp/3.0/plug-ins/script-fu/script-fu:
> fatal error: GIMP crashed
> Trace/breakpoint trap

[...]

Toggle quote (7 lines)
> Still, it occurs to me that gtk+ should probably be a propagated
> input of gimp-3. Some Package(s) which probably have a similar run-time
> dependency situation seem to proceed like this; such as zathura having a
> propagated input to girara having a propagated input to gtk+.
>
> I'm going to submit a patch, in case it is helpful.

Wrapping the gimp binary should be preferred. I think it already is but
maybe something is missing?

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 3 Jun 03:55 -0700
control message for bug #78667
(address . control@debbugs.gnu.org)
878qm9aycf.fsf@gmail.com
merge 78667 78537
quit
R
R
Runciter wrote on 18 Jun 15:25 -0700
Re: bug#78537: GIMP startup crash on minimal xorg/wm unless gtk+ in profile
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 78537@debbugs.gnu.org)
878qlok7re.fsf@whispers-vpn.org
Hi,

"Maxim Cournoyer" <maxim.cournoyer@gmail.com> writes:

Toggle quote (3 lines)
> Wrapping the gimp binary should be preferred. I think it already is but
> maybe something is missing?

I've been looking at the package for nyxt which also has gtk-esque
inputs, I think maybe (just maybe), gimp needs to be started with
LD_LIBRARY_PATH pointing to the lib directory of the
gsettings-desktop-schema package in its environment.

I'll see when I have time to try this, if someone wants to have a go
don't hesitate.

Maxim, you marked #78667 as a duplicate of this bug. It's possible also
#78667 and this bug are duplicates of #78075.

Regards,

--
Runciter
R
R
Runciter wrote on 20 Jun 16:27 -0700
[PATCH v2] gnu: gimp-3: fix missing wrapping for gtk+ data files.
(address . 78537@debbugs.gnu.org)
4aed48b3bbe37016fc7dafa14dae6d724f8b5ab5.1750462019.git.runciter@whispers-vpn.org
* gnu/packages/gimp.scm (gimp-3)[arguments]<phases>:
Add wrapping for gtk+ data files in prefix to XDG_DATA_DIRS.

Signed-off-by: Runciter <runciter@whispers-vpn.org>
---
gnu/packages/gimp.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (19 lines)
diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm
index c602d3083a..e885e89784 100644
--- a/gnu/packages/gimp.scm
+++ b/gnu/packages/gimp.scm
@@ -466,7 +466,9 @@ (define-public gimp-3
`("GI_TYPELIB_PATH" =
(,(getenv "GI_TYPELIB_PATH")))
`("GUIX_PYTHONPATH" suffix
- (,(getenv "GUIX_PYTHONPATH")))))
+ (,(getenv "GUIX_PYTHONPATH")))
+ `("XDG_DATA_DIRS" prefix
+ (,(string-append #$gtk+ "/share")))))
(find-files (string-append #$output "/bin")
(lambda (_ stat)
(eq? 'regular (stat:type stat))))))))))

base-commit: a5768ec09332a625c709a20f76f0227aab2a9e5f
--
2.49.0
R
R
Runciter wrote on 20 Jun 16:42 -0700
Re: bug#78537: GIMP startup crash on minimal xorg/wm unless gtk+ in profile
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 78537@debbugs.gnu.org)
87ldpm3rq8.fsf@whispers-vpn.org
Hi Guix!

It wasn't LD_LIBRARY_PATH that needed wrapping finally, it was
XDG_DATA_DIRS.

I just submitted a revised patch.

When I think about this, after this patch, considering the case of
people who have both gtk+ and gimp in their profile, the variable
XDG_DATA_DIRS in the environment of a running gimp should be clobbered
or quasi-clobbered, however you want to call it. Although this should
generally not result in failures, it seems it has in the case of another
variable, bug#77921. I don't think it should be always preferred to use
'=' instead of 'prefix' for wrapping, though. If there's a cleaner way
to do this, let me know.

Regards,

--
Runciter
M
M
Maxim Cournoyer wrote on 20 Jun 23:12 -0700
(name . Runciter)(address . runciter@whispers-vpn.org)
87ldplhbcq.fsf@terra.mail-host-address-is-not-set
Hi,

Runciter <runciter@whispers-vpn.org> writes:

Toggle quote (16 lines)
> Hi Guix!
>
> It wasn't LD_LIBRARY_PATH that needed wrapping finally, it was
> XDG_DATA_DIRS.
>
> I just submitted a revised patch.
>
> When I think about this, after this patch, considering the case of
> people who have both gtk+ and gimp in their profile, the variable
> XDG_DATA_DIRS in the environment of a running gimp should be clobbered
> or quasi-clobbered, however you want to call it. Although this should
> generally not result in failures, it seems it has in the case of another
> variable, bug#77921. I don't think it should be always preferred to use
> '=' instead of 'prefix' for wrapping, though. If there's a cleaner way
> to do this, let me know.

I think prefix should work, even for the case referenced in #77921. I
had used = to be extra careful, but prefix is probably better if it
works.

If you are able to test it, you may want to standardize all wrapping in
gimp to use prefix.

--
Thanks,
Maxim
R
R
Runciter wrote on 22 Jun 21:55 -0700
[PATCH v3] gnu: gimp-3: fix missing wrapping for gtk+ data files.
(address . 78537@debbugs.gnu.org)
5b278096b87b550de8ef6d597351110e09d66c76.1750654399.git.runciter@whispers-vpn.org
* gnu/packages/gimp.scm (gimp-3)[arguments]<phases>:
Add wrapping for gtk+ data files in prefix to XDG_DATA_DIRS.
Change wrapping of GI_TYPELIB_PATH and GUIX_PYTHONPATH to prefix.

Change-Id: Ib6290bf5fbbf6268a03f75c89e0bb29c907fdf33
Signed-off-by: Runciter <runciter@whispers-vpn.org>
---
gnu/packages/gimp.scm | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

Toggle diff (28 lines)
diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm
index c602d3083a..65acc70a28 100644
--- a/gnu/packages/gimp.scm
+++ b/gnu/packages/gimp.scm
@@ -460,13 +460,15 @@ (define-public gimp-3
(for-each
(lambda (prog)
(wrap-program prog
- ;; Ensure GI_TYPELIB_PATH is not extended from the
+ ;; Ensure GI_TYPELIB_PATH is not suffixed to the
;; environment, as it could cause Gimp to crash (see
;; bug#77921).
- `("GI_TYPELIB_PATH" =
+ `("GI_TYPELIB_PATH" prefix
(,(getenv "GI_TYPELIB_PATH")))
- `("GUIX_PYTHONPATH" suffix
- (,(getenv "GUIX_PYTHONPATH")))))
+ `("GUIX_PYTHONPATH" prefix
+ (,(getenv "GUIX_PYTHONPATH")))
+ `("XDG_DATA_DIRS" prefix
+ (,(string-append #$gtk+ "/share")))))
(find-files (string-append #$output "/bin")
(lambda (_ stat)
(eq? 'regular (stat:type stat))))))))))

base-commit: a5768ec09332a625c709a20f76f0227aab2a9e5f
--
2.49.0
R
R
Runciter wrote on 22 Jun 22:12 -0700
Re: bug#78537: GIMP startup crash on minimal xorg/wm unless gtk+ in profile
87o6uff3dj.fsf@whispers-vpn.org
Hi,

"Maxim Cournoyer" <maxim.cournoyer@gmail.com> writes:

Toggle quote (7 lines)
> I think prefix should work, even for the case referenced in #77921. I
> had used = to be extra careful, but prefix is probably better if it
> works.
>
> If you are able to test it, you may want to standardize all wrapping in
> gimp to use prefix.

It's done, all wrappings now use prefix. I just submitted a revised
patch v3.

I have tested that gimp starts successfully with and without gtk+ in the
user profile.

While this is v3 of the patch, I have just realized that my global git
configuration was preventing the Change-Id from showing up at the end of
commit messages. As a result the first and v2 patches did not have a
Change-Id.

--
Runciter
M
M
Maxim Cournoyer wrote on 24 Jun 05:39 -0700
(name . Runciter)(address . runciter@whispers-vpn.org)(address . 78537@debbugs.gnu.org)
87pletjoun.fsf@terra.mail-host-address-is-not-set
Hi,

Runciter <runciter@whispers-vpn.org> writes:

Toggle quote (22 lines)
> Hi,
>
> "Maxim Cournoyer" <maxim.cournoyer@gmail.com> writes:
>
>> I think prefix should work, even for the case referenced in #77921. I
>> had used = to be extra careful, but prefix is probably better if it
>> works.
>>
>> If you are able to test it, you may want to standardize all wrapping in
>> gimp to use prefix.
>
> It's done, all wrappings now use prefix. I just submitted a revised
> patch v3.
>
> I have tested that gimp starts successfully with and without gtk+ in the
> user profile.
>
> While this is v3 of the patch, I have just realized that my global git
> configuration was preventing the Change-Id from showing up at the end of
> commit messages. As a result the first and v2 patches did not have a
> Change-Id.

Are you able to run it this way?

Toggle snippet (3 lines)
./pre-inst-env guix shell --pure gimp -- gimp

For me it still fails to run, apparently it fails to load its PNG icons.
Maybe it also needs to be wrapped with GDK_PIXBUF_MODULE_FILE ?

--
Thanks,
Maxim
R
R
Runciter wrote on 24 Jun 16:36 -0700
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 78537@debbugs.gnu.org)
87v7okemqf.fsf@whispers-vpn.org
"Maxim Cournoyer" <maxim.cournoyer@gmail.com> writes:

Toggle quote (9 lines)
> Are you able to run it this way?
>
> --8<---------------cut here---------------start------------->8---
> ./pre-inst-env guix shell --pure gimp -- gimp
> --8<---------------cut here---------------end--------------->8---
>
> For me it still fails to run, apparently it fails to load its PNG icons.
> Maybe it also needs to be wrapped with GDK_PIXBUF_MODULE_FILE ?

I hadn't tried and yes, it still fails to run in the pure environment.

I tried the obvious way of wrapping with GDK_PIXBUF_MODULE_FILE, gimp
was still unable to load its icons. I probably did it correctly because
I saw the value as expected in the wrapper script.

There's still something in my user profile that's helping gimp to start,
now it's not gtk+ anymore; this can be investigated. If that devolves
into a slow process of elimination, I'll be able to do that next week.

Regards,

--
Runciter
R
R
Runciter wrote on 25 Jun 16:39 -0700
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 78537@debbugs.gnu.org)
871pr72xyc.fsf@whispers-vpn.org
Hi Maxim and Guixers,

"Maxim Cournoyer" <maxim.cournoyer@gmail.com> writes:

Toggle quote (9 lines)
> Are you able to run it this way?
>
> --8<---------------cut here---------------start------------->8---
> ./pre-inst-env guix shell --pure gimp -- gimp
> --8<---------------cut here---------------end--------------->8---
>
> For me it still fails to run, apparently it fails to load its PNG icons.
> Maybe it also needs to be wrapped with GDK_PIXBUF_MODULE_FILE ?

Some progress!

I found that it currently needs the package gegl in the profile
understand the png format.

./pre-inst-env guix shell --pure gimp gegl -- gimp

This successfully showed the splash screen before crashing.

I'm on business trip and there's no hope that that my X60 will compile
guix, so I'm stuck testing the gimp package using 'ssh -Y' to back home,
until Sunday. So it will be helpful if someone can just confirm that
GIMP does crash after showing its splash screen with my latest patch +
gegl in the pure profile.

With gegl in the pure profile, it understands the png format, but it
still fails to recognize the svg format of at least one picture; this
probably relates to the package dependency structure, gimp depends on
libpng through its gegl input.

Regards,

--
Runciter
R
R
Runciter wrote on 29 Jun 08:26 -0700
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 78537@debbugs.gnu.org)
87seji1se3.fsf@whispers-vpn.org
Hi,

"Maxim Cournoyer" <maxim.cournoyer@gmail.com> writes:

Toggle quote (13 lines)
> Are you able to run it this way?
>
> --8<---------------cut here---------------start------------->8---
> ./pre-inst-env guix shell --pure gimp -- gimp
> --8<---------------cut here---------------end--------------->8---
>
> For me it still fails to run, apparently it fails to load its PNG icons.
> Maybe it also needs to be wrapped with GDK_PIXBUF_MODULE_FILE ?
>
> --
> Thanks,
> Maxim

So... No revised patch and I guess I won't be able to make progress in
the near future. I'm kind of at the end of my wits with this, and
definitely lacking knowledge about gtk. Here's where I'm at:

After applying my patch V3, that is to say wrapping the data files
directory of the gtk+ package into XDG_DATA_DIRS, you can get GIMP to
complete startup in a more minimal profile; most minimally, it can be
obtained with the following command:

./pre-inst-env guix shell --pure gimp gdk-pixbuf -- gimp

gdk-pixbuf pulls glib in its propagated inputs. Trials showed that gimp
needs glib in the profile in order to load PNG icons, and it also needs
gdk-pixbuf in the profile in order to load SVG icons.

Yet, trying your suggestion of wrapping GDK_PIBUF_MODULE_FILE has been
unsuccessful, both for SVG and PNG icons.

Creating a propagated input or a chain of propagated inputs from gimp to
gdk-pixbuf while applying the path V3 and leaving gtk+ out of the
propagated inputs of gimp should work, if that's acceptable.

Regards,

--
Runciter
M
M
Maxim Cournoyer wrote on 3 Jul 20:12 -0700
(name . Runciter)(address . runciter@whispers-vpn.org)(address . 78537@debbugs.gnu.org)
87jz4omyxi.fsf@guixotic.coop
Hi,

Runciter <runciter@whispers-vpn.org> writes:

Toggle quote (13 lines)
> Hi,
>
> "Maxim Cournoyer" <maxim.cournoyer@gmail.com> writes:
>
>> Are you able to run it this way?
>>
>> --8<---------------cut here---------------start------------->8---
>> ./pre-inst-env guix shell --pure gimp -- gimp
>> --8<---------------cut here---------------end--------------->8---
>>
>> For me it still fails to run, apparently it fails to load its PNG icons.
>> Maybe it also needs to be wrapped with GDK_PIXBUF_MODULE_FILE ?

[...]

Toggle quote (11 lines)
> So... No revised patch and I guess I won't be able to make progress in
> the near future. I'm kind of at the end of my wits with this, and
> definitely lacking knowledge about gtk. Here's where I'm at:
>
> After applying my patch V3, that is to say wrapping the data files
> directory of the gtk+ package into XDG_DATA_DIRS, you can get GIMP to
> complete startup in a more minimal profile; most minimally, it can be
> obtained with the following command:
>
> ./pre-inst-env guix shell --pure gimp gdk-pixbuf -- gimp

Interesting! As perhaps one last thing to check, you could compare the
environment variables set in that profile, or compare the output of
'strace -e file -f -s200 gimp' when it works and doesn't.

--
Thanks,
Maxim
R
R
Runciter wrote on 6 Jul 12:31 -0700
[PATCH v4] gnu: gimp-3: add wrappings to enable gimp startup in pure profile.
(address . 78537@debbugs.gnu.org)
8a4ade9a12745a805037096373726b01df63a70e.1751830256.git.runciter@whispers-vpn.org
* gnu/packages/gimp.scm (gimp-3)[arguments]<phases>:
Wrap value of GDK_PIXBUF_MODULE_FILE in wrapper script.
Add wrapping for gtk+ data files in prefix to XDG_DATA_DIRS.
Add wrapping for ahared-mime-info data files in prefix to XDG_DATA_DIRS.
Change wrapping of GI_TYPELIB_PATH and GUIX_PYTHONPATH to prefix.

Change-Id: I2cae7408f373bd46fbc3941ed2a8e2eee40633ec
---
gnu/packages/gimp.scm | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)

Toggle diff (40 lines)
diff --git a/gnu/packages/gimp.scm b/gnu/packages/gimp.scm
index c602d3083a..66c57c0e36 100644
--- a/gnu/packages/gimp.scm
+++ b/gnu/packages/gimp.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2021, 2022, 2025 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2025 Runciter <runciter@whispers-vpn.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -460,13 +461,19 @@ (define-public gimp-3
(for-each
(lambda (prog)
(wrap-program prog
- ;; Ensure GI_TYPELIB_PATH is not extended from the
+ ;; Ensure GI_TYPELIB_PATH is not suffixed to the
;; environment, as it could cause Gimp to crash (see
;; bug#77921).
- `("GI_TYPELIB_PATH" =
+ `("GI_TYPELIB_PATH" prefix
(,(getenv "GI_TYPELIB_PATH")))
- `("GUIX_PYTHONPATH" suffix
- (,(getenv "GUIX_PYTHONPATH")))))
+ `("GUIX_PYTHONPATH" prefix
+ (,(getenv "GUIX_PYTHONPATH")))
+ `("GDK_PIXBUF_MODULE_FILE" =
+ (,(getenv "GDK_PIXBUF_MODULE_FILE")))
+ `("XDG_DATA_DIRS" prefix
+ (,(string-append #$gtk+ "/share")))
+ `("XDG_DATA_DIRS" prefix
+ (,(string-append #$shared-mime-info "/share")))))
(find-files (string-append #$output "/bin")
(lambda (_ stat)
(eq? 'regular (stat:type stat))))))))))

base-commit: a5768ec09332a625c709a20f76f0227aab2a9e5f
--
2.50.0
R
R
Runciter wrote on 6 Jul 12:32 -0700
Re: bug#78537: GIMP startup crash on minimal xorg/wm unless gtk+ in profile
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 78537@debbugs.gnu.org)
87ikk5xghc.fsf@whispers-vpn.org
Hi,

"Maxim Cournoyer" <maxim.cournoyer@gmail.com> writes:

Toggle quote (34 lines)
> Hi,
>
> Runciter <runciter@whispers-vpn.org> writes:
>
>> Hi,
>>
>> "Maxim Cournoyer" <maxim.cournoyer@gmail.com> writes:
>>
>>> Are you able to run it this way?
>>>
>>> --8<---------------cut here---------------start------------->8---
>>> ./pre-inst-env guix shell --pure gimp -- gimp
>>> --8<---------------cut here---------------end--------------->8---
>>>
>>> For me it still fails to run, apparently it fails to load its PNG icons.
>>> Maybe it also needs to be wrapped with GDK_PIXBUF_MODULE_FILE ?
>
> [...]
>
>> So... No revised patch and I guess I won't be able to make progress in
>> the near future. I'm kind of at the end of my wits with this, and
>> definitely lacking knowledge about gtk. Here's where I'm at:
>>
>> After applying my patch V3, that is to say wrapping the data files
>> directory of the gtk+ package into XDG_DATA_DIRS, you can get GIMP to
>> complete startup in a more minimal profile; most minimally, it can be
>> obtained with the following command:
>>
>> ./pre-inst-env guix shell --pure gimp gdk-pixbuf -- gimp
>
> Interesting! As perhaps one last thing to check, you could compare the
> environment variables set in that profile, or compare the output of
> 'strace -e file -f -s200 gimp' when it works and doesn't.

Thanks for the advice Maxim, that did open new pathways for trial and
error.

I just submitted a patch version 4 which has gimp succeed at starting
without crashing in a pure shell.

Finally, it is very much necessary to export GDK_PIXBUF_MODULE_FILE from
the wrapper script, as you suggested. I must have missed it originally
because it is also imperative that gimp sees the data files of the
shared-mime-info package.

--
Runciter
M
M
Maxim Cournoyer wrote on 6 Jul 23:46 -0700
(name . Runciter)(address . runciter@whispers-vpn.org)(address . 78537@debbugs.gnu.org)
87plecjy58.fsf@guixotic.coop
Hello,

Runciter <runciter@whispers-vpn.org> writes:

[...]

Toggle quote (11 lines)
> Thanks for the advice Maxim, that did open new pathways for trial and
> error.
>
> I just submitted a patch version 4 which has gimp succeed at starting
> without crashing in a pure shell.
>
> Finally, it is very much necessary to export GDK_PIXBUF_MODULE_FILE from
> the wrapper script, as you suggested. I must have missed it originally
> because it is also imperative that gimp sees the data files of the
> shared-mime-info package.

Yay! Very good that you persevered on that one, that's a happy
resolution!

I'll look into trying and pushing your patch when I have a chance.

Well done!

--
Maxim
M
M
Maxim Cournoyer wrote on 8 Jul 06:09 -0700
Re: bug#78667: gimp crashes on startup on Ubuntu 25.10 foreign distro
(name . Runciter)(address . runciter@whispers-vpn.org)
87o6tusuaj.fsf_-_@guixotic.coop
Hi,

Runciter <runciter@whispers-vpn.org> writes:

Toggle quote (6 lines)
> * gnu/packages/gimp.scm (gimp-3)[arguments]<phases>:
> Wrap value of GDK_PIXBUF_MODULE_FILE in wrapper script.
> Add wrapping for gtk+ data files in prefix to XDG_DATA_DIRS.
> Add wrapping for ahared-mime-info data files in prefix to XDG_DATA_DIRS.
> Change wrapping of GI_TYPELIB_PATH and GUIX_PYTHONPATH to prefix.

Pushed as 6f9e15b913853762707f31974156069708b06e3b with some
modifications. The commit message now reads:

Toggle snippet (8 lines)
gnu: gimp-3: Fix execution outside of a profile.

* gnu/packages/gimp.scm (gimp-3) [arguments]
<phases> {wrap}: Adjust to wrap in prefix mode. Also wrap
GDK_PIXBUF_MODULE_FILE, and XDG_DATA_DIRS.
[native-inputs]: Add shared-mime-info.

[...]

Toggle quote (22 lines)
> (wrap-program prog
> - ;; Ensure GI_TYPELIB_PATH is not extended from the
> + ;; Ensure GI_TYPELIB_PATH is not suffixed to the
> ;; environment, as it could cause Gimp to crash (see
> ;; bug#77921).
> - `("GI_TYPELIB_PATH" =
> + `("GI_TYPELIB_PATH" prefix
> (,(getenv "GI_TYPELIB_PATH")))
> - `("GUIX_PYTHONPATH" suffix
> - (,(getenv "GUIX_PYTHONPATH")))))
> + `("GUIX_PYTHONPATH" prefix
> + (,(getenv "GUIX_PYTHONPATH")))
> + `("GDK_PIXBUF_MODULE_FILE" =
> + (,(getenv "GDK_PIXBUF_MODULE_FILE")))
> + `("XDG_DATA_DIRS" prefix
> + (,(string-append #$gtk+ "/share")))
> + `("XDG_DATA_DIRS" prefix
> + (,(string-append #$shared-mime-info "/share")))))
> (find-files (string-append #$output "/bin")
> (lambda (_ stat)
> (eq? 'regular (stat:type stat))))))))))

XDG_DATA_DIRS need not be duplicated, and references to packages should
be done via this-package-input/this-package-native-input or
search-input-file rather than ungexp directly, as this would make
rewriting inputs impossible:

Toggle snippet (35 lines)
@@ -460,13 +461,21 @@ (define-public gimp-3
(for-each
(lambda (prog)
(wrap-program prog
- ;; Ensure GI_TYPELIB_PATH is not extended from the
+ ;; Ensure GI_TYPELIB_PATH is not suffixed to the
;; environment, as it could cause Gimp to crash (see
;; bug#77921).
- `("GI_TYPELIB_PATH" =
+ `("GI_TYPELIB_PATH" prefix
(,(getenv "GI_TYPELIB_PATH")))
- `("GUIX_PYTHONPATH" suffix
- (,(getenv "GUIX_PYTHONPATH")))))
+ `("GUIX_PYTHONPATH" prefix
+ (,(getenv "GUIX_PYTHONPATH")))
+ `("GDK_PIXBUF_MODULE_FILE" =
+ (,(getenv "GDK_PIXBUF_MODULE_FILE")))
+ `("XDG_DATA_DIRS" prefix
+ (,(string-append #$(this-package-input "gtk+")
+ "/share")
+ ,(string-append #$(this-package-native-input
+ "shared-mime-info")
+ "/share")))))
(find-files (string-append #$output "/bin")
(lambda (_ stat)
(eq? 'regular (stat:type stat))))))))))
@@ -478,7 +487,8 @@ (define-public gimp-3
(native-inputs (modify-inputs (package-native-inputs gimp-2)
(prepend appstream-glib
gi-docgen
- libarchive)))))
+ libarchive
+ shared-mime-info)))))

I've followed-up with a couple additions, such as libjxl support.

Closing!

--
Thanks,
Maxim
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 78537@patchwise.org

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