Bug 175127

Summary: [GTK] conflicting declaration 'typedef khronos_ssize_t GLsizeiptr'
Product: WebKit Reporter: Alberto Garcia <berto>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: bugs-noreply, magomez, mcatanzaro, pnormand
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Alberto Garcia 2017-08-03 04:41:47 PDT
I'm having problems building WebKitGTK+ 2.17.5 for armel:

   In file included from Source/WebCore/platform/graphics/ANGLEWebKitBridge.h:48:0,
                    from Source/WebCore/platform/graphics/GraphicsContext3D.h:28,
                    from Source/WebCore/platform/graphics/GLContext.h:23,
                    from Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:72:
   /usr/include/GLES2/gl2.h: At global scope:
   /usr/include/GLES2/gl2.h:73:25: error: conflicting declaration 'typedef khronos_ssize_t GLsizeiptr'
    typedef khronos_ssize_t GLsizeiptr;
                            ^~~~~~~~~~
   In file included from /usr/include/GL/gl.h:2055:0,
                    from /usr/include/gstreamer-1.0/gst/gl/gstglapi.h:65,
                    from /usr/include/gstreamer-1.0/gst/gl/gstgl_fwd.h:26,
                    from /usr/include/gstreamer-1.0/gst/gl/gl.h:29,
                    from Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:69:
   /usr/include/GL/glext.h:468:19: note: previous declaration as 'typedef ptrdiff_t GLsizeiptr'
    typedef ptrdiff_t GLsizeiptr;
                      ^~~~~~~~~~
   In file included from Source/WebCore/platform/graphics/ANGLEWebKitBridge.h:48:0,
                    from Source/WebCore/platform/graphics/GraphicsContext3D.h:28,
                    from Source/WebCore/platform/graphics/GLContext.h:23,
                    from Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:72:
   /usr/include/GLES2/gl2.h:74:26: error: conflicting declaration 'typedef khronos_intptr_t GLintptr'
    typedef khronos_intptr_t GLintptr;
                             ^~~~~~~~
   In file included from /usr/include/GL/gl.h:2055:0,
                    from /usr/include/gstreamer-1.0/gst/gl/gstglapi.h:65,
                    from /usr/include/gstreamer-1.0/gst/gl/gstgl_fwd.h:26,
                    from /usr/include/gstreamer-1.0/gst/gl/gl.h:29,
                    from Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:69:
   /usr/include/GL/glext.h:469:19: note: previous declaration as 'typedef ptrdiff_t GLintptr'
    typedef ptrdiff_t GLintptr;
                   ^~~~~~~~

It looks like this is because of the new USE_GSTREAMER_GL that is now
on by default (GStreamerGL includes gl.h, WebKit is using GLES2).
Comment 1 Michael Catanzaro 2017-10-31 16:26:14 PDT
(In reply to Alberto Garcia from comment #0) 
> It looks like this is because of the new USE_GSTREAMER_GL that is now
> on by default (GStreamerGL includes gl.h, WebKit is using GLES2).

So how is this supposed to work... is GStreamerGL supposed to be disabled when building for GLES2, or is it just broken?
Comment 2 Alberto Garcia 2017-11-01 01:40:09 PDT
(In reply to Michael Catanzaro from comment #1)
> (In reply to Alberto Garcia from comment #0) 
> > It looks like this is because of the new USE_GSTREAMER_GL that is now
> > on by default (GStreamerGL includes gl.h, WebKit is using GLES2).
> 
> So how is this supposed to work... is GStreamerGL supposed to be disabled
> when building for GLES2, or is it just broken?

I'm actually not sure, but I'm disabling GStreamerGL at the moment when
it conflicts with GLES2.
Comment 3 Philippe Normand 2017-11-01 03:38:53 PDT
I suspect that was fixed upstream already: https://bugzilla.gnome.org/show_bug.cgi?id=784779
Comment 4 Alberto Garcia 2017-11-01 09:12:10 PDT
(In reply to Philippe Normand from comment #3)
> I suspect that was fixed upstream already:
> https://bugzilla.gnome.org/show_bug.cgi?id=784779

Ah, it seems to be the case, thanks!

Does it mean that we would be linking against both at the same time?
Is that possible? I'll anyway give it a try soon and tell you if it
works.
Comment 5 Philippe Normand 2017-11-01 09:30:33 PDT
The GL in GStreamerGL can be a bit misleading. The libgstgl library supports most platforms and GL versions (even Vulkan). The issue is only related with includes.

It won't be easy to try this because IIRC there were multiple follow-up build fixes landed after the main patch landed.
Comment 6 Alberto Garcia 2017-11-01 12:11:18 PDT
(In reply to Philippe Normand from comment #5)
> The GL in GStreamerGL can be a bit misleading. The libgstgl library
> supports most platforms and GL versions (even Vulkan). The issue is
> only related with includes.

I see, thanks.

> It won't be easy to try this because IIRC there were multiple
> follow-up build fixes landed after the main patch landed.

I was meaning to try it when the fixed upstream release comes.