Raspbian: /opt/qt/bin/qmake: cannot execute binary file: Exec format error
Unsolved
Mobile and Embedded
-
wrote on 23 Oct 2017, 13:47 last edited by
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
-
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.
1/2