Bug#847366: gtk apps die with 'Couldn't open libGL.so.1'
Dariusz Gadomski
dariusz.gadomski at canonical.com
Wed Dec 7 15:11:47 UTC 2016
Package: libgtk-3-0
Version: 3.22.4-1
Severity: normal
Trying to run a gtk-based application that does not depend directly or
indirectly on libgl1-mesa-glx leads to a process termination with
message:
Couldn't open libGL.so.1: libGL.so.1: cannot open shared object file: No
such file or directory
I was able to reproduce it with the following apps: gtk3-demo, firefox,
mousetweaks.
Steps to reproduce:
1. Use a headless Debian installation (it is important libgl1-mesa-glx
is not pulled in by the desktop environment etc.). I used a cloud image
from [1].
2. Install the gtk app you want to try:
apt install gtk-3-examples
(notice that libgl1-mesa-glx is not pulled in as a dependency).
3. Login with ssh -X to this Debian machine from a Windows with X server
(e.g. with cywgin with X) or Mac OS X.
4. Run the app:
gtk3-demo
Expected result:
App starts.
Actual result:
Process terminates, message "Couldn't open libGL.so.1: libGL.so.1: cannot open
shared object file: No such file or directory".
I noticed that this is caused by the fact that glXQueryExtension
function gets called without any linking to a GL library.
Looks like gtk should either:
1) Depend on a GL implementation, so apt pulls in the dependency on install.
2) Use a runtime check before calling this function to see if GL is available.
Note: for some reason it is NOT REPRODUCIBLE using a Linux desktop as a remote
client. In such configuration the control skips the problematic piece of code
as get_cached_gl_visuals (gdk/x11/gdkglcontext-x11.c:1194) returns non-zero
value, so gdk_x11_screen_init_gl call never happens. I suspect this is somehow
related to the fact that I had GL already initialized on my remote desktop.
[1] http://cdimage.debian.org/cdimage/openstack/testing/
Full backtrace below:
#0 gdk_x11_screen_init_gl (screen=screen at entry=0x55555594c0d0) at ././gdk/x11/gdkglcontext-x11.c:859
#1 0x00007ffff7240c1a in _gdk_x11_screen_update_visuals_for_gl (screen=screen at entry=0x55555594c0d0)
at ././gdk/x11/gdkglcontext-x11.c:1210
#2 0x00007ffff72497e6 in _gdk_x11_screen_init_visuals (screen=screen at entry=0x55555594c0d0)
at ././gdk/x11/gdkvisual-x11.c:309
#3 0x00007ffff7246856 in _gdk_x11_screen_new (display=display at entry=0x555555946050, screen_number=0)
at ././gdk/x11/gdkscreen-x11.c:908
#4 0x00007ffff7236768 in _gdk_x11_display_open (display_name=<optimized out>) at ././gdk/x11/gdkdisplay-x11.c:1416
#5 0x00007ffff720b1b5 in gdk_display_manager_open_display (manager=<optimized out>, name=0x0)
at ././gdk/gdkdisplaymanager.c:472
#6 0x00007ffff76fa78a in gtk_init_check (argc=<optimized out>, argv=<optimized out>) at ././gtk/gtkmain.c:1082
#7 0x00007ffff76fa7b9 in gtk_init (argc=argc at entry=0x0, argv=argv at entry=0x0) at ././gtk/gtkmain.c:1139
#8 0x00007ffff75dc68a in gtk_application_startup (g_application=0x5555559251a0) at ././gtk/gtkapplication.c:293
#9 0x00007ffff359ef75 in g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007ffff35b095c in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00007ffff35b9bcc in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#12 0x00007ffff35b9faf in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#13 0x00007ffff6451ae2 in g_application_register () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#14 0x00007ffff645230f in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#15 0x00007ffff6452672 in g_application_run () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#16 0x000055555557285e in main ()
-- System Information:
Debian Release: stretch/sid
APT prefers testing-debug
APT policy: (500, 'testing-debug'), (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 4.8.0-1-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages libgtk-3-0 depends on:
ii adwaita-icon-theme 3.22.0-1
ii hicolor-icon-theme 0.15-1
ii libatk-bridge2.0-0 2.22.0-1
ii libatk1.0-0 2.22.0-1
ii libc6 2.24-7
ii libcairo-gobject2 1.14.6-1.1
ii libcairo2 1.14.6-1.1
ii libcolord2 1.3.3-2
ii libcups2 2.2.1-2
ii libepoxy0 1.3.1-1
ii libfontconfig1 2.11.0-6.7
ii libfreetype6 2.6.3-3+b1
ii libgdk-pixbuf2.0-0 2.36.0-1
ii libglib2.0-0 2.50.2-2
ii libgtk-3-common 3.22.4-1
ii libjson-glib-1.0-0 1.2.2-1
ii libpango-1.0-0 1.40.3-3
ii libpangocairo-1.0-0 1.40.3-3
ii libpangoft2-1.0-0 1.40.3-3
ii librest-0.7-0 0.8.0-2
ii libsoup2.4-1 2.56.0-1
ii libwayland-client0 1.11.0-2
ii libwayland-cursor0 1.11.0-2
ii libwayland-egl1-mesa [libwayland-egl1] 13.0.2-1
ii libx11-6 2:1.6.3-1
ii libxcomposite1 1:0.4.4-1
ii libxcursor1 1:1.1.14-1+b1
ii libxdamage1 1:1.1.4-2+b1
ii libxext6 2:1.3.3-1
ii libxfixes3 1:5.0.2-1
ii libxi6 2:1.7.6-1.1
ii libxinerama1 2:1.1.3-1+b1
ii libxkbcommon0 0.6.1-1
ii libxml2 2.9.4+dfsg1-2.1
ii libxrandr2 2:1.5.0-1
ii shared-mime-info 1.7-1
Versions of packages libgtk-3-0 recommends:
ii libgtk-3-bin 3.22.4-1
Versions of packages libgtk-3-0 suggests:
pn gvfs <none>
ii librsvg2-common 2.40.16-1
-- no debconf information
More information about the pkg-gnome-maintainers
mailing list