I've 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 -reduce-exports -no-pch make make install
No problem while configuring and building. Then 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 a lot of times in these years. But 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.
The *-g++ file is exactly where it's expected to be, like in the compiler configuration under Tools menu.
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.
...continue for a lot of other modules
I never had such a problem - I don't know what those messages actually mean and how to fix.