Firefly开源社区

打印 上一主题 下一主题

[Linux] buildroot QT5.12.2编译时qwayland报错

16

积分

0

威望

0

贡献

技术小白

积分
16

buildroot QT5.12.2编译时qwayland报错

发表于 2022-1-15 11:13:50      浏览:2663 | 回复:3        打印      只看该作者   [复制链接] 楼主
本帖最后由 gaoshanyun 于 2022-1-15 14:01 编辑

项目需要QT 5.12.2,编译时qwayland报错,从错误上看是由于补丁0024-qwaylandwindow-Support-setting-window-blocked-state.patch和版本不符合。重复定义这个可以改下,但是下面还有wlSurface的报错
这些补丁不合行不行?或者有其他的解决方法
另:QT 5.14.2编译时没有报这个错误

  1. <blockquote>2022-01-14T03:35:41 In file included from qwaylandshmbackingstore.cpp:40:
  2. 2022-01-14T03:35:41 qwaylandwindow_p.h:263:21: error: redeclaration of 'bool QtWaylandClient::QWaylandWindow::mBlocked'
  3. 2022-01-14T03:35:41 263 |     bool mBlocked = false;
  4. 2022-01-14T03:35:41 |                     ^~~~~
  5. 2022-01-14T03:35:41 qwaylandwindow_p.h:260:10: note: previous declaration 'bool QtWaylandClient::QWaylandWindow::mBlocked'
  6. 2022-01-14T03:35:41 260 |     bool mBlocked;
  7. 2022-01-14T03:35:41 |          ^~~~~~~~
  8. 2022-01-14T03:35:42 Makefile:1230: recipe for target '.obj/qwaylandshmbackingstore.o' failed
  9. 2022-01-14T03:35:42 make[4]: *** [.obj/qwaylandshmbackingstore.o] Error 1
  10. 2022-01-14T03:35:42 make[4]: *** Waiting for unfinished jobs....
  11. 2022-01-14T03:35:42 In file included from qwaylandwindow.cpp:40:
  12. 2022-01-14T03:35:42 qwaylandwindow_p.h:263:21: error: redeclaration of 'bool QtWaylandClient::QWaylandWindow::mBlocked'
  13. 2022-01-14T03:35:42 263 |     bool mBlocked = false;
  14. 2022-01-14T03:35:42 |                     ^~~~~
  15. 2022-01-14T03:35:42 qwaylandwindow_p.h:260:10: note: previous declaration 'bool QtWaylandClient::QWaylandWindow::mBlocked'
  16. 2022-01-14T03:35:42 260 |     bool mBlocked;
  17. 2022-01-14T03:35:42 |          ^~~~~~~~
  18. 2022-01-14T03:35:42 qwaylandwindow.cpp: In member function 'virtual void QtWaylandClient::QWaylandWindow::raise()':
  19. 2022-01-14T03:35:42 qwaylandwindow.cpp:446:30: error: 'wlSurface' was not declared in this scope; did you mean 'wl_surface'?
  20. 2022-01-14T03:35:42 446 |     if (mSubSurfaceWindow && wlSurface()) {
  21. 2022-01-14T03:35:42 |                              ^~~~~~~~~
  22. 2022-01-14T03:35:42 |                              wl_surface
  23. 2022-01-14T03:35:42 qwaylandwindow.cpp:448:45: error: no matching function for call to 'QtWaylandClient::QWaylandWindow::commit()'
  24. 2022-01-14T03:35:42 448 |         mSubSurfaceWindow->parent()->commit();
  25. 2022-01-14T03:35:42 |                                             ^
  26. 2022-01-14T03:35:42 In file included from qwaylandwindow.cpp:40:
  27. 2022-01-14T03:35:42 qwaylandwindow_p.h:123:10: note: candidate: 'void QtWaylandClient::QWaylandWindow::commit(QtWaylandClient::QWaylandBuffer*, const QRegion&)'
  28. 2022-01-14T03:35:42 123 |     void commit(QWaylandBuffer *buffer, const QRegion &damage);
  29. 2022-01-14T03:35:42 |          ^~~~~~
  30. 2022-01-14T03:35:42 qwaylandwindow_p.h:123:10: note:   candidate expects 2 arguments, 0 provided
  31. 2022-01-14T03:35:42 qwaylandwindow.cpp: In member function 'virtual void QtWaylandClient::QWaylandWindow::lower()':
  32. 2022-01-14T03:35:42 qwaylandwindow.cpp:458:30: error: 'wlSurface' was not declared in this scope; did you mean 'wl_surface'?
  33. 2022-01-14T03:35:42 458 |     if (mSubSurfaceWindow && wlSurface())
  34. 2022-01-14T03:35:42 |                              ^~~~~~~~~
  35. 2022-01-14T03:35:42 |                              wl_surface
  36. 2022-01-14T03:35:42 qwaylandwindow.cpp:459:57: error: return-statement with a value, in function returning 'void' [-fpermissive]
  37. 2022-01-14T03:35:42 459 |         return mSubSurfaceWindow->placeBelow(wlSurface());
  38. 2022-01-14T03:35:42 |                                                         ^
  39. 2022-01-14T03:35:42 qwaylandwindow.cpp: At global scope:
  40. 2022-01-14T03:35:42 qwaylandwindow.cpp:509:6: error: redefinition of 'bool QtWaylandClient::QWaylandWindow::windowEvent(QEvent*)'
  41. 2022-01-14T03:35:42 509 | bool QWaylandWindow::windowEvent(QEvent *event)
  42. 2022-01-14T03:35:42 |      ^~~~~~~~~~~~~~
  43. 2022-01-14T03:35:42 qwaylandwindow.cpp:491:6: note: 'virtual bool QtWaylandClient::QWaylandWindow::windowEvent(QEvent*)' previously defined here
  44. 2022-01-14T03:35:42 491 | bool QWaylandWindow::windowEvent(QEvent *event)

复制代码
patch中差异点:
  1. --- a/src/client/qwaylandwindow_p.h
  2. +++ b/src/client/qwaylandwindow_p.h
  3. @@ -260,6 +260,7 @@ private:
  4.      bool mBlocked;
  5.      void updateInputRegion();

  6. +    bool mBlocked = false;
  7.      bool mUpdateRequested = false;
  8.      bool lastVisible = false;
  9.      QRect mLastExposeGeometry;
  10. --
  11. 2.20.1
复制代码



回复

使用道具 举报

1306

积分

0

威望

0

贡献

中级创客

Rank: 4

积分
1306
发表于 2022-1-17 11:37:01        只看该作者  沙发
同步代码到最新,repo sync -c
删除编译目录后重新编译,rm -rf buildroot/output
回复

使用道具 举报

16

积分

0

威望

0

贡献

技术小白

积分
16
发表于 2022-1-17 13:18:25        只看该作者  板凳
时间的蝴蝶 发表于 2022-1-17 11:37
同步代码到最新,repo sync -c
删除编译目录后重新编译,rm -rf buildroot/output

好的,我试试。谢谢
回复

使用道具 举报

16

积分

0

威望

0

贡献

技术小白

积分
16
发表于 2022-1-17 17:37:56        只看该作者  地板
采用了遇到错误解决错误的方式解决了这个问题。
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


以上笨方法,解决燃眉之急



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表