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 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
gl: GLintptr/GLsizeiptr/etc typechecks ignore GL_CFLAGS, potentially causing ...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.3.91
Other Linux
: Normal normal
: 1.4.0
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-07-16 13:18 UTC by Mart Raudsepp
Modified: 2014-07-16 14:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch I use for using raspberrypi-userland pkg-config files (1.79 KB, patch)
2014-07-16 13:35 UTC, Mart Raudsepp
reviewed Details | Review
gl: Always include EGL_CFLAGS in GL_CFLAGS when EGL_LIBS is added to GL_LIBS (951 bytes, patch)
2014-07-16 13:36 UTC, Mart Raudsepp
committed Details | Review
gl: Include GL_CFLAGS while checking for GL typedefs (1.17 KB, patch)
2014-07-16 13:36 UTC, Mart Raudsepp
committed Details | Review

Description Mart Raudsepp 2014-07-16 13:18:01 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.
Comment 1 Mart Raudsepp 2014-07-16 13:35:28 UTC
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.
Comment 2 Mart Raudsepp 2014-07-16 13:36:25 UTC
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.
Comment 3 Mart Raudsepp 2014-07-16 13:36:58 UTC
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 4 Sebastian Dröge (slomo) 2014-07-16 14:33:44 UTC
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.
Comment 5 Sebastian Dröge (slomo) 2014-07-16 14:34:02 UTC
(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.
Comment 6 Sebastian Dröge (slomo) 2014-07-16 14:38:30 UTC
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.