Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. QtonPi
  4. [Solved] Qt Compiler Error: Looking in wrong location for cross compiler
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved QtonPi
6 Posts 2 Posters 5.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Skyence
    wrote on last edited by
    #1

    Hello,

    I have been following the insturctions in the link below, in order to cross-compile Qt5 on the Rasberry Pi.
    Instructions: http://raspberry-qt.org/

    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/pip.pro -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/pip.pro
    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!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      @/usr/local/qt5pi/mkspecs/devices/linux-rasp-pi-g++/qmake.conf@

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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Skyence
        wrote on last edited by
        #3

        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

        http://wiki.qt-project.org/Devices/RaspberryPi

        include(../common/linux_device_pre.conf)

        QT_QPA_DEFAULT_PLATFORM = wayland

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

        QMAKE_LIBDIR_OPENGL_ES2 = $$[QT_SYSROOT]/opt/vc/lib
        QMAKE_LIBDIR_EGL = $$QMAKE_LIBDIR_OPENGL_ES2

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

        QMAKE_LIBS_EGL = -lEGL -lGLESv2

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

        QMAKE_CFLAGS +=
        -marm
        -mfpu=vfp
        -mtune=arm1176jzf-s
        -march=armv6zk
        -mabi=aapcs-linux

        QMAKE_CXXFLAGS = $$QMAKE_CFLAGS

        EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_pi.cpp
        EGLFS_PLATFORM_HOOKS_LIBS = -lbcm_host

        include(../common/linux_device_post.conf)

        load(qt_config)
        @

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Try searching for stpease in qt5pi

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Skyence
            wrote on last edited by
            #5

            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!

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              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 :)

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved