I am trying to build mysnap with extensions: [gnome-3-34] and everything is fine - I have mysnap for x64 arch. But when I run it, I got the error with the next log:
snap run mysnap
Warning: Schema “org.gnome.system.locale” has path “/system/locale/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy” has path “/system/proxy/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy.http” has path “/system/proxy/http/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy.https” has path “/system/proxy/https/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy.ftp” has path “/system/proxy/ftp/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
Warning: Schema “org.gnome.system.proxy.socks” has path “/system/proxy/socks/”. Paths starting with “/apps/”, “/desktop/” or “/system/” are deprecated.
/snap/mysnap/x1/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0: symbol lookup error: /snap/mysnap/x1/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3.so.0: undefined symbol: pango_font_description_set_variations
ERROR: /snap/mysnap/x1/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0 exited abnormally with status 127
/snap/mysnap/x1/usr/bin/mysnap: symbol lookup error: /snap/mysnap/x1/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3.so.0: undefined symbol: pango_font_description_set_variations
I use gtk/gtkmm/pango/cairo in mysnap app, how can I fix it? Thanks!
This error makes me think that there is a mismatch between the version of GTK 3 your application was built for and the version of GTK 3 that is used in the snap. Could you maybe try the gnome-3-34 extension instead? That extension does a bit more setup of the build environment to make sure the correct version of GTK 3 is used.
It might also be best to remove libglib2.0-dev from build and stage packages since that is provided by the extension and the versions might conflict.
This error makes me think that there is a mismatch between the version of GTK 3 your application was built for and the version of GTK 3 that is used in the snap. Could you maybe try the gnome-3-34 extension instead? That extension does a bit more setup of the build environment to make sure the correct version of GTK 3 is used.
Hmmm, I use gnome-3-34 extension…
Maybe I should manually add glib/gtk/pango and other libs to stage/build packages instead of use gnome-3-34 extension?
That will probably give you a lot more issues than it will fix. The extension does a lot for you.
As a sanity check, have you tried a clean build and a clean install? It might be that the build environment is tainted if you experimented a lot while building your snap. Have you tried running snapcraft clean and re-run snapcraft? And run snap remove mysnap --purge before installing the resulting snap.
Maybe @hellsworth has any idea what might be going on here?
Yes, of course I tried this.
BTW I tried to search symbol pango_font_description_set_variations inside all built snap files, but it could not be found.
Yes, it seems to be gtk-query-immodules-3.0 of the gnome-3-34-1804 platform snap which tries to lookup the symbol.
One thing you could try is use the cleanup part to make all duplicated (and thus possibly incompatible) libraries are removed from your snap.
Another thing you could try is using the gnome-3-28 extension instead. The GTK version in that extension is much closer to the one of Ubuntu 18.04, so you have less chance of getting incompatibilities.
Lastly, it might help us if you could provide us with the snap. I see the application itself is proprietary; is the snap publicly available?
If you want a more clear picture of what is going wrong, it might be interesting to open a shell in the environment of the snap snap run --shell mysnap and look at what libraries /snap/mysnap/x1/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0 and /snap/mysnap/x1/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3.so.0 are linking to using ldd: ldd /snap/mysnap/x1/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3.so.0.
All the libraries it links to should come from /snap/mysnap/x1/gnome-platform (this is where gnome-3-34-1804 is mounted in your snap). If that’s not the case, that might be the issue.
Thank you very much for your time and help. gnome-3-28 extension with gtkmm libs helped me. Now the snap with app works. I really appreciate your help to me
Hmm I’m glad that using the gnome-3-28 extension solved the issue for you, but it would be good to know what’s going on here with the gnome-3-34 extension though. @RomanS would it be possible to share the snap with me so I could debug it?