GNOME Bugzilla – Bug 667864
Explicitly link against libGL
Last modified: 2012-01-17 13:49:24 UTC
Cogl stopped directly linking against libGL or libGLES*. Clutter still shipped a "gl" required package in its pkg-config, but it has been dropped in master because it was introducing unneeded and conflicting dependencies when building the EGL-on-X11 backend code. GNOME Shell still needs to link against libGL, though, because it's using glXQuery* functions inside the gnome-shell-plugin.c code. The easiest patch possible is to just add "gl" to the PKG_CHECK_MODULES() macro in configure.ac, but I guess that not everyone ships with that pkg-config file, so the most conservative approach is to check first, and eventually fall back to libGL later.
Created attachment 205182 [details] [review] build: Explicitly link against libGL Cogl does not explicitly link against libGL, and Clutter has dropped the needless "gl" dependency from its pkg-config file. GNOME Shell still uses glXQuery* API, though, so it needs to explicitly link against libGL.
Let's just try assuming that gl.pc exists - it was added to Mesa in 2007, and it's hard to imagine getting current GNOME working on a system that isn't much newer than that. If people have data for why it doesn't work, we can add fallbacks.
absolutely fine by me. I was just wondering if it's going to be a problem for systems with nvidia and fglrx, but if you still need the mesa-devel package for those, then it's perfectly pointless to do a conditional check.
Created attachment 205282 [details] [review] build: Add the 'gl' pkg-config Cogl does not explicitly link against GL or GLES any more, and Clutter master dropped the 'gl' pkg-config requirement because it introduced unneeded and conflicting dependencies. GNOME Shell still uses glXQuery* API, so it needs to explicitly link against libGL.
(In reply to comment #3) > absolutely fine by me. I was just wondering if it's going to be a problem for > systems with nvidia and fglrx, but if you still need the mesa-devel package for > those, then it's perfectly pointless to do a conditional check. I don't really know for fglrx and nvidia - for Fedora it looks like the -devel package for nvidia rpmfusion has only some .so's in /usr/lib/nvidia and no header files and no .pc files. If you are cobbling together your own development platform with that and header files from opengl.org you probably shouldn't expect to be able to build core system components. Let's just see who yells.
Attachment 205282 [details] pushed as 235cb9c - build: Add the 'gl' pkg-config