Unsolved question about qmake variables
-
Hi guys,
I am a beginner to embedded Qt development. Currently I am trying to setup Qt-creator with toolchain made from 'meta-toolchain-qt5'. The installation script was ran and completed successfully. But when I tried to compile an example application (qmlvideo), I run into build error as following:
:-1: warning: libpng16.so.16, needed by /home/sharon/valleyisland/jethro/poky/build/tmp/work/corei7-64-poky-linux/qtbase/5.5.1+gitAUTOINC+5afc431323-r0/build/lib/libQt5Gui.so, not found (try using -rpath or -rpath-link)
I think the lib path is not set correctly in qtCreator.
So I checked "Build & Run" setup and there's nothing odd:
Compiler:
/home/sharon/opt/poky/2.0.2/sysroots/x86_64-pokysdk-linux/usr/bin/x86_64-poky-linux/x86_64-poky-linux-g++
Qt Version:
/home/sharon/opt/poky/2.0.2/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake
Kit: correct 'Qt Version' and 'Compiler' has been selectedThen I wonder qmake and lib path correct or not. So I checked by following command lines:
sharon@sharon-XXX:~/opt/poky/2.0.2/sysroots/x86_64-pokysdk-linux/usr/bin/qt5$ ./qmake -query
QT_SYSROOT:/home/sharon/opt/poky/2.0.2/sysroots/corei7-64-poky-linux
QT_INSTALL_PREFIX:/home/sharon/opt/poky/2.0.2/sysroots/corei7-64-poky-linux/usr
QT_INSTALL_PREFIX/raw:/usr
QT_INSTALL_ARCHDATA:/home/sharon/opt/poky/2.0.2/sysroots/corei7-64-poky-linux/usr/lib/qt5
QT_INSTALL_ARCHDATA/raw:/usr/lib/qt5
QT_INSTALL_DATA:/home/sharon/opt/poky/2.0.2/sysroots/corei7-64-poky-linux/usr/share/qt5
QT_INSTALL_DATA/raw:/usr/share/qt5
QT_INSTALL_DOCS:/home/sharon/opt/poky/2.0.2/sysroots/corei7-64-poky-linux/usr/share/doc/qt5
QT_INSTALL_DOCS/raw:/usr/share/doc/qt5
QT_INSTALL_HEADERS:/home/sharon/opt/poky/2.0.2/sysroots/corei7-64-poky-linux/usr/include/qt5
QT_INSTALL_HEADERS/raw:/usr/include/qt5
QT_INSTALL_LIBS:/home/sharon/opt/poky/2.0.2/sysroots/corei7-64-poky-linux/usr/lib
QT_INSTALL_LIBS/raw:/usr/lib
QT_INSTALL_LIBEXECS:/home/sharon/opt/poky/2.0.2/sysroots/corei7-64-poky-linux/usr/lib/qt5/libexec
QT_INSTALL_LIBEXECS/raw:/usr/lib/qt5/libexec
QT_INSTALL_BINS:/home/sharon/opt/poky/2.0.2/sysroots/corei7-64-poky-linux/usr/bin/qt5
QT_INSTALL_BINS/raw:/usr/bin/qt5
QT_INSTALL_TESTS:/home/sharon/opt/poky/2.0.2/sysroots/corei7-64-poky-linux/usr/share/qt5/tests
QT_INSTALL_TESTS/raw:/usr/share/qt5/tests
QT_INSTALL_PLUGINS:/home/sharon/opt/poky/2.0.2/sysroots/corei7-64-poky-linux/usr/lib/qt5/plugins
QT_INSTALL_PLUGINS/raw:/usr/lib/qt5/plugins
QT_INSTALL_IMPORTS:/home/sharon/opt/poky/2.0.2/sysroots/corei7-64-poky-linux/usr/lib/qt5/imports
QT_INSTALL_IMPORTS/raw:/usr/lib/qt5/imports
QT_INSTALL_QML:/home/sharon/opt/poky/2.0.2/sysroots/corei7-64-poky-linux/usr/lib/qt5/qml
QT_INSTALL_QML/raw:/usr/lib/qt5/qml
QT_INSTALL_TRANSLATIONS:/home/sharon/opt/poky/2.0.2/sysroots/corei7-64-poky-linux/usr/share/qt5/translations
QT_INSTALL_TRANSLATIONS/raw:/usr/share/qt5/translations
QT_INSTALL_CONFIGURATION:/home/sharon/opt/poky/2.0.2/sysroots/corei7-64-poky-linux/etc/qt5
QT_INSTALL_CONFIGURATION/raw:/etc/qt5
QT_INSTALL_EXAMPLES:/home/sharon/opt/poky/2.0.2/sysroots/corei7-64-poky-linux/usr/share/qt5/examples
QT_INSTALL_EXAMPLES/raw:/usr/share/qt5/examples
QT_INSTALL_DEMOS:/home/sharon/opt/poky/2.0.2/sysroots/corei7-64-poky-linux/usr/share/qt5/examples
QT_INSTALL_DEMOS/raw:/usr/share/qt5/examples
QT_HOST_PREFIX:/home/sharon/opt/poky/2.0.2/sysroots/x86_64-pokysdk-linux
QT_HOST_DATA:/home/sharon/opt/poky/2.0.2/sysroots/corei7-64-poky-linux/usr/lib/qt5
QT_HOST_BINS:/home/sharon/opt/poky/2.0.2/sysroots/x86_64-pokysdk-linux/usr/bin/qt5
QT_HOST_LIBS:/home/sharon/opt/poky/2.0.2/sysroots/x86_64-pokysdk-linux/usr/lib
QT_EXTERNAL_HOST_BINS:
QMAKE_SPEC:/home/sharon/valleyisland/jethro/poky/build/tmp/sysroots/x86_64-linux/usr/lib/qt5/mkspecs/linux-oe-g++
QMAKE_XSPEC:linux-oe-g++
QMAKE_VERSION:3.0
QT_VERSION:5.5.1
sharon@sharon-XXX:~/opt/poky/2.0.2/sysroots/x86_64-pokysdk-linux/usr/bin/qt5$I don't understand why QT_HOST_DATA was set to sysroot path, and QMAKE_SPEC was set to the path stores output for my Yocto project.
I tried to update QMAKE_SPEC by "./qmake -set <path>" and it does not work.
Is there anyway to correctly setup QMAKE_SPEC and QT_HOST_DATA?I am quite confused about QMAKE_SPEC and QMAKE_XSPEC.
Is 'QMAKE_SPEC' specified path to HOST qmake configuration and 'QMAKE_XSPEC' specified path to TARGET qmake configuration? Does it mean after I hit 'build' for my project I am going to get binary output to run on HOST (the machine qtCreator installed on). Not target device??? How can I generate binary file for my target device???