Qt 5.9.2 cross-compiled: host errors
I'm successfully cross-compiled Qt 5.9.2 for Raspbian Stretch with the following setup:
git clone -b 5.9 git://code.qt.io/qt/qt5.git cd qt5 ./init-repository ./configure -release -opengl es2 -device linux-rasp-pi2-g++ -device-option CROSS_COMPILE=~/opt/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot ~/opt/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix ~/opt/qt5pi -hostprefix ~/opt/qt5 -v -nomake examples -nomake tests -optimized-qmake -reduce-exports -no-pch make -j4 sudo make install
No problem while configuring and building.
Issues raised when I set up QtCreator (3.5.1):
- debugger: ~/opt/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gdb
- compiler: ~/opt/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++
- qmake: ~/opt/qt5/bin/qmake
- sysroot: ~/opt/sysroot
I've done this several times in these years. Now, when I create a new QWidget project I get this error:
/home/mark/opt/qt5/mkspecs/features/toolchain.prf(70): system(execute) requires one or two arguments.
Project ERROR: Cannot run target compiler '/home/mark/opt/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++'. Maybe you forgot to setup the environment?
Error while parsing file /home/mark/Documenti/test2/test2.pro. Giving up.
What environment is talking about? The *-g++ file is there!
Instead, creating a QtQuick project leads to these other errors:
home/mark/opt/qt5/mkspecs/features/qmake_use.prf(6): 'take_first' is not a recognized replace function.
Project ERROR: Library '' is not defined.
Warnings while parsing QML type information of /home/mark/opt/qt5pi/qml/QtQuick.2:
/home/mark/opt/qt5pi/qml/QtQuick.2/plugins.qmltypes:1:24: Reading only version 1.1 parts.
/home/mark/opt/qt5pi/qml/QtQuick.2/plugins.qmltypes:10:5: Expected only Component and ModuleApi object definitions.
Warnings while parsing QML type information of /home/mark/opt/qt5pi/qml/QtQuick/Window.2:
/home/mark/opt/qt5pi/qml/QtQuick/Window.2/plugins.qmltypes:1:24: Reading only version 1.1 parts.
/home/mark/opt/qt5pi/qml/QtQuick/Window.2/plugins.qmltypes:10:5: Expected only Component and ModuleApi object definitions.
I'm stuck! I never had such a problem - I don't know what those messages actually mean and how to fix.
Solved upgrading everything and rebuilding all...
I encountered exactly same problems: successfully building qt, successfully build a program in terminal, but same errors configuring qt creator.
What do you mean saying "upgrading everything"?
I have the same branch of qt and upgraded raspbian stretch lite with apt.
The only difference is in the -device configure option that I write linux-rasp-pi3-g++ instead of linux-rasp-pi2-g++.
Thank you for your help
P.S. Is it possible that problems comes by using lite raspbian version and not the full one?
@AlTro Was there any resolution to your problem? I found a Qt-Bug that very likely seems to be related, but it was issued and already "resolved" in 5.9 and I'm cross-compiling with 5.10, so this specific bug should be solved.