Important: Please read the Qt Code of Conduct -

[Solved] Qt Compiler Error: Looking in wrong location for cross compiler

  • Hello,

    I have been following the insturctions in the link below, in order to cross-compile Qt5 on the Rasberry Pi.

    I beleive that I have successfully followed the instructions, but am getting hung up while trying to build the example project. Here is my Compile Output:
    @ 16:46:21: Running steps for project pip...
    16:46:21: Starting: "/usr/local/qt5pi/bin/qmake" /home/morgan/Programming/pip/ -r -spec devices/linux-rasp-pi-g++ CONFIG+=debug CONFIG+=declarative_debug CONFIG+=qml_debug
    Project ERROR: Compiler /home/stpease/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ not found. Check the value of CROSS_COMPILE -device-option
    Could not read qmake configuration file /usr/local/qt5pi/mkspecs/devices/linux-rasp-pi-g++/qmake.conf.
    Error processing project file: /home/morgan/Programming/pip/
    16:46:21: The process "/usr/local/qt5pi/bin/qmake" exited with code 3.
    Error while building/deploying project pip (kit: Raspberry Pi)
    When executing step 'qmake'
    16:46:21: Elapsed time: 00:00.

    For some reason, which is probably pretty self evidant to users more experienced in Linux than I, it is looking for the compliler in the /home/stpease/ folder, which does not exist. In Qt Creator, I specified in Build&Run->Compilers the Compiler Path to be /opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++

    Any help with this would be much appreciated! I have tried looking for existing help on this, but have been unsuccessful.

    Much thanks in advance!

  • Lifetime Qt Champion

    Hi and welcome to devnet,


    This is pretty strange, where did you install your qt5pi ?

  • Thanks for the reply!

    qt5pi is installed in /usr/local/. I was looked in qmake.conf, but do not see the problem. I tried to follow the dependencies to fine CROSS_COMPILE, but couldn't find the config file it is refrenced in.

    Here is the qmake.conf file:

    qmake configuration for Broadcom's Raspberry PI



    QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/opt/vc/lib


    QMAKE_INCDIR_EGL = $$[QT_SYSROOT]/opt/vc/include $$[QT_SYSROOT]/opt/vc/include/interface/vcos/pthreads


    contains(DISTRO, squeeze) {
    #Debian Squeeze: Legacy everything
    } else:contains(DISTRO, arch) {
    #On principle: no wizardry required
    } else {
    #This is not strictly necessary
    DISTRO_OPTS += deb-multi-arch
    DISTRO_OPTS += hard-float



    EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_pi.cpp



  • Lifetime Qt Champion

    Try searching for stpease in qt5pi

  • Thanks for the help! I used grep to search the qt5pi directory and found all the references to /home/stpease and deleted it from the paths.

    I've now succesfully cross compiled and ran a Qt application on the raspberry pi! Thanks again!

  • Lifetime Qt Champion

    You're welcome !

    Since it's now building correctly, please update the thread title prepending [solved] so other forum users may know a solution has been found :)

Log in to reply