I have a fix for a problem that only affects the flatpak version of GIMP. I have tested the code using the ‘normal’ build and simulating a flatpak environment (export container=“flatpak”) and it works but I really would like to test it with a flatpak build before submitting an MR
I created ~/gimp_prefix and set GIMP_PREFIX to this folder. I then created ~/GIMP_flatpak and cloned GIMP into this folder (using HTTPS (on the PC where I build GIMP ‘normally’ I use SSH but I don’t have this setup on the laptop where I’m trying to build the flatpak version - I don’t suppose that this is the problem though)). I then ran ~/GIMP_flatpak/gimp/build/linux/flatpak/1_build-deps-flatpak.sh - this seemed to be successful and created files in ~/gimp_prefix.
Running ~/GIMP_flatpak/gimp/build/linux/flatpak/2_build-gimp-flatpak.sh failed when it started building gimp-data (which it had automatically downloaded) as follows:
richard@Pavilion-Notebook:~/GIMP_flatpak/gimp/_build$ flatpak-builder --run --ccache “$GIMP_PREFIX” /home/richard/GIMP_flatpak/gimp/build/linux/flatpak/org.gimp.GIMP-nightly.json ninja
[59/2623] Generating gimp-data/cursors/gimp-tool-cursors_c with a custom command
FAILED: gimp-data/cursors/gimp-tool-cursors.c
/usr/bin/glib-compile-resources gimp-data/cursors/gimp-tool-cursors.gresource.xml --sourcedir …/gimp-data/cursors --c-name gimp_tool_cursors --internal --generate --target gimp-data/cursors/gimp-tool-cursors.c --dependency-file gimp-data/cursors/gimp-tool-cursors.c.d
(gdk-pixbuf-pixdata:369): GLib-GObject-CRITICAL **: 17:07:45.204: g_object_ref: assertion ‘G_IS_OBJECT (object)’ failed
(gdk-pixbuf-pixdata:369): glycin-CRITICAL **: 17:07:45.210: A loader needs to be initiatilized with exatly one of ‘file’, ‘stream’, or ‘bytes’.
(gdk-pixbuf-pixdata:369): GLib-GObject-CRITICAL **: 17:07:45.213: g_object_unref: assertion ‘G_IS_OBJECT (object)’ failed
failed to load “…/gimp-data/cursors/cursor-bad.png”: Failed to load image ?../gimp-data/cursors/cursor-bad.png?: A loader can only be used once
gimp-data/cursors/gimp-tool-cursors.gresource.xml: Child process exited with code 1.
[64/2623] Linking target libgimpcolor/libgimpcolor-3.0.so.0.100.3
ninja: build stopped: subcommand failed.
richard@Pavilion-Notebook:~/GIMP_flatpak/gimp/_build$
I have also tried starting with a fresh ~/GIMP_flatpak folder, cloning GIMP and gimp-data in to it. Then in a terminal window in gimp running the command:
flatpak-builder --run --ccache “$GIMP_PREFIX” build/linux/flatpak/org.gimp.GIMP-nightly.json meson setup _build --buildtype=release -Db_lto=true -Dprefix=/app/ -Dlibdir=/app/lib/
this seems to work correctly.
then:
cd _build
flatpak-builder --run --ccache “$GIMP_PREFIX” /home/richard/GIMP_flatpak/gimp/build/linux/flatpak/org.gimp.GIMP-nightly.json ninja
this fails in the same way as noted above.
Does anyone have any idea what I am doing wrong?