1

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.

1 Answer 1

1

Looks like you resolved the problem by upgrading and doing a clean build?

This Qt 5.9 bug sounds strikingly similar and appeared to affect all cross-compilation targets including Raspberry Pi.

However, the fix was merged into the 5.9 branch on August 15th, a week before your post. One explanation could be that you had cloned the repo earlier and while troubleshooting over the course of a week had not been doing a corresponding git submodule update after each git pull. Note that ./init-repository requires that you pass the -f flag if the submodules have already been init once.

1
  • Yes, it might be a good explanation of what happened.
    – Mark
    Commented Oct 30, 2017 at 8:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.