Firefly开源社区
标题:
buildroot QT5.12.2编译时qwayland报错
[打印本页]
作者:
gaoshanyun
时间:
2022-1-15 11:13
标题:
buildroot QT5.12.2编译时qwayland报错
本帖最后由 gaoshanyun 于 2022-1-15 14:01 编辑
项目需要QT 5.12.2,编译时qwayland报错,从错误上看是由于补丁0024-qwaylandwindow-Support-setting-window-blocked-state.patch和版本不符合。重复定义这个可以改下,但是下面还有wlSurface的报错
这些补丁不合行不行?或者有其他的解决方法
。
另:QT 5.14.2编译时没有报这个错误
<blockquote>2022-01-14T03:35:41 In file included from qwaylandshmbackingstore.cpp:40:
2022-01-14T03:35:41 qwaylandwindow_p.h:263:21: error: redeclaration of 'bool QtWaylandClient::QWaylandWindow::mBlocked'
2022-01-14T03:35:41 263 | bool mBlocked = false;
2022-01-14T03:35:41 | ^~~~~
2022-01-14T03:35:41 qwaylandwindow_p.h:260:10: note: previous declaration 'bool QtWaylandClient::QWaylandWindow::mBlocked'
2022-01-14T03:35:41 260 | bool mBlocked;
2022-01-14T03:35:41 | ^~~~~~~~
2022-01-14T03:35:42 Makefile:1230: recipe for target '.obj/qwaylandshmbackingstore.o' failed
2022-01-14T03:35:42 make[4]: *** [.obj/qwaylandshmbackingstore.o] Error 1
2022-01-14T03:35:42 make[4]: *** Waiting for unfinished jobs....
2022-01-14T03:35:42 In file included from qwaylandwindow.cpp:40:
2022-01-14T03:35:42 qwaylandwindow_p.h:263:21: error: redeclaration of 'bool QtWaylandClient::QWaylandWindow::mBlocked'
2022-01-14T03:35:42 263 | bool mBlocked = false;
2022-01-14T03:35:42 | ^~~~~
2022-01-14T03:35:42 qwaylandwindow_p.h:260:10: note: previous declaration 'bool QtWaylandClient::QWaylandWindow::mBlocked'
2022-01-14T03:35:42 260 | bool mBlocked;
2022-01-14T03:35:42 | ^~~~~~~~
2022-01-14T03:35:42 qwaylandwindow.cpp: In member function 'virtual void QtWaylandClient::QWaylandWindow::raise()':
2022-01-14T03:35:42 qwaylandwindow.cpp:446:30: error: 'wlSurface' was not declared in this scope; did you mean 'wl_surface'?
2022-01-14T03:35:42 446 | if (mSubSurfaceWindow && wlSurface()) {
2022-01-14T03:35:42 | ^~~~~~~~~
2022-01-14T03:35:42 | wl_surface
2022-01-14T03:35:42 qwaylandwindow.cpp:448:45: error: no matching function for call to 'QtWaylandClient::QWaylandWindow::commit()'
2022-01-14T03:35:42 448 | mSubSurfaceWindow->parent()->commit();
2022-01-14T03:35:42 | ^
2022-01-14T03:35:42 In file included from qwaylandwindow.cpp:40:
2022-01-14T03:35:42 qwaylandwindow_p.h:123:10: note: candidate: 'void QtWaylandClient::QWaylandWindow::commit(QtWaylandClient::QWaylandBuffer*, const QRegion&)'
2022-01-14T03:35:42 123 | void commit(QWaylandBuffer *buffer, const QRegion &damage);
2022-01-14T03:35:42 | ^~~~~~
2022-01-14T03:35:42 qwaylandwindow_p.h:123:10: note: candidate expects 2 arguments, 0 provided
2022-01-14T03:35:42 qwaylandwindow.cpp: In member function 'virtual void QtWaylandClient::QWaylandWindow::lower()':
2022-01-14T03:35:42 qwaylandwindow.cpp:458:30: error: 'wlSurface' was not declared in this scope; did you mean 'wl_surface'?
2022-01-14T03:35:42 458 | if (mSubSurfaceWindow && wlSurface())
2022-01-14T03:35:42 | ^~~~~~~~~
2022-01-14T03:35:42 | wl_surface
2022-01-14T03:35:42 qwaylandwindow.cpp:459:57: error: return-statement with a value, in function returning 'void' [-fpermissive]
2022-01-14T03:35:42 459 | return mSubSurfaceWindow->placeBelow(wlSurface());
2022-01-14T03:35:42 | ^
2022-01-14T03:35:42 qwaylandwindow.cpp: At global scope:
2022-01-14T03:35:42 qwaylandwindow.cpp:509:6: error: redefinition of 'bool QtWaylandClient::QWaylandWindow::windowEvent(QEvent*)'
2022-01-14T03:35:42 509 | bool QWaylandWindow::windowEvent(QEvent *event)
2022-01-14T03:35:42 | ^~~~~~~~~~~~~~
2022-01-14T03:35:42 qwaylandwindow.cpp:491:6: note: 'virtual bool QtWaylandClient::QWaylandWindow::windowEvent(QEvent*)' previously defined here
2022-01-14T03:35:42 491 | bool QWaylandWindow::windowEvent(QEvent *event)
复制代码
patch中差异点:
--- a/src/client/qwaylandwindow_p.h
+++ b/src/client/qwaylandwindow_p.h
@@ -260,6 +260,7 @@ private:
bool mBlocked;
void updateInputRegion();
+ bool mBlocked = false;
bool mUpdateRequested = false;
bool lastVisible = false;
QRect mLastExposeGeometry;
--
2.20.1
复制代码
作者:
时间的蝴蝶
时间:
2022-1-17 11:37
同步代码到最新,repo sync -c
删除编译目录后重新编译,rm -rf buildroot/output
作者:
gaoshanyun
时间:
2022-1-17 13:18
时间的蝴蝶 发表于 2022-1-17 11:37
同步代码到最新,repo sync -c
删除编译目录后重新编译,rm -rf buildroot/output
好的,我试试。谢谢
作者:
gaoshanyun
时间:
2022-1-17 17:37
采用了遇到错误解决错误的方式解决了这个问题。
1.将QT版本修改为5.12.2, rk356x_linux_release_20211019\buildroot\configs\rockchip\qt.config
BR2_PACKAGE_QT5_VERSION_5_
12
=y
2.修改qwayland的pro文件,否则不编译插件库。buildroot\output\rockchip_rk3566\build\qt5wayland-5.12.2\src\src.pro
qtConfig(wayland-client) {
sub_qtwaylandscanner.subdir = qtwaylandscanner
sub_qtwaylandscanner.target = sub-qtwaylandscanner
SUBDIRS += sub_qtwaylandscanner
sub_client.subdir = client
sub_client.depends = sub-qtwaylandscanner
sub_client.target = sub-client
SUBDIRS += sub_client
/*添加部分*/
sub_plugins.subdir = plugins
sub_plugins.depends += sub-qtwaylandscanner
sub_plugins.depends += sub-client
sub_plugins.target = sub-plugins
SUBDIRS += sub_plugins
3.此时编译会报错,将插件中buildroot\output\rockchip_rk3566\build\qt5wayland-5.12.2\src\plugins\hardwareintegration\
hardwareintegration.pro
SUBDIRS += client
SUBDIRS += compositor /*该行删除*/
注:项目中没有用compositor
以上笨方法,解决燃眉之急
欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/)
Powered by Discuz! X3.1