当我在另一台ARM机器上为Raspberry Pi构建gst-plugins-good==1.16.2时,Qt插件构建失败。
我成功地构建了gstreamer==1.16.2、gst-plugins-base==1.16.2和qtbase==5.13.2,但它们似乎与gst-plugins-good==1.16.2不兼容
In file included from gstqtgl.h:32:0,
from qtwindow.h:27,
from moc_qtwindow.cc:10:
/build/snaps/full/stage/include/gstreamer-1.0/gst/gl/gstglfuncs.h:93:17: error: expected identifier before ‘*’ token
ret (GSTGLAPI *name) args;
^
/build/snaps/full/stage/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,
^
/build/snaps/full/stage/include/gstreamer-1.0/gst/gl/glprototypes/sync.h:29:39: error: ISO C++ forbids declaration of ‘GLsync’ with no type [-fpermissive]
GLbitfield flags))
^
/build/snaps/full/stage/include/gstreamer-1.0/gst/gl/gstglfuncs.h:93:24: note: in definition of macro ‘GST_GL_EXT_FUNCTION’
ret (GSTGLAPI *name) args;
^
/build/snaps/full/stage/include/gstreamer-1.0/gst/gl/glprototypes/sync.h:29:39: error: ‘GLsync’ declared as function returning a function
GLbitfield flags))
^
/build/snaps/full/stage/include/gstreamer-1.0/gst/gl/gstglfuncs.h:93:24: note: in definition of macro ‘GST_GL_EXT_FUNCTION’
ret (GSTGLAPI *name) args;
^
/build/snaps/full/stage/include/gstreamer-1.0/gst/gl/glprototypes/sync.h:31:23: error: ‘GLsync’ has not been declared
(GLsync sync))
^
/build/snaps/full/stage/include/gstreamer-1.0/gst/gl/gstglfuncs.h:93:24: note: in definition of macro ‘GST_GL_EXT_FUNCTION’
ret (GSTGLAPI *name) args;
^
/build/snaps/full/stage/include/gstreamer-1.0/gst/gl/glprototypes/sync.h:33:23: error: ‘GLsync’ has not been declared
(GLsync sync))
^
/build/snaps/full/stage/include/gstreamer-1.0/gst/gl/gstglfuncs.h:93:24: note: in definition of macro ‘GST_GL_EXT_FUNCTION’
ret (GSTGLAPI *name) args;
^
/build/snaps/full/stage/include/gstreamer-1.0/gst/gl/glprototypes/sync.h:35:23: error: ‘GLsync’ has not been declared
(GLsync sync,
^
/build/snaps/full/stage/include/gstreamer-1.0/gst/gl/gstglfuncs.h:93:24: note: in definition of macro ‘GST_GL_EXT_FUNCTION’
ret (GSTGLAPI *name) args;
^
/build/snaps/full/stage/include/gstreamer-1.0/gst/gl/glprototypes/sync.h:39:23: error: ‘GLsync’ has not been declared
(GLsync sync,
^
/build/snaps/full/stage/include/gstreamer-1.0/gst/gl/gstglfuncs.h:93:24: note: in definition of macro ‘GST_GL_EXT_FUNCTION’
ret (GSTGLAPI *name) args;
^
/build/snaps/full/stage/include/gstreamer-1.0/gst/gl/glprototypes/sync.h:43:23: error: ‘GLsync’ has not been declared
(GLsync sync,
^
/build/snaps/full/stage/include/gstreamer-1.0/gst/gl/gstglfuncs.h:93:24: note: in definition of macro ‘GST_GL_EXT_FUNCTION’
ret (GSTGLAPI *name) args;
^
Makefile:881: recipe for target 'libgstqmlgl_la-moc_gstqsgtexture.lo' failed我在https://bugzilla.gnome.org/show_bug.cgi?id=796879中看到了一个非常类似的问题,但在我的代码中,他们想要删除的行已经丢失了。
相反,我从ext/qt/gstqtgl.h中删除了#define GST_GL_HAVE_GLSYNC 1,编译成功。
但是该行上面的注释说它应该使用Qt的GLsync定义,这样我的“修复”看起来就不正确了。
我仍然在努力为这个问题找到一个合适的解决方案。
发布于 2019-12-16 18:56:41
我发现,当你在Raspberry Pi设备上使用补丁时,它不会破坏任何东西。
diff -Naur ./src/ext/qt/gstqtgl.h ./src2/ext/qt/gstqtgl.h
--- ./ext/qt/gstqtgl.h 2019-04-19 09:16:25.000000000 +0000
+++ ./ext/qt/gstqtgl.h 2019-12-15 09:22:22.503065057 +0000
@@ -28,7 +28,6 @@
* that we don't typedef GLsync in gstglfuncs.h */
#include <gst/gl/gstglconfig.h>
#undef GST_GL_HAVE_GLSYNC
-#define GST_GL_HAVE_GLSYNC 1
#include <gst/gl/gstglfuncs.h>
/* The glext.h guard was renamed in 2018, but some software which我希望这对有麻烦的人有帮助。
如果有什么问题,我会更新这篇文章。
https://stackoverflow.com/questions/59342567
复制相似问题