Inkscape 1.1 Crash on startup on NetBSD due to wrong XDG_DATA_DIRS
Current issue
In NetBSD, one of the issues when compiling was a crash on startup, with errors like (org.inkscape.Inkscape:66): Gtk-WARNING **: 10:54:36.278: Could not load image 'resources/template_about.svg': Couldn’t recognize the image file format for file “/usr/pkg/share/inkscape/ui/resources/template_about.svg”
This was introduced after inkscape@b97d55f4, which set XDG_DATA_DIRS if it was unset.
In NetBSD, this meant that the path /usr/pkg/share
was not included (this is hardcoded value in the patched glib2-NetBSD source code that is searched when XDG_DATA_DIRS is unset, and gave us the /usr/pkg/share/mime).
The NetBSD makefile has now been updated to overcome this problem. We are unsure what the appropriate fix would be in Inkscape proper, if one is necessary.
Original issue
I've tried updating the pkgsrc package from 1.0.2 (working fine) to 1.1. It builds and installs fine, but during startup complains about svg files and exits, without display a window.
(org.inkscape.Inkscape:66): Gtk-WARNING **: 10:54:36.278: Could not load image 'resources/template_about.svg': Couldn’t recognize the image file format for file “/usr/pkg/share/inkscape/ui/resources/template_about.svg”
(and many more like these, then ending with)
Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/pkg/share/inkscape/icons/hicolor/scalable/actions/image-missing.svg: Unrecognized image file format (gdk-pixbuf-error-quark, 3)
Bail out! Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/pkg/share/inkscape/icons/hicolor/scalable/actions/image-missing.svg: Unrecognized image file format (gdk-pixbuf-error-quark, 3)
gdk-pixbuf has SVG support, I tested this with:
gdk-pixbuf-thumbnailer /usr/pkg/share/inkscape/icons/hicolor/scalable/actions/image-missing.svg image-missing.png
which successfully creates a png file.
Now I'm not quite sure where else to look for the root of the problem.
The pkgsrc files for 1.0.2 are here:
https://github.com/NetBSD/pkgsrc/blob/trunk/graphics/inkscape/Makefile
The files for 1.1 are here:
Please let me know if you have any ideas what might be missing or wrong. Thank you!