Gdk initialization calls epoxy GLX api, which promptly exit()s if libGL.so.1 is not present. This is a serious problem since it affects all GTK+3 applications, even if they do not use OpenGL. Workaround is to set "GDK_GL=disabled" environment variable. Proper fix would include either A) epoxy failing gracefully B) epoxy or GTK having an additional function that checks for existence of specific GL (in this case GLX, libGL.so.1). Looks like the fix for 2.0 timeframe will include at least a #ifdef in the Gdk init code (so a dependency on opengl distro feature).
commit 48443ccd93d0406ebfe627b98ac9283f6767c1dd Author: Jussi Kukkonen <jussi.kukkonen@intel.com> Date: Wed Oct 21 16:25:31 2015 +0300 gtk+3: Do not try to initialize GL without libgl Gdk initialization ends up calling epoxy GLX api, which calls exit() if libGL.so.1 is not present. In practice this prevents all GTK+ applications from starting if GLX is not present. If opengl and x11 distro features are set, make gtk+3 RDEPEND on libgl. If opengl and x11 distro features are not set, use #ifdef to prevent the GL initialization. Remove libgl dependency from gtk3-demo: it can now run without libgl (although trying to run the glarea demo will exit in that case). [YOCTO #8529] (From OE-Core rev: f9540f50ea661e260ec2b82436238cfb989e23c5) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Verified on master: fc45deac89ef63ca1c44e763c38ced7dfd72cbe1 Using DISTRO_FEATURES_append = " wayland" DISTRO_FEATURES_remove = "x11" IMAGE_INSTALL_append = " gtk+3-demo mesa-megadriver" a QEMUx86 image and this patch for passing over bug https://bugzilla.yoctoproject.org/show_bug.cgi?id=8551 http://git.openembedded.org/openembedded-core-contrib/commit/?h=kraj/master&id=24cd75fac25b96208b22babe19a0e27314ccbe15
(In reply to comment #2) > Verified on master: fc45deac89ef63ca1c44e763c38ced7dfd72cbe1 Thanks a bunch: that was a bit tricky to verify, I'll try to provide better instructions in future.