title: Error while cross compiling Qt for a raspberry pi3
body: <p>I want to cross compile Qt to develop a gui for a raspberry pi. I have been following this tutorial: <a href="https://wiki.qt.io/RaspberryPi2EGLFS" rel="nofollow noreferrer">https://wiki.qt.io/RaspberryPi2EGLFS</a></p>
  
  <p>I am using this configure command: </p>
  
  <pre><code>./configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option \
  CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- \
  -sysroot ~/raspi/sysroot -opensource -confirm-license \
  -make libs -no-use-gold-linker -prefix /usr/local/qt5pi \
  -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -v
  </code></pre>
  
  <p>This is the error I'm getting back: </p>
  
  <pre><code>/home/vbox/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/vbox/raspi/sysroot -Wl,-O1 -Wl,-rpath-link,/home/vbox/raspi/sysroot/opt/vc/lib -Wl,-rpath-link,/home/vbox/raspi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/vbox/raspi/sysroot/lib/arm-linux-gnueabihf -o verifyspec verifyspec.o    
  /home/vbox/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find crt1.o: No such file or directory
  /home/vbox/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find crti.o: No such file or directory
  /home/vbox/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lm
   collect2: error: ld returned 1 exit status
   Makefile:66: recipe for target 'verifyspec' failed
   make: *** [verifyspec] Error 1
  Note: Also available for Linux: linux-clang linux-icc
  ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.`
  </code></pre>
  
  <p>This is the config.log: </p>
  
  <pre><code>vbox@vbox:~/qtbase$ cat config.log
  Command line: -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=/home/vbox/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot /home/vbox/raspi/sysroot -opensource -confirm-license -make libs -no-use-gold-linker -prefix /usr/local/qt5pi -extprefix /home/vbox/raspi/qt5pi -hostprefix /home/vbox/raspi/qt5 -v
  executing config test machineTuple
  + /home/vbox/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -dumpmachine
   arm-linux-gnueabihf
  test config.qtbase.tests.machineTuple succeeded
  executing config test verifyspec
  + cd /home/vbox/qtbase/config.tests/verifyspec &amp;&amp; /home/vbox/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_CFLAGS += --sysroot=/home/vbox/raspi/sysroot" "QMAKE_CXXFLAGS += --sysroot=/home/vbox/raspi/sysroot" "QMAKE_LFLAGS += --sysroot=/home/vbox/raspi/sysroot" -early "CONFIG += cross_compile" /home/vbox/qtbase/config.tests/verifyspec
   Info: creating stash file /home/vbox/qtbase/config.tests/.qmake.stash
  + cd /home/vbox/qtbase/config.tests/verifyspec &amp;&amp; MAKEFLAGS= /usr/bin/make
   /home/vbox/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -c -march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard --sysroot=/home/vbox/raspi/sysroot -O2 -std=gnu++11 -w -fPIC  -I. -I/home/vbox/qtbase/mkspecs/devices/linux-rasp-pi3-g++ -o verifyspec.o verifyspec.cpp
   /home/vbox/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/vbox/raspi/sysroot -Wl,-O1 -Wl,-rpath-link,/home/vbox/raspi/sysroot/opt/vc/lib -Wl,-rpath-link,/home/vbox/raspi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/vbox/raspi/sysroot/lib/arm-linux-gnueabihf -o verifyspec verifyspec.o    /home/vbox/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find crt1.o: No such file or directory
   /home/vbox/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find crti.o: No such file or directory
   /home/vbox/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lm
   collect2: error: ld returned 1 exit status
   Makefile:66: recipe for target 'verifyspec' failed
   make: *** [verifyspec] Error 1
  </code></pre>
  
  <p>I'm not sure where to go from here, I don't know enough to start debugging this issue. Are there alternate toolchains available? Or is the issue with the QMakeSpec? Any suggestions on things to try would be very helpful.</p>