-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build failure with glib 2.68 #1057
Comments
This is an issue with WebKit, not QtWebKit specifically. |
It looks like upstream WebKit is very lucky and inches around the problem by a different order of includes. In current qtwebkit, |
@mnutt This issue is still relevant in master:
|
I don't currently have easy access to a dev machine that runs linux with glib 2.68+, but am going to enable GitHub Actions to run there and try to reproduce the issue. |
Fixed in my fork via movableink#9 |
Note also #1058 |
On AUR qt5-webkit pkgbuild https://aur.archlinux.org/packages/qt5-webkit is fixed by https://aur.archlinux.org/cgit/aur.git/tree/glib-2.68.patch?h=qt5-webkit |
But I guess we all can agree that this is not a real fix of an issue with forward declarations, just a workaround. It seems to me that the real bug is include order in diff --git a/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h b/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h
index 1588a813b5d3..3f06a4571e58 100644
--- a/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h
+++ b/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h
@@ -21,9 +21,9 @@
#if USE(GSTREAMER)
+#include <wtf/glib/GRefPtr.h>
#include <gst/gst.h>
#include <gst/pbutils/encoding-profile.h>
-#include <wtf/glib/GRefPtr.h>
typedef struct _WebKitVideoSink WebKitVideoSink;
struct WebKitWebSrc; I guess GTK and WPE are building fine only because they use GRefPtr more extensively and it gets included earlier. |
@philn: How do you think, would it be OK to change include order in |
Yes, and an exception for build/include_order should be added for this file in the style checker... |
Build with glib 2.68 fails:
In file included from /usr/lib/glib-2.0/include/glibconfig.h:9, from /usr/include/glib-2.0/glib/gtypes.h:32, from /usr/include/glib-2.0/glib/galloca.h:32, from /usr/include/glib-2.0/glib.h:30, from /usr/include/gstreamer-1.0/gst/gst.h:27, from ../Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.h:21, from ../Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.cpp:23: ../Source/WTF/wtf/glib/GRefPtr.h:33:21: error: expected unqualified-id before ‘typename’ 33 | extern "C" gpointer g_object_ref_sink(gpointer); | ^~~~~~~~~~~~~~~~~ ../Source/WTF/wtf/glib/GRefPtr.h:33:21: error: expected ‘)’ before ‘typename’ In file included from /usr/include/glib-2.0/gobject/gbinding.h:29, from /usr/include/glib-2.0/glib-object.h:22, from /usr/include/gstreamer-1.0/gst/gstenumtypes.h:6, from /usr/include/gstreamer-1.0/gst/gst.h:31, from ../Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.h:21, from ../Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.cpp:23: ../Source/WTF/wtf/glib/GRefPtr.h:33:21: note: to match this ‘(’ 33 | extern "C" gpointer g_object_ref_sink(gpointer); | ^~~~~~~~~~~~~~~~~ In file included from /usr/lib/glib-2.0/include/glibconfig.h:9, from /usr/include/glib-2.0/glib/gtypes.h:32, from /usr/include/glib-2.0/glib/galloca.h:32, from /usr/include/glib-2.0/glib.h:30, from /usr/include/gstreamer-1.0/gst/gst.h:27, from ../Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.h:21, from ../Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.cpp:23: ../Source/WTF/wtf/glib/GRefPtr.h:33:21: error: expected ‘)’ before ‘typename’ 33 | extern "C" gpointer g_object_ref_sink(gpointer); | ^~~~~~~~~~~~~~~~~ In file included from /usr/include/glib-2.0/gobject/gbinding.h:29, from /usr/include/glib-2.0/glib-object.h:22, from /usr/include/gstreamer-1.0/gst/gstenumtypes.h:6, from /usr/include/gstreamer-1.0/gst/gst.h:31, from ../Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.h:21, from ../Source/WebCore/platform/graphics/gstreamer/GStreamerUtilities.cpp:23: ../Source/WTF/wtf/glib/GRefPtr.h:33:21: note: to match this ‘(’ 33 | extern "C" gpointer g_object_ref_sink(gpointer); | ^~~~~~~~~~~~~~~~~
Removing
extern "C" void g_object_unref(gpointer);
andextern "C" gpointer g_object_ref_sink(gpointer);
from Source/WTF/wtf/glib/GRefPtr.h solves this error.The text was updated successfully, but these errors were encountered: