GNOME Bugzilla – Bug 733248
gl: GLintptr/GLsizeiptr/etc typechecks ignore GL_CFLAGS, potentially causing typedef redefinition errors from gst-libs/gst/gl/glprototypes/gstgl_compat.h at buildtime
Last modified: 2014-07-16 14:38:39 UTC
configure.ac is checking for GLintptr, GLsizeiptr and others with AC_CHECK_TYPES without GL_CFLAGS, so if opengl headers are not in /usr/include then they are not found and gstreamer compat typedefs are used for those. However at buildtime of gst-libs/gl GL_CFLAGS IS used, so both headers are included, and on some platforms those definitions aren't compatible, and it will error out. This happens to me on RPi with raspberrypi-userland patched to provide pkg-config files, while shipping into a /opt/vc prefix still, with the pkg-config files pointing there. That also relies on including EGL_CFLAGS in GL_CFLAGS, which doesn't seem to be the case right now, as they are always or almost always empty in the hardcoded checks and while EGL_LIBS is added to GL_LIBS, EGL_CFLAGS is not added to GL_CFLAGS; so I have an additional patch for that. All this is needed so I can cleanly package it up for Gentoo Linux.
Created attachment 280830 [details] [review] Patch I use for using raspberrypi-userland pkg-config files For reference. Not proposed for inclusion, as a similar patch against older state was refused already. Once I actually bring those pkg-config files to main Gentoo package tree, I'll perhaps advocate for something like this stronger.
Created attachment 280831 [details] [review] gl: Always include EGL_CFLAGS in GL_CFLAGS when EGL_LIBS is added to GL_LIBS They should be handled in tandem, in case any EGL provider could require some CFLAGS and set them (possibly once moved to prefer pkg-config files), such as for a custom header location.
Created attachment 280832 [details] [review] gl: Include GL_CFLAGS while checking for GL typedefs Otherwise those checks may fail at configure time if they contain extra include paths, while at build time they are included, potentially causing incompatible typedefs between system GL headers and gstreamer compatibility prototypes.
Comment on attachment 280830 [details] [review] Patch I use for using raspberrypi-userland pkg-config files We're not going to include that until the pkg-config files are accepted by RPi upstream. There's no point in supporting random, distribution specific pkg-config files.
(In reply to comment #4) > (From update of attachment 280830 [details] [review]) > We're not going to include that until the pkg-config files are accepted by RPi > upstream. There's no point in supporting random, distribution specific > pkg-config files. Also there should be another bug about that already elsewhere.
commit 96aa9316357e26f69790e296d3627718b6ca709e Author: Mart Raudsepp <leio@gentoo.org> Date: Wed Jul 16 16:31:27 2014 +0300 gl: Include GL_CFLAGS while checking for GL typedefs Otherwise those checks may fail at configure time if they contain extra include paths, while at build time they are included, potentially causing incompatible typedefs between system GL headers and gstreamer compatibility prototypes. https://bugzilla.gnome.org/show_bug.cgi?id=733248 commit 0bb6d22ffc094dcbe2f41d2b037b4f038d158636 Author: Mart Raudsepp <leio@gentoo.org> Date: Wed Jul 16 16:29:10 2014 +0300 gl: Always include EGL_CFLAGS in GL_CFLAGS when EGL_LIBS is added to GL_LIBS They should be handled in tandem, in case any EGL provider could require some CFLAGS and set them (possibly once moved to prefer pkg-config files), such as for a custom header location.