Bug 195800
| Summary: | [GTK] [2.24.0] Build failure in Debian 9 (stretch) | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Alberto Garcia <berto> |
| Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | bugs-noreply, pnormand |
| Priority: | P2 | ||
| Version: | Other | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Alberto Garcia
Here'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 'glActiveTexture'
#define glActiveTexture LOOKUP_GL_FUNCTION(glActiveTexture)
^
Source/WebCore/platform/graphics/OpenGLShims.h:259:67: error: expected initializer before 'glActiveTexture'
Source/WebCore/platform/graphics/OpenGLShims.h:260:67: error: expected type-specifier before 'glAttachShader'
#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()->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()->glActiveTexture(GLenum texture);
I haven't debugged this further and builds in Debian experimental work
fine, so perhaps this is just a bug in the Mesa headers.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Alberto Garcia
Changing the order of the includes is enough to fix the build, but I
still haven'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) && USE(GSTREAMER)
+#define GST_USE_UNSTABLE_API
+#include <gst/gl/gl.h>
+#undef GST_USE_UNSTABLE_API
+
#include "GStreamerCommon.h"
#include "GraphicsContext.h"
#include "GraphicsContext3D.h"
@@ -81,10 +85,6 @@
#endif // !GST_CHECK_VERSION(1, 14, 0)
#endif // USE(LIBEPOXY)
-#define GST_USE_UNSTABLE_API
-#include <gst/gl/gl.h>
-#undef GST_USE_UNSTABLE_API
-
#include "GLContext.h"
#if USE(GLX)
#include "GLContextGLX.h"
Philippe Normand
Looks like a duplicate of bug #196178 ?
Alberto Garcia
(In reply to Philippe Normand from comment #2)
> 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 <gst/gl/gl.h> earlier instead of
"GraphicsContext3D.h" later.
Philippe Normand
*** This bug has been marked as a duplicate of bug 196178 ***