Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Raspbian: /opt/qt/bin/qmake: cannot execute binary file: Exec format error
Forum Updated to NodeBB v4.3 + New Features

Raspbian: /opt/qt/bin/qmake: cannot execute binary file: Exec format error

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 2.9k 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.
  • A Offline
    A Offline
    Antonio Ortiz
    wrote on 23 Oct 2017, 13:47 last edited by
    #1

    Hi, I'm facing some troubles cross compiling Qt for Raspbian Lite. I has configure my enviroment following these guide https://wiki.qt.io/RaspberryPi2EGLFS and use the following instruction to compile:

    mkdir build
    cd build
    ../configure -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE= /opt/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot /mnt/pi3 -prefix /opt/qt -release -static -opensource -confirm-license -make libs -qt-zlib -qt-libjpeg -qt-libpng -qt-xcb -qt-freetype -qt-pcre -qt-harfbuzz -nomake examples -nomake tests -no-use-gold-linker -skip script
    make -j4
    sudo make install
    
    

    Everything look good. After that I create an image of my sysroot with dd and put it into an SD. When I try to run qmake it promt me this error:

    /opt/qt/bin/qmake: cannot execute binary file: Exec format error
    

    I don't understand why it gets compile for another architecture

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 23 Oct 2017, 13:57 last edited by
      #2

      Hi,

      Because qmake and its friends (moc, uic, rcc, etc.) are host tools so they get compiled for the host you are cross-compiling on.

      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
      1

      1/2

      23 Oct 2017, 13:47

      • Login

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