<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>195800</bug_id>
          
          <creation_ts>2019-03-15 05:49:39 -0700</creation_ts>
          <short_desc>[GTK] [2.24.0] Build failure in Debian 9 (stretch)</short_desc>
          <delta_ts>2019-03-26 06:18:22 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>196178</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alberto Garcia">berto</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>pnormand</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1516957</commentid>
    <comment_count>0</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2019-03-15 05:49:39 -0700</bug_when>
    <thetext>Here&apos;s the error message:

   In file included from Source/WebCore/platform/graphics/ANGLEWebKitBridge.h:56:0,
                    from Source/WebCore/platform/graphics/GraphicsContext3D.h:28,
                    from Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:32:
   Source/WebCore/platform/graphics/OpenGLShims.h:259:67: error: expected type-specifier before &apos;glActiveTexture&apos;
    #define glActiveTexture                        LOOKUP_GL_FUNCTION(glActiveTexture)
                                                                      ^
   Source/WebCore/platform/graphics/OpenGLShims.h:259:67: error: expected initializer before &apos;glActiveTexture&apos;
   Source/WebCore/platform/graphics/OpenGLShims.h:260:67: error: expected type-specifier before &apos;glAttachShader&apos;
    #define glAttachShader                         LOOKUP_GL_FUNCTION(glAttachShader)
                                                                   ^

The problem seems to be that this bit from OpenGLShims.h:

   // We disable the shims for OpenGLShims.cpp, so that we can set them.
   #ifndef DISABLE_SHIMS
   #define LOOKUP_GL_FUNCTION(Function) WebCore::openGLFunctionTable()-&gt;Function
   #define glActiveTexture                        LOOKUP_GL_FUNCTION(glActiveTexture)
   #define glAttachShader                         LOOKUP_GL_FUNCTION(glAttachShader)
   #define glBindAttribLocation                   LOOKUP_GL_FUNCTION(glBindAttribLocation)
   #define glBindBuffer                           LOOKUP_GL_FUNCTION(glBindBuffer)
   /* ... */
   #endif

conflicts with declarations like this one from /usr/include/GLES3/gl3.h:

   GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture);

and generates this incorrect declaration:

   void WebCore::openGLFunctionTable()-&gt;glActiveTexture(GLenum texture);

I haven&apos;t debugged this further and builds in Debian experimental work
fine, so perhaps this is just a bug in the Mesa headers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1517270</commentid>
    <comment_count>1</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2019-03-15 16:43:20 -0700</bug_when>
    <thetext>Changing the order of the includes is enough to fix the build, but I
still haven&apos;t checked why this is not necessary on more recent
versions:

--- webkit2gtk-2.24.0.orig/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp       2019-03-13 09:21:39.000000000 +0000
+++ webkit2gtk-2.24.0/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp    2019-03-15 22:46:23.508214804 +0000
@@ -27,6 +27,10 @@

 #if ENABLE(VIDEO) &amp;&amp; USE(GSTREAMER)

+#define GST_USE_UNSTABLE_API
+#include &lt;gst/gl/gl.h&gt;
+#undef GST_USE_UNSTABLE_API
+
 #include &quot;GStreamerCommon.h&quot;
 #include &quot;GraphicsContext.h&quot;
 #include &quot;GraphicsContext3D.h&quot;
@@ -81,10 +85,6 @@
 #endif // !GST_CHECK_VERSION(1, 14, 0)
 #endif // USE(LIBEPOXY)

-#define GST_USE_UNSTABLE_API
-#include &lt;gst/gl/gl.h&gt;
-#undef GST_USE_UNSTABLE_API
-
 #include &quot;GLContext.h&quot;
 #if USE(GLX)
 #include &quot;GLContextGLX.h&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1521262</commentid>
    <comment_count>2</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2019-03-26 04:44:53 -0700</bug_when>
    <thetext>Looks like a duplicate of bug #196178 ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1521273</commentid>
    <comment_count>3</comment_count>
    <who name="Alberto Garcia">berto</who>
    <bug_when>2019-03-26 05:34:54 -0700</bug_when>
    <thetext>(In reply to Philippe Normand from comment #2)
&gt; Looks like a duplicate of bug #196178 ?

Indeed.

And the patch proposed there should work. I was doing a similar
workaround in my tests, but including &lt;gst/gl/gl.h&gt; earlier instead of
&quot;GraphicsContext3D.h&quot; later.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1521280</commentid>
    <comment_count>4</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2019-03-26 06:18:22 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 196178 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>