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 796821 - qmlgl: build error: conflicting declaration of GLsync
qmlgl: build error: conflicting declaration of GLsync
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.14.1
Other Linux
: Normal normal
: 1.14.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-07-17 07:18 UTC by Iñigo Huguet
Modified: 2018-07-27 06:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (690 bytes, patch)
2018-07-17 07:18 UTC, Iñigo Huguet
committed Details | Review

Description Iñigo Huguet 2018-07-17 07:18:51 UTC
Created attachment 373073 [details] [review]
Proposed patch

Gstreamer version: 1.14.1
OS: Linux on embedded system, built with Buildroot (Kernel 3.4)
Hardware: processor Allwinner A20 (ARM), GPU Mali400MP2
Other relevant info: installed sunxi-mali driver, with OpenGLES - EGL+X11. Installed QT 5.9.2 with support for OpenGLES, XCB, QT Quick, QT multimedia and QT X11 extras.

Building gst1-plugins-good I get this error log:

In file included from /home/inigo/Workspaces/linux-a20/repo/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/gstreamer-1.0/gst/gl/gstglfuncs.h:84:0,
                 from gstqtsink.cc:33:
/home/inigo/Workspaces/linux-a20/repo/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/gstreamer-1.0/gst/gl/glprototypes/gstgl_compat.h:40:18: error: conflicting declaration ‘typedef void* GLsync’
 typedef gpointer GLsync;
                  ^~~~~~
In file included from /home/inigo/Workspaces/linux-a20/repo/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtGui/qopengl.h:125:0,
                 from /home/inigo/Workspaces/linux-a20/repo/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtGui/qopenglcontext.h:60,
                 from /home/inigo/Workspaces/linux-a20/repo/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtGui/QOpenGLContext:1,
                 from qtitem.h:30,
                 from gstqtsink.h:28,
                 from gstqtsink.cc:30:
/home/inigo/Workspaces/linux-a20/repo/output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtGui/qopengles2ext.h:24:26: nota: previous declaration as ‘typedef struct __GLsync* GLsync’
 typedef struct __GLsync *GLsync;
                          ^~~~~~

I attach a patch that fix the problem for me, with the solution suggested by user ystreet00 in the IRC channel. It builds and I have Gstreamer working fine.
Comment 1 Iñigo Huguet 2018-07-17 07:20:29 UTC
Forgot to say that Buildroot builds Gstreamer using autotools, in the case this is relevant.
Comment 2 Matthew Waters (ystreet00) 2018-07-18 03:58:04 UTC
commit b03df1abf828514b0966db058388bf974ed0cf4f
Author: Iñigo Huguet <inigohuguet@fanamoel.com>
Date:   Tue Jul 17 08:23:54 2018 +0200

    qmlgl: Fix conflicting declaration of type GLsync for non-android
    
    https://bugzilla.gnome.org/show_bug.cgi?id=796821
Comment 3 Gianfranco Costamagna 2018-07-27 06:16:59 UTC
This change broke Ubuntu arm* builds, where GLES is enabled.
https://launchpad.net/ubuntu/+source/gst-plugins-good1.0/1.14.2-1ubuntu1/+build/15163587
I'opening a new issue to track the failure.

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../.. -Wdate-time -D_FORTIFY_SOURCE=2 -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/include -I/usr/include/libdrm -I/usr/include/gstreamer-1.0 -I/usr/include/orc-0.4 -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -I../../gst-libs -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -DGST_USE_UNSTABLE_API -fno-strict-aliasing -DG_THREADS_MANDATORY -DG_DISABLE_CAST_CHECKS -Wall -Wmissing-declarations -Wredundant-decls -Wwrite-strings -Winit-self -Wmissing-include-dirs -Waddress -Wno-multichar -g -fvisibility=hidden -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I/usr/include/arm-linux-gnueabihf/qt5/QtQuick -I/usr/include/arm-linux-gnueabihf/qt5 -I/usr/include/arm-linux-gnueabihf/qt5/QtGui -I/usr/include/arm-linux-gnueabihf/qt5 -I/usr/include/arm-linux-gnueabihf/qt5/QtQml -I/usr/include/arm-linux-gnueabihf/qt5 -I/usr/include/arm-linux-gnueabihf/qt5/QtNetwork -I/usr/include/arm-linux-gnueabihf/qt5 -I/usr/include/arm-linux-gnueabihf/qt5/QtCore -I/usr/include/arm-linux-gnueabihf/qt5 -DQT_X11EXTRAS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/include/arm-linux-gnueabihf/qt5/QtX11Extras -I/usr/include/arm-linux-gnueabihf/qt5 -I/usr/include/arm-linux-gnueabihf/qt5/QtGui -I/usr/include/arm-linux-gnueabihf/qt5 -I/usr/include/arm-linux-gnueabihf/qt5/QtCore -I/usr/include/arm-linux-gnueabihf/qt5 -std=c++11 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wno-error -c gstplugin.cc  -fPIC -DPIC -o .libs/libgstqmlgl_la-gstplugin.o
In file included from gstqtsink.cc:33:
/usr/include/gstreamer-1.0/gst/gl/gstglfuncs.h:93:17: error: expected identifier before ‘*’ token
   ret (GSTGLAPI *name) args;
                 ^
/usr/include/gstreamer-1.0/gst/gl/glprototypes/sync.h:27:1: note: in expansion of macro ‘GST_GL_EXT_FUNCTION’
 GST_GL_EXT_FUNCTION (GLsync, FenceSync,
 ^~~~~~~~~~~~~~~~~~~
/usr/include/gstreamer-1.0/gst/gl/glprototypes/sync.h:29:39: error: ISO C++ forbids declaration of ‘GLsync’ with no type [-fpermissive]
                       GLbitfield flags))
                                       ^
/usr/include/gstreamer-1.0/gst/gl/gstglfuncs.h:93:24: note: in definition of macro ‘GST_GL_EXT_FUNCTION’
   ret (GSTGLAPI *name) args;
                        ^~~~
/usr/include/gstreamer-1.0/gst/gl/glprototypes/sync.h:29:39: error: ‘GLsync’ declared as function returning a function
                       GLbitfield flags))
                                       ^
/usr/include/gstreamer-1.0/gst/gl/gstglfuncs.h:93:24: note: in definition of macro ‘GST_GL_EXT_FUNCTION’
   ret (GSTGLAPI *name) args;
                        ^~~~
/usr/include/gstreamer-1.0/gst/gl/glprototypes/sync.h:31:23: error: ‘GLsync’ has not been declared
                      (GLsync sync))
                       ^~~~~~
/usr/include/gstreamer-1.0/gst/gl/gstglfuncs.h:93:24: note: in definition of macro ‘GST_GL_EXT_FUNCTION’
   ret (GSTGLAPI *name) args;
                        ^~~~
/usr/include/gstreamer-1.0/gst/gl/glprototypes/sync.h:33:23: error: ‘GLsync’ has not been declared
                      (GLsync sync))
                       ^~~~~~
/usr/include/gstreamer-1.0/gst/gl/gstglfuncs.h:93:24: note: in definition of macro ‘GST_GL_EXT_FUNCTION’
   ret (GSTGLAPI *name) args;
                        ^~~~
/usr/include/gstreamer-1.0/gst/gl/glprototypes/sync.h:35:23: error: ‘GLsync’ has not been declared
                      (GLsync sync,
                       ^~~~~~
/usr/include/gstreamer-1.0/gst/gl/gstglfuncs.h:93:24: note: in definition of macro ‘GST_GL_EXT_FUNCTION’
   ret (GSTGLAPI *name) args;
                        ^~~~
/usr/include/gstreamer-1.0/gst/gl/glprototypes/sync.h:39:23: error: ‘GLsync’ has not been declared
                      (GLsync sync,
                       ^~~~~~
/usr/include/gstreamer-1.0/gst/gl/gstglfuncs.h:93:24: note: in definition of macro ‘GST_GL_EXT_FUNCTION’
   ret (GSTGLAPI *name) args;
                        ^~~~
/usr/include/gstreamer-1.0/gst/gl/glprototypes/sync.h:43:23: error: ‘GLsync’ has not been declared
                      (GLsync sync,
                       ^~~~~~
/usr/include/gstreamer-1.0/gst/gl/gstglfuncs.h:93:24: note: in definition of macro ‘GST_GL_EXT_FUNCTION’
   ret (GSTGLAPI *name) args;
                        ^~~~
gstqtsink.cc: In function ‘gboolean gst_qt_sink_propose_allocation(GstBaseSink*, GstQuery*)’:
gstqtsink.cc:472:36: error: ‘GstGLFuncs’ {aka ‘struct _GstGLFuncs’} has no member named ‘FenceSync’; did you mean ‘DeleteSync’?
   if (qt_sink->context->gl_vtable->FenceSync)
                                    ^~~~~~~~~
                                    DeleteSync
Comment 4 Gianfranco Costamagna 2018-07-27 06:21:43 UTC
I opened bug 796879 to track the new issue