[QBS] qmake, yocto and qt embedded
Raphael Cotty
R.Cotty at cascade-technologies.com
Wed Nov 20 13:00:01 CET 2013
Hi,
I've converted our project from cmake to qbs.
It works in native environment.
I am now trying to cross compile using a sdk generated by yocto for arm.
The yocto sdk installs the Qt embedded include in:
/opt/poky/1.5+snapshot/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/include/qtopia
The libs in:
/opt/poky/1.5+snapshot/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/lib
The mkspecs in:
/opt/poky/1.5+snapshot/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/share/qtopia/mkspecs
The sdk installs qmake in:
/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/qmake
and the cross compiler in:
/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi
The sdk also provide a environment-setup-armv7a-vfp-neon-poky-linux-gnueabi script that sets up path and exports things like:
export OE_QMAKE_INCDIR_QT=/opt/poky/1.5+snapshot/sysroots/armv7a-vfp-neon-poky-linux-gnueabi//usr/include/qtopia
But I don't think it's any use for qbs.
I am now trying to configure my environment to work in a console with qbs to compile in native and for arm.
In a terminal in native:
I run qbs-detect-toolchains and then qbs setup-qt /usr/bin/qmake myqt
It works fine. I can compile my project
In a terminal for arm:
I first source environment-setup-armv7a-vfp-neon-poky-linux-gnueabi then run qbs-detect-toolchains:
Trying to detect gcc...
Toolchain detected:
binary: /opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc
triplet: arm-poky-linux-gnueabi
arch: arm
cc: arm-poky-linux-gnueabi-gcc
cxx: arm-poky-linux-gnueabi-g++ -march=armv7-a -mthumb-interwork -mfloat-abi=softfp -mfpu=neon --sysroot=/opt/poky/1.5+snapshot/sysroots/armv7a-vfp-neon-poky-linux-gnueabi
ld: arm-poky-linux-gnueabi-ld --sysroot=/opt/poky/1.5+snapshot/sysroots/armv7a-vfp-neon-poky-linux-gnueabi
Only the arm cross compiler is detected.
Then qbs setup-qt /opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/qmake:
ERROR: qbs-setup-qt: Could not determine whether Qt is a static build.
Beside running /opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin/qmake -query gives:
QT_INSTALL_PREFIX:/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr
QT_INSTALL_DATA:/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr
QT_INSTALL_DOCS:/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/doc
QT_INSTALL_HEADERS:/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/include
QT_INSTALL_LIBS:/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib
QT_INSTALL_BINS:/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/bin
QT_INSTALL_PLUGINS:/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/plugins
QT_INSTALL_IMPORTS:/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/imports
QT_INSTALL_TRANSLATIONS:/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/translations
QT_INSTALL_CONFIGURATION:/etc/xdg
QT_INSTALL_EXAMPLES:/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/examples
QT_INSTALL_DEMOS:/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/demos
QMAKE_MKSPECS:/opt/poky/1.5+snapshot/sysroots/x86_64-pokysdk-linux/usr/mkspecs
QMAKE_VERSION:2.01a
QT_VERSION:4.8.5
QT_INSTALL_LIBS points to x86_64-pokysdk-linux and not armv7a-vfp-neon-poky-linux-gnueabi where the libs are.
I assume it's the reason qbs-setup-qt fails.
So does it mean I have to configure qbs manually for my environment?
Thanks
Raphael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qbs/attachments/20131120/0c3a843c/attachment.html>
More information about the Qbs
mailing list