Ubuntu 17.10. I’m trying to build a Zotero snap from the official tarball. When I run the snap, I get the following error:
$ zotero-standalone.zotero
/snap/zotero-standalone/x1/zotero-bin: relocation error: /snap/zotero-standalone/x1/lib/x86_64-linux-gnu/libdl.so.2: symbol _dl_catch_error, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference
I have no idea what’s going on here. Any pointers?
Thanks @orga, this got me a bit further. Now I get the following error:
$ zotero-standalone.zotero
XPCOMGlueLoad error for file /snap/zotero-standalone/x1/libmozgtk.so:
libgtk-3.so.0: cannot open shared object file: No such file or directory
Couldn't load XPCOM.
You’ll need to add build dependencies as build-packages (these aren’t included in the final snap) and dependencies as stage-packages. See here for more info.
build.snapcraft.io (and I think cleanbuild, though I’m not sure?!) use Ubuntu 16.04 to get their packages. So searching for libgtk in Ubuntu Xenial (16.04), we get this. This indicates that you need to add libgtk-3-0 to your snapcraft.yaml as a stage-package.
It would help you if you could find something in Zotero’s documentation that says what its dependencies for Linux distros are
This is on Ubuntu 17.10 with Wayland. If I logout and log back into the X session, the snap works correctly. Running an unsnapped Zotero works without issue on wayland.
When I launch it without desktop-launch then it launches but I get a bunch of errors and the characters aren’t loaded correctly.
(zotero:6634): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
(zotero:6634): GdkPixbuf-WARNING **: Cannot open pixbuf loader module file '/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory
This likely means that your installation is broken.
Try running the command
gdk-pixbuf-query-loaders > /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders.cache
to make things work again for the time being.
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
(zotero:6634): Gtk-WARNING **: Could not find the icon 'edit-find'. The 'hicolor' theme
was not found either, perhaps you need to install it.
You can get a copy from:
http://icon-theme.freedesktop.org/releases
(zotero:6634): Gtk-WARNING **: Error loading theme icon 'edit-find' for stock: Icon 'edit-find' not present in theme ubuntu-mono-dark
(zotero:6634): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark
(zotero:6634): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
(zotero:6634): Gtk-WARNING **: Error loading theme icon 'edit-find' for stock: Icon 'edit-find' not present in theme ubuntu-mono-dark
(zotero:6634): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark
(zotero:6634): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
(zotero:6634): Gtk-WARNING **: Error loading theme icon 'edit-clear' for stock:
(zotero:6634): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark
(zotero:6634): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
(zotero:6634): Gtk-WARNING **: Error loading theme icon 'edit-clear' for stock:
(zotero:6634): Gtk-WARNING **: Error loading theme icon 'image-missing' for stock: Icon 'image-missing' not present in theme ubuntu-mono-dark
(zotero:6634): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
method return time=1508079094.586127 sender=:1.97 -> destination=:1.132 serial=6 reply_serial=2
The chances are that seccomp is killing your application causing the segfault message when you start with desktop-launch. To diagnose, try installing snappy-debug and running the scanlog which will advise any missing plugs that it knows about:
To be clear: I’m installing the snap in devmode, so everything should still work, even if I didn’t add the correct plugs.
I went all-out, and added all the plugs I could think of, but I still get the exact same behavior: a segfault on Ubuntu 17.10 default (wayland) session, a working app on Ubuntu 17.10 xorg session.
OK, so I was wrong about seccomp. That’s progress at least
You might be able to get some hints by running the app through strace, but that is in-depth and difficult to read the output, and may not be helpful anyway. It still a good thing to try, though. Using strace might, for example, allow you to correlate that a particular syscall returned a result the app didn’t expect, such as being unable to find a particular library.
Running strace on wayland just hangs. Running strace on xorg gives the following error message:
$ sudo strace -u merlijn -e '!select,_newselect,clock_gettime' -f -D -vv -o ./hello-world.trace /snap/bin/zotero-standalone.zotero
Error: GDK_BACKEND does not match available displays