cross compile Qt 5.7 for rpi3 : help needed



  • 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????



  • @hem1 said in cross compile Qt 5.7 for rpi3 : help needed:

    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

    Not sure if that's the cause of your issues, but comparing your configuration options to the one from RaspberryPi2EGLFS guide I found two differences:

    1. device: you -> linux-rpi3-g++ guide -> linux-rasp-pi3-g++
    2. missing -make libs


  • @Pablo-J.-Rogina said in cross compile Qt 5.7 for rpi3 : help needed:

    -make libs

    ya i missed -make libs but that does not changed anything in the output. i am getting same terminal output.



  • @hem1 ok regarding -make libs, but what about this:

    device: you -> linux-rpi3-g++ guide -> linux-rasp-pi3-g++

    did you try that different device naming?



  • @Pablo-J.-Rogina said in cross compile Qt 5.7 for rpi3 : help needed:

    @hem1 ok regarding -make libs, but what about this:

    device: you -> linux-rpi3-g++ guide -> linux-rasp-pi3-g++

    did you try that different device naming?

    actually the device name depends on the folder name present in qtbase of QT folder which was like linux-rpi3-g++ so i used that otherwise it was giving error no device named linux-rasp-pi3-g++ present.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.