After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 667864 - Explicitly link against libGL
Explicitly link against libGL
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-01-13 12:05 UTC by Emmanuele Bassi (:ebassi)
Modified: 2012-01-17 13:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: Explicitly link against libGL (2.06 KB, patch)
2012-01-13 12:05 UTC, Emmanuele Bassi (:ebassi)
none Details | Review
build: Add the 'gl' pkg-config (1.17 KB, patch)
2012-01-15 00:02 UTC, Emmanuele Bassi (:ebassi)
committed Details | Review

Description Emmanuele Bassi (:ebassi) 2012-01-13 12:05:19 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.
Comment 1 Emmanuele Bassi (:ebassi) 2012-01-13 12:05:21 UTC
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.
Comment 2 Owen Taylor 2012-01-13 16:34:23 UTC
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.
Comment 3 Emmanuele Bassi (:ebassi) 2012-01-13 16:41:21 UTC
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.
Comment 4 Emmanuele Bassi (:ebassi) 2012-01-15 00:02:57 UTC
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.
Comment 5 Owen Taylor 2012-01-16 21:23:25 UTC
(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.
Comment 6 Emmanuele Bassi (:ebassi) 2012-01-17 13:49:20 UTC
Attachment 205282 [details] pushed as 235cb9c - build: Add the 'gl' pkg-config