i am trying to cross compile QT 5.7 for rpi 3 and following following links for the same:
https://www.ics.com/blog/configuring-qt-creator-raspberry-pi
https://wiki.qt.io/RaspberryPi2EGLFS

on executing ./configure command i am getting so many errors here is my terminal output:

sntd@ubuntu:~/Qt5.7.0/5.7/Src/qtbase$    sudo ./configure -release -opengl es2 -device linux-rpi3-g++ -device-option CROSS_COMPILE=~/raspi/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5pi -v

This is the Qt Open Source Edition.
You are licensed to use this software under the terms of
the GNU Lesser General Public License (LGPL) versions 3.
You are also licensed to use this software under the terms of
the GNU General Public License (GPL) versions 2.

You have already accepted the terms of the Open Source license.

DEFAULT_INCDIRS="/home/sntd/raspi/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3
/home/sntd/raspi/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/arm-linux-gnueabihf
/home/sntd/raspi/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include/c++/4.8.3/backward
/home/sntd/raspi/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/lib/gcc/arm-linux-gnueabihf/4.8.3/include
/home/sntd/raspi/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/lib/gcc/arm-linux-gnueabihf/4.8.3/include-fixed
/home/sntd/raspi/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/include
/home/sntd/raspi/sysroot/usr/include
/home/sntd/raspi/sysroot/usr/include/arm-linux-gnueabihf
"
DEFAULT_LIBDIRS="/home/sntd/raspi/sysroot/usr/lib
/home/sntd/raspi/sysroot/usr/lib/arm-linux-gnueabihf
/home/sntd/raspi/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/lib/gcc/arm-linux-gnueabihf/4.8.3
/home/sntd/raspi/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/lib/gcc/arm-linux-gnueabihf
/home/sntd/raspi/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/lib/gcc
/home/sntd/raspi/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/lib
/home/sntd/raspi/sysroot/lib/arm-linux-gnueabihf
/home/sntd/raspi/sysroot/lib
"
Creating qmake...
make: Nothing to be done for `first'.
Running configuration tests...
Found pkg-config from $PATH: /usr/bin/pkg-config
Note: PKG_CONFIG_LIBDIR automatically set to /home/sntd/raspi/sysroot/usr/lib/pkgconfig:/home/sntd/raspi/sysroot/usr/share/pkgconfig:/home/sntd/raspi/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig
Note: PKG_CONFIG_SYSROOT_DIR automatically set to /home/sntd/raspi/sysroot
Determining architecture... ()
/home/sntd/raspi/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -c -march=armv8-a+crc -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -pipe -Os -mthumb -mfloat-abi=hard --sysroot=/home/sntd/raspi/sysroot -g -Wall -W -fPIC  -I. -I../../mkspecs/devices/linux-rpi3-g++ -o arch.o arch.cpp
Assembler messages:
Fatal error: invalid -march= option: `armv8-a+crc'
make: *** [arch.o] Error 2
Unable to determine architecture!

Could not determine the target architecture!
Turn on verbose messaging (-v) to see the final report.
Determining architecture... ()
g++ -c -pipe -g -Wall -W -fPIC  -I. -I../../mkspecs/linux-g++ -o arch.o arch.cpp
g++  -o arch arch.o    
    Found architecture in binary
CFG_HOST_ARCH="x86_64"
CFG_HOST_CPUFEATURES=" mmx sse sse2"
System architecture: 'unknown'
Host architecture: 'x86_64'
Precompiled-headers support disabled.
/home/sntd/raspi/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -c -fvisibility=hidden fvisibility.c
Assembler messages:
Fatal error: invalid -march= option: `armv6'
Symbol visibility control disabled.
Assembler messages:
Fatal error: invalid -march= option: `armv6'
Assembler messages:
Fatal error: invalid -march= option: `armv6'
/home/sntd/raspi/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ --sysroot=/home/sntd/raspi/sysroot -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
bsymbolic_functions.c:2:2: error: #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
 #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."
  ^
Symbolic function binding disabled.
checking for C++11...
/home/sntd/raspi/tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -c -march=armv8-a+crc -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -pipe -Os -mthumb -mfloat-abi=hard --sysroot=/home/sntd/raspi/sysroot -O2 -std=gnu++11 -Wall -W -fPIC  -I. -I../../../mkspecs/devices/linux-rpi3-g++ -o c++11.o c++11.cpp
Assembler messages:
Fatal error: invalid -march= option: `armv8-a+crc'
make: *** [c++11.o] Error 2

C++11 disabled.

ERROR: Qt requires a C++11 compiler and yours does not seem to be that.
Please upgrade.

please help me this i am getting so many errors how to rectify invalid -march option error????

  • The last error tells you what to do: "Qt requires a C++11 compiler and yours does not seem to be that. Please upgrade." You should do that. – Ingo Jul 13 at 8:57
  • but as you can see above errors are not due to this invalid march option armv8 + crc is main concern that is assembler error i don't know why target architecture is not being identified in my case – hemu Jul 13 at 11:01
  • "Could not determine the target architecture! Turn on verbose messaging (-v) to see the final report." Did you turned on verbose messaging (-v)? Please address me with @Ingo. – Ingo Jul 13 at 11:44
  • @lngo i have used -v at the end of command is that you meant by turn on verbose messaging?? – hemu Jul 13 at 13:20
  • I only read the hints from the error outputs. Why does they complain to use the -v option? I don't have this cross compiling running. – Ingo Jul 13 at 14:12

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.