I’ve been working on porting corebird to use the gnome-platform supplied by
gnome-3-24 snap. Everything is working except
gdk-pixbuf cannot load PNG images because
libpng16 is missing. I’ve tried adding it to my own snap but it seems it still can’t find it, so I’m guessing
libpng needs adding to the
gnome-3-24 platform snap.
(corebird:12936): corebird-CRITICAL **: Account.vala:326: Unable to load image-loading module: /snap/corebird/x1/gnome-platform/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so: libpng16.so.16: cannot open shared object file: No such file or directory
I can see that library on my system:
$ snap install gnome-3-24
gnome-3-24 3.24 from 'canonical' installed
$ ls /snap/gnome-3-24/current/usr/lib/x86_64-linux-gnu/libpng*
So maybe this is a problem with the library path. Are you using the
desktop-launch script from the
desktop-gnome-platform cloud part to launch your app?
hmm, you’re right it looks like I’m wrong and the file is present in the gnome-3-24 snap. I wonder why corebird or rather gdk-pixbuf can’t find it. Yes I’m using the
desktop-launch script from
desktop-gnome-platform. Everything else is working correctly including picking up the proper ubuntu theme, so at least some of the paths are right.
I’ve configured my corebird snap with the following command:
oh, I see, gdk-pixbuf has managed to find it’s way into my own snap, so maybe it’s overriding the platform snap…
desktop-launch is meant to be used as a wrapper for your app. It looks like you’re instead letting it run and then running a second program. This means you won’t see any of the environment variables it sets.
Try something like:
command: desktop-launch $SNAP/usr/bin/corebird
no, the issue was in my libopenh264-helper snap. I didn’t export my overridden LD_LIBRARY_PATH which that script sets. Correcting that made everything work correctly.
Specifically, the libopenh264-launch script works exactly the same way the desktop-launch script does but adding a different set of data (retaining the old data, only adding to it) then execing the next command on the commandline, which is desktop-launch which does the same and execs the next command which is env which does the same and execs corebird after adding the GST_PLUGIN* variable overrides.