美文网首页
rockchip(rk3288) yocto编译 qt5.15.

rockchip(rk3288) yocto编译 qt5.15.

作者: Wood木木 | 来源:发表于2023-04-10 16:53 被阅读0次

    由于qt官网删除掉了qtbase等的5.15.2分支,所以在拉取qtbase等项目时会报错。
    以下patch可以修复这个问题,并进行正常编译。

    方案1:修改为5.15分支检出,并修改相应的commit hash值SRCREV

    修改文件 linux/yocto/meta-qt5

    From 75c9133df7a5aad3639c474f6a4e35e770be3f2e Mon Sep 17 00:00:00 2001
    From: zhanaghb <286095742@qq.com>
    Date: Tue, 11 Apr 2023 16:50:15 +0800
    Subject: [PATCH] fix qt5.15.2 error
    
    ---
     recipes-qt/qt5/nativesdk-qtbase_git.bb                        | 2 +-
     recipes-qt/qt5/qt5-git.inc                                    | 4 ++--
     recipes-qt/qt5/qtbase-native_git.bb                           | 2 +-
     .../0020-Revert-Fix-workaround-in-pthread-destructor.patch    | 4 ++--
     recipes-qt/qt5/qtbase_git.bb                                  | 2 +-
     recipes-qt/qt5/qtdeclarative_git.bb                           | 2 +-
     recipes-qt/qt5/qtwayland_git.bb                               | 2 +-
     7 files changed, 9 insertions(+), 9 deletions(-)
    
    diff --git a/recipes-qt/qt5/nativesdk-qtbase_git.bb b/recipes-qt/qt5/nativesdk-qtbase_git.bb
    index 299efcb..440b883 100644
    --- a/recipes-qt/qt5/nativesdk-qtbase_git.bb
    +++ b/recipes-qt/qt5/nativesdk-qtbase_git.bb
    @@ -201,4 +201,4 @@ fakeroot do_generate_qt_environment_file() {
     do_generate_qt_environment_file[umask] = "022"
     addtask generate_qt_environment_file after do_install before do_package
     
    -SRCREV = "40143c189b7c1bf3c2058b77d00ea5c4e3be8b28"
    +SRCREV = "bf8908f5f9ba93da310c7a9ea2710abc392ed2bc"
    diff --git a/recipes-qt/qt5/qt5-git.inc b/recipes-qt/qt5/qt5-git.inc
    index f1d724d..509949e 100644
    --- a/recipes-qt/qt5/qt5-git.inc
    +++ b/recipes-qt/qt5/qt5-git.inc
    @@ -2,7 +2,7 @@
     # Copyright (C) 2013-2020 Martin Jansa <martin.jansa@gmail.com>
     
     QT_MODULE ?= "${BPN}"
    -QT_MODULE_BRANCH ?= "5.15.2"
    +QT_MODULE_BRANCH ?= "5.15"
     QT_MODULE_BRANCH_PARAM ?= "branch=${QT_MODULE_BRANCH}"
     
     # each module needs to define valid SRCREV
    @@ -14,4 +14,4 @@ CVE_PRODUCT = "qt"
     
     S = "${WORKDIR}/git"
     
    -PV = "5.15.2+git${SRCPV}"
    +PV = "5.15+git${SRCPV}"
    diff --git a/recipes-qt/qt5/qtbase-native_git.bb b/recipes-qt/qt5/qtbase-native_git.bb
    index 36c3c6f..3bbaf98 100644
    --- a/recipes-qt/qt5/qtbase-native_git.bb
    +++ b/recipes-qt/qt5/qtbase-native_git.bb
    @@ -145,4 +145,4 @@ do_install() {
         echo 'set(_qt5_corelib_extra_includes "${_qt5Core_install_prefix}/lib${QT_DIR_NAME}/mkspecs/linux-oe-g++")' > ${D}${libdir}/cmake/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake
     }
     
    -SRCREV = "40143c189b7c1bf3c2058b77d00ea5c4e3be8b28"
    +SRCREV = "bf8908f5f9ba93da310c7a9ea2710abc392ed2bc"
    diff --git a/recipes-qt/qt5/qtbase/0020-Revert-Fix-workaround-in-pthread-destructor.patch b/recipes-qt/qt5/qtbase/0020-Revert-Fix-workaround-in-pthread-destructor.patch
    index c397ddb..13c937f 100644
    --- a/recipes-qt/qt5/qtbase/0020-Revert-Fix-workaround-in-pthread-destructor.patch
    +++ b/recipes-qt/qt5/qtbase/0020-Revert-Fix-workaround-in-pthread-destructor.patch
    @@ -12,8 +12,8 @@ currentThreadData was reverted in 5.12 before this commit:
     78665d8a0c Remove pthread storage for thread local data
     
     causing build failures in configurations which use this
    -| /home/jenkins/workspace/luneos-unstable/webos-ports/tmp-glibc/work/cortexa8t2hf-neon-halium-webos-linux-gnueabi/qtbase/5.15.2+gitAUTOINC+40143c189b-r0/git/src/corelib/thread/qthread_unix.cpp: In function 'void destroy_current_thread_data(void*)':
    -| /home/jenkins/workspace/luneos-unstable/webos-ports/tmp-glibc/work/cortexa8t2hf-neon-halium-webos-linux-gnueabi/qtbase/5.15.2+gitAUTOINC+40143c189b-r0/git/src/corelib/thread/qthread_unix.cpp:121:5: error: 'currentThreadData' was not declared in this scope
    +| /home/jenkins/workspace/luneos-unstable/webos-ports/tmp-glibc/work/cortexa8t2hf-neon-halium-webos-linux-gnueabi/qtbase/5.15+gitAUTOINC+bf8908f5f9-r0/git/src/corelib/thread/qthread_unix.cpp: In function 'void destroy_current_thread_data(void*)':
    +| /home/jenkins/workspace/luneos-unstable/webos-ports/tmp-glibc/work/cortexa8t2hf-neon-halium-webos-linux-gnueabi/qtbase/5.15+gitAUTOINC+bf8908f5f9-r0/git/src/corelib/thread/qthread_unix.cpp:121:5: error: 'currentThreadData' was not declared in this scope
     |   121 |     currentThreadData = data;
     |       |     ^~~~~~~~~~~~~~~~~
     
    diff --git a/recipes-qt/qt5/qtbase_git.bb b/recipes-qt/qt5/qtbase_git.bb
    index 43bd981..28dcaf2 100644
    --- a/recipes-qt/qt5/qtbase_git.bb
    +++ b/recipes-qt/qt5/qtbase_git.bb
    @@ -308,4 +308,4 @@ sed -i \
         $D${OE_QMAKE_PATH_ARCHDATA}/mkspecs/qmodule.pri
     }
     
    -SRCREV = "40143c189b7c1bf3c2058b77d00ea5c4e3be8b28"
    +SRCREV = "bf8908f5f9ba93da310c7a9ea2710abc392ed2bc"
    diff --git a/recipes-qt/qt5/qtdeclarative_git.bb b/recipes-qt/qt5/qtdeclarative_git.bb
    index 6aabde2..2491952 100644
    --- a/recipes-qt/qt5/qtdeclarative_git.bb
    +++ b/recipes-qt/qt5/qtdeclarative_git.bb
    @@ -55,6 +55,6 @@ do_install:append:class-nativesdk() {
         rm -rf ${D}${OE_QMAKE_PATH_QML}
     }
     
    -SRCREV = "104eae5b17b0ec700391e9539ee3a4f638588194"
    +SRCREV = "d27e0cc2a41c229c5b4085b2d78c4328a82baecd"
     
     BBCLASSEXTEND =+ "native nativesdk"
    diff --git a/recipes-qt/qt5/qtwayland_git.bb b/recipes-qt/qt5/qtwayland_git.bb
    index 3a747dc..61b7ae6 100644
    --- a/recipes-qt/qt5/qtwayland_git.bb
    +++ b/recipes-qt/qt5/qtwayland_git.bb
    @@ -48,7 +48,7 @@ PACKAGECONFIG[wayland-vulkan-server-buffer] = "-feature-wayland-vulkan-server-bu
     
     EXTRA_QMAKEVARS_CONFIGURE += "${PACKAGECONFIG_CONFARGS}"
     
    -SRCREV = "3cc17177b1b03053276eb6236fda137c588261a7"
    +SRCREV = "88c8df4eab81316bc055c8be82b0febc70330dbe"
     
     BBCLASSEXTEND =+ "native nativesdk"
     
    -- 
    2.34.1
    
    

    方案2:手动配置本地git raw库,并将当前提交切换为5.15.2。然后创建5.15.2分支。

    ----------qtbase
    cd ~/code/linux/yocto/packages/git2/
    git clone --bare git://code.qt.io/qt/qtbase.git
    mv ~/code/linux/yocto/packages/git2/qtbase.git ~/code/linux/yocto/packages/git2/code.qt.io.qt.qtbase.git
    cd ~/code/linux/yocto/packages/git2/code.qt.io.qt.qtbase.git
    git checkout v5.15.2
    git branch 5.15.2
    ----------qtdeclarative
    cd ~/code/linux/yocto/packages/git2/
    git clone --bare git://code.qt.io/qt/qtdeclarative.git
    mv ~/code/linux/yocto/packages/git2/qtdeclarative.git ~/code/linux/yocto/packages/git2/code.qt.io.qt.qtdeclarative.git
    cd ~/code/linux/yocto/packages/git2/code.qt.io.qt.qtdeclarative.git
    git checkout v5.15.2
    git branch 5.15.2
    ----------qtwayland
    cd ~/code/linux/yocto/packages/git2/
    git clone --bare git://code.qt.io/qt/qtwayland.git
    mv ~/code/linux/yocto/packages/git2/qtwayland.git ~/code/linux/yocto/packages/git2/code.qt.io.qt.qtwayland.git
    cd ~/code/linux/yocto/packages/git2/code.qt.io.qt.qtwayland.git
    git checkout v5.15.2
    git branch 5.15.2
      
    

    相关文章

      网友评论

          本文标题:rockchip(rk3288) yocto编译 qt5.15.

          本文链接:https://www.haomeiwen.com/subject/kclwddtx.html