-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't use gdk-pixbuf from ubuntu-app-platform #42
Comments
Hey @jhenstridge! I did some recent refactoring that I just merged in master. It was before I took some days off, but I'm pretty sure I did fix this along the way. Do you mind giving it a shot? |
Just cleaned the desktop-ubuntu-app-platform part and rebuilt, and I see the same loader error. Looking in the new script, it looks like you set the After I fixed that typo, the pixbuf loader cache and mime database (the other thing needed for gdk-pixbuf to work) seem to be generated correctly. I did run into one other problem though when running the app:
The simple solution here might be "don't build on Zesty", but it wasn't a problem with the old version of the part. Snapcraft had included a copy of the newer Qt5Core in my snap, but desktop-launch is now selecting libraries from ubuntu-app-platform/ in preference to ones found in the snap itself. I'm not sure whether to class this as a bug, or simply as something that is unsupported. |
oupss, you are corrct, the gtk side was correct, not the Qt one. At least this bug is now fixed (and I'll close it then, but we can continue the conversation) For the second one, yeah,"don't build on Zesty", as it's not supported, BUT, I think you can get away with that: |
Well, I guess my main point was that if I have a library in I realise that the circumstances of how I built this particular snap might be unsupported, but I wouldn't be surprised if there are other legitimate uses for this kind of thing. |
It should be the case for most of the things (it's the case for GNOME), and that was one of the main goal of the refactoring I merged this morning. |
I added a simple echo statement to desktop-launch to dump LD_LIBRARY_PATH, and this is what I got (line breaks added for easier reading):
So it is definitely favouring ubuntu-app-platform libraries over ones from the snap. There are also two places where double colons appear, which could be problematic: an empty entry in the list asks to search the current working directory. |
So the "qt4" entry above is because I hadn't run "snapcraft update", so the flavor-select file still read "USE_qt5appplatform". And the double colons seem to be from library paths added by snappy. I do wonder whether it'd make more sense for this part to append to LD_LIBRARY_PATH instead of prepending though: that would ensure that it doesn't override libraries distributed as part of the snap. |
Indeed, it's quite simple and should be appended instead of prepending. Now I remember that I rely on snapcraft for doing the "$SNAP" based LD_LIBRARY_PATH. Ok, so, this should be fix in 7a9d26b. I don't really know yet how the double colon is ending up here (can be runtime specifc or even snapcraft. I'll have to check this. |
Okay, just rebuilt my snap with the new part and everything is working. I think you're right about the doubled colons coming from snapcraft (in the "command-foo" files it generates). I'll follow that up there. Thanks for all your help. |
When putting together a snap that relied on the gdk-pixbuf libraries from the ubuntu-app-platform snap, I got the following error when running the program:
Looking at the
desktop-launch
script, the pixbuf loader cache file is only generated if gdk-pixbuf is distributed as part of the snap:In addition to searching for modules under
$SNAP/usr/lib/...
, it should also search under$SNAP/ubuntu-app-platform/usr/lib/...
, and do similar when looking for thegdk-pixbuf-query-loaders
script.The text was updated successfully, but these errors were encountered: