bitbake meta-toolchain-qt5然後...
ERROR: meta-toolchain-qt5-1.0-r0 do_populate_sdk: Function failed: do_populate_sdk ERROR: Logfile of failure stored in: /home/charles-chang/ann3/buildqtwayland/tmp/work/cortexa7hf-neon-poky-linux-gnueabi/meta-toolchain-qt5/1.0-r0/temp/log.do_populate_sdk.27843 ERROR: Task (/home/charles-chang/ann3/meta-qt5/recipes-qt/meta/meta-toolchain-qt5.bb:do_populate_sdk) failed with exit code '1'
去看一下 log ..有..
ERROR: Unable to install packages. Command '/home/charles-chang/ann3/buildqtwayland/tmp/sysroots/x86_64-linux/usr/bin/opkg --volatile-cache -f /home/charles-chang/ann3/buildqtwayland/tmp/work/cortexa7hf-neon-poky-linux-gnueabi/meta-toolchain-qt5/1.0-r0/opkg.conf -t /home/charles-chang/ann3/buildqtwayland/tmp/work/cortexa7hf-neon-poky-linux-gnueabi/meta-toolchain-qt5/1.0-r0/temp/ipktemp/ -o /home/charles-chang/ann3/buildqtwayland/tmp/work/cortexa7hf-neon-poky-linux-gnueabi/meta-toolchain-qt5/1.0-r0/sdk/image/opt/poky-st/2.2.1/sysroots/cortexa7hf-neon-poky-linux-gnueabi --force_postinstall --prefer-arch-to-version install packagegroup-qt5-toolchain-target packagegroup-core-standalone-sdk-target packagegroup-core-standalone-sdk-target-dbg ' returned 255: ... Installing libsegfault (2.24) on root.Collected errors: * calculate_dependencies_for: Cannot satisfy the following dependencies for packagegroup-qt5-toolchain-target: * qtenginio-mkspecs * qtenginio-qmlplugins * * opkg_solver_install: Cannot install package packagegroup-qt5-toolchain-target.去devshell 單獨 run 這個 command 試試看...
$ bitbake meta-toolchain-qt5 -c devshell # /home/charles-chang/ann3/buildqtwayland/tmp/sysroots/x86_64-linux/usr/bin/opkg --volatile-cache -f /home/charles-chang/ann3/buildqtwayland/tmp/work/cortexa7hf-neon-poky-linux-gnueabi/meta-toolchain-qt5/1.0-r0/opkg.conf -t /home/charles-chang/ann3/buildqtwayland/tmp/work/cortexa7hf-neon-poky-linux-gnueabi/meta-toolchain-qt5/1.0-r0/temp/ipktemp/ -o /home/charles-chang/ann3/buildqtwayland/tmp/work/cortexa7hf-neon-poky-linux-gnueabi/meta-toolchain-qt5/1.0-r0/sdk/image/opt/poky-st/2.2.1/sysroots/cortexa7hf-neon-poky-linux-gnueabi --force_postinstall --prefer-arch-to-version install packagegroup-qt5-toolchain-target packagegroup-core-standalone-sdk-target packagegroup-core-standalone-sdk-target-dbg ... ... ... Collected errors: * calculate_dependencies_for: Cannot satisfy the following dependencies for packagegroup-qt5-toolchain-target: * qtenginio-mkspecs * qtenginio-qmlplugins * * opkg_solver_install: Cannot install package packagegroup-qt5-toolchain-target.
然後,就去 b/recipes-qt/packagegroups/packagegroup-qt5-toolchain-target.bb 把 qtenginio-mkspec 和 qtenginio-qmlplugins 移除,再 build 一次,就沒有問題。
diff --git a/recipes-qt/packagegroups/packagegroup-qt5-toolchain-target.bb b/recipes-qt/packagegroups/packagegroup-qt5-toolchain-target.bb index 25bc530..aa9631d 100755 --- a/recipes-qt/packagegroups/packagegroup-qt5-toolchain-target.bb +++ b/recipes-qt/packagegroups/packagegroup-qt5-toolchain-target.bb @@ -60,8 +60,6 @@ RDEPENDS_${PN} += " \ qttranslations-qmlviewer \ qttranslations-qtdeclarative \ qtenginio-dev \ - qtenginio-mkspecs \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'qtenginio-qmlplugins', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'qtgraphicaleffects-qmlplugins', '', d)} \ qtimageformats-dev \ qtimageformats-plugins \
另一個,在 bitbake release image target 的 bb file 中,把 qtenginio-mkspecs , qtenginio-qmlplugins 加到 IMAGE_QT_OPTIONAL_PART 中 看看...
結果 build fail..
所以.. 大概真的 build 不出來...
到 這裡 下載 Qt Creator installer
sdk 和 qt creator 安裝參考:
- https://www.ics.com/blog/configuring-qt-creator-yocto-development
- http://wiki.wandboard.org/index.php/Building_Qt5_using_yocto_on_Wandboard
- http://variwiki.com/images/archive/8/8d/20161228090959%21YoctoQtCreator.pdf
- http://ftp1.digi.com/support/documentation/APN%20-%20Yocto%20QT%20Application%20Development_20140925.pdf
直接 run, 不用 root,sudo .. 安裝在自己的 home 下 (~/pokyqtsdk/2.2.1)
Poky (Yocto Project Reference Distro) SDK installer version 2.2.1 ================================================================= Enter target directory for SDK (default: /opt/poky-st/2.2.1): /home/charles-chang/pokyqtsdk/2.2.1 You are about to install the SDK to "/home/charles-chang/pokyqtsdk/2.2.1". Proceed[Y/n]? Extracting SDK.................................................................................................................................................................................done Setting it up...done SDK has been successfully set up and is ready to be used. Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g. $ . /home/charles-chang/pokyqtsdk/2.2.1/environment-setup-cortexa7hf-neon-poky-linux-gnueabi
然後裝 qtcreator..
用 debian 付的,所以會莊一堆 for x86 的 tool..
然後就是最麻煩的設定 Qtcreator...
要設定的東西大概是...
- 先新增加一個 target device -- 例如 imx, st, rpi..-- 其實這個就是你的 toolchain-sdk 板子
- 再增加 tool,給他一個名子(通常就是 target device 的名子) -- g++, gcc -- 指定到sdk 安裝目錄中的 ooxx-g_++, ooxx-gcc
- 設定 sdk 的 sysroot 的位置,qt creator 會自己找出Qt 版本和 qmake 位置
- 把上面的 整合在 Kits -- 指定 Device, tool, sysroot 位置..
以後 New Project 就可以指定是用那一個 Kits
然後 new project 來測試,一直 fail, 說 sdk 裡的 lib (Gui, Core... etc) 都不合。
看一下 Makefile (qmake 產生的)。
CC = g++
沒有用 sdk 的環境變數 (OE_QMAKE_CC)
Makefile 一開始會有...
# Command: /home/charles-chang/pokyqtsdk/2.2.1/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug -o Makefile ../ooow/ooow.pro這格好像是錯的, -spec 應該要是 linux-oe-g++
所以去 Qt creator 的 OPtion , Kits 設定,有一項:Qt mkspec 是空的,填上 linux-oe-g++ 之後,clean 再 build,就 OK 了。
另外,要 run qtcreator 之前,要先 run sdk 的環境變術設定。
沒有留言:
張貼留言