Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. QtonPi
  4. Qt 5.7 and cross compile
QtWS25 Last Chance

Qt 5.7 and cross compile

Scheduled Pinned Locked Moved Unsolved QtonPi
qt 5.7 and rpi3
32 Posts 5 Posters 21.4k Views
  • 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.
  • N Offline
    N Offline
    Niko Hallikainen
    wrote on last edited by
    #1

    I try to cross compile in ubuntu. But I get this error:
    Failed to process makespec for platform 'devices/linux-rpi3-g++'
    Project ERROR: Compiler /home/nikohal/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++ not found. Check the value of CROSS_COMPILE -device-option
    Could not read qmake configuration file /home/nikohal/qt-everywhere-opensource-src-5.7.0/qtbase/mkspecs/devices/linux-rpi3-g++/qmake.conf.
    Error processing project file: /dev/null
    nikohal@nikohal-VirtualBox:~/qt-everywhere-opensource-src-5.7.0$
    How I can fix this?
    Br, Niko H.

    1 Reply Last reply
    0
    • deleted71D Offline
      deleted71D Offline
      deleted71
      wrote on last edited by deleted71
      #2

      What is the command you are running?

      Does the file

      /home/nikohal/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++
      

      exist?

      N 2 Replies Last reply
      0
      • deleted71D deleted71

        What is the command you are running?

        Does the file

        /home/nikohal/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++
        

        exist?

        N Offline
        N Offline
        Niko Hallikainen
        wrote on last edited by
        #3

        @I.C.Wiener Yes it is there. But some reason it not found.

        Br, Niko H.

        1 Reply Last reply
        0
        • deleted71D deleted71

          What is the command you are running?

          Does the file

          /home/nikohal/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++
          

          exist?

          N Offline
          N Offline
          Niko Hallikainen
          wrote on last edited by
          #4

          @I.C.Wiener I also try installing lib32z1 lib32ncurses5 lib32bz2-1.0 packages, but not help.

          1 Reply Last reply
          0
          • deleted71D Offline
            deleted71D Offline
            deleted71
            wrote on last edited by
            #5

            So what command are you running?

            N 2 Replies Last reply
            0
            • deleted71D deleted71

              So what command are you running?

              N Offline
              N Offline
              Niko Hallikainen
              wrote on last edited by
              #6

              @I.C.Wiener
              In path was error, but now I get this error:
              checking for C++11...
              /home/nikohal/raspi/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++ -c -march=armv8-a+crc -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -pipe -Os -mthumb -std=c++1z -mfloat-abi=hard --sysroot=/home/nikohal/raspi/sysroot -O2 -std=gnu++11 -Wall -W -fPIC -I. -I../../../mkspecs/devices/linux-rpi3-g++ -o c++11.o c++11.cpp
              /home/nikohal/raspi/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
              make: *** [c++11.o] Error 127
              C++11 disabled.
              ERROR: Qt requires a C++11 compiler and yours does not seem to be that.
              Please upgrade.
              In path was "tools" what I have wasn't

              1 Reply Last reply
              0
              • deleted71D deleted71

                So what command are you running?

                N Offline
                N Offline
                Niko Hallikainen
                wrote on last edited by
                #7

                @I.C.Wiener Command is configure. I also install packages libc6-i386 lib32z1 lib32stdc++6. And now It give this error:
                /home/nikohal/raspi/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++ -c -march=armv8-a+crc -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -pipe -Os -mthumb -std=c++1z -mfloat-abi=hard --sysroot=/home/nikohal/raspi/sysroot -O2 -std=gnu++11 -Wall -W -fPIC -I. -I../../../mkspecs/devices/linux-rpi3-g++ -o c++11.o c++11.cpp
                arm-linux-gnueabihf-g++: virhe: unrecognized argument in option ”-march=armv8-a+crc”
                arm-linux-gnueabihf-g++: huom: valid arguments to ”-march=” are: armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5e armv5t armv5te armv6 armv6-m armv6j armv6k armv6s-m armv6t2 armv6z armv6zk armv7 armv7-a armv7-m armv7-r armv7e-m armv8-a iwmmxt iwmmxt2 native
                arm-linux-gnueabihf-g++: virhe: unrecognized command line option ”-std=c++1z”
                make: *** [c++11.o] Error 1
                C++11 disabled.
                ERROR: Qt requires a C++11 compiler and yours does not seem to be that.
                Please upgrade.

                1 Reply Last reply
                0
                • deleted71D Offline
                  deleted71D Offline
                  deleted71
                  wrote on last edited by
                  #8

                  What command did you execute? The whole command line please.
                  And please try to use

                  // Code markers
                  

                  for console output and commands.

                  N 1 Reply Last reply
                  0
                  • deleted71D deleted71

                    What command did you execute? The whole command line please.
                    And please try to use

                    // Code markers
                    

                    for console output and commands.

                    N Offline
                    N Offline
                    Niko Hallikainen
                    wrote on last edited by
                    #9

                    @I.C.Wiener Command is:

                     ./configure -release -opengl es2 -device linux-rpi3-g++ -device-option CROSS_COMPILE=~/raspi/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -v
                    And I run it in folder qtbase.
                    
                    1 Reply Last reply
                    0
                    • deleted71D Offline
                      deleted71D Offline
                      deleted71
                      wrote on last edited by
                      #10

                      I had some success by installing

                      g++-arm-linux-gnueabihf
                      

                      and then replacing

                      CROSS_COMPILE=~/raspi/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-
                      

                      by

                      CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf-
                      

                      In general I was trying to cross-compile Qt5.7 for Raspi 3 for some days, made some progress but in the end, the result was not convincing. I guess the raspi-tools need some updating for raspi 3 and Qt5.7 respectively.

                      N 1 Reply Last reply
                      0
                      • deleted71D deleted71

                        I had some success by installing

                        g++-arm-linux-gnueabihf
                        

                        and then replacing

                        CROSS_COMPILE=~/raspi/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-
                        

                        by

                        CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf-
                        

                        In general I was trying to cross-compile Qt5.7 for Raspi 3 for some days, made some progress but in the end, the result was not convincing. I guess the raspi-tools need some updating for raspi 3 and Qt5.7 respectively.

                        N Offline
                        N Offline
                        Niko Hallikainen
                        wrote on last edited by
                        #11

                        @I.C.Wiener Yes I install that from ubuntu repository, but it give that error.

                        /usr/bin/arm-linux-gnueabihf-g++ -c -march=armv8-a+crc -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -pipe -Os -mthumb -std=c++1z -mfloat-abi=hard --sysroot=/home/nikohal/raspi/sysroot -g -Wall -W -fPIC  -I. -I../../mkspecs/devices/linux-rpi3-g++ -o arch.o arch.cpp
                        arm-linux-gnueabihf-g++: error: unrecognized command line option ‘-std=c++1z’
                        make: *** [arch.o] Error 1
                        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 enabled.
                        /usr/bin/arm-linux-gnueabihf-g++ -c -fvisibility=hidden fvisibility.c
                        Symbol visibility control enabled.
                        /usr/bin/arm-linux-gnueabihf-g++ --sysroot=/home/nikohal/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... 
                        /usr/bin/arm-linux-gnueabihf-g++ -c -march=armv8-a+crc -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -pipe -Os -mthumb -std=c++1z -mfloat-abi=hard --sysroot=/home/nikohal/raspi/sysroot -O2 -std=gnu++11 -Wall -W -fPIC  -I. -I../../../mkspecs/devices/linux-rpi3-g++ -o c++11.o c++11.cpp
                        arm-linux-gnueabihf-g++: error: unrecognized command line option ‘-std=c++1z’
                        make: *** [c++11.o] Error 1
                        C++11 disabled.
                        ERROR: Qt requires a C++11 compiler and yours does not seem to be that.
                        Please upgrade.
                        

                        I Google that, but nothing similar not found

                        S 1 Reply Last reply
                        0
                        • deleted71D Offline
                          deleted71D Offline
                          deleted71
                          wrote on last edited by
                          #12

                          Hmm, sorry. I do not have my cross-compiling environment set up anymore (it was too fiddly so I now compile on the Raspi3 directly) but I remember me playing around with the qtbase/mkspecs/common/g++-base.conf file. Like changing the -std=c++1z line to -std=c++11, so cheating a little bit. I guess if arm-linux-gnueabihf-g++ does not know c++1z yet, there's not much else you can do.

                          N 2 Replies Last reply
                          0
                          • deleted71D deleted71

                            Hmm, sorry. I do not have my cross-compiling environment set up anymore (it was too fiddly so I now compile on the Raspi3 directly) but I remember me playing around with the qtbase/mkspecs/common/g++-base.conf file. Like changing the -std=c++1z line to -std=c++11, so cheating a little bit. I guess if arm-linux-gnueabihf-g++ does not know c++1z yet, there's not much else you can do.

                            N Offline
                            N Offline
                            Niko Hallikainen
                            wrote on last edited by
                            #13

                            @I.C.Wiener I have now this problem in raspberry pi 3. I try to compile in there qt, but it give this error:

                            Running configuration tests...
                            Failed to process makespec for platform 'devices/linux-rasp-pi-g++'
                            Project ERROR: CROSS_COMPILE needs to be set via -device-option CROSS_COMPILE=<path>
                            Could not read qmake configuration file /home/pi/qt-everywhere-opensource-src-5.7.0/qtbase/mkspecs/devices/linux-rasp-pi-g++/qmake.conf.
                            Error processing project file: /dev/null
                            

                            My configure is:

                            ./configure -v -xcb -tslib -force-pkg-config -device linux-rasp-pi-g++ -opensource -confirm-license -optimized-qmake -reduce-exports -release -qt-pcre -make libs  -prefix /usr/local/qt5 2>&1 | tee config.out
                            
                            1 Reply Last reply
                            0
                            • deleted71D deleted71

                              Hmm, sorry. I do not have my cross-compiling environment set up anymore (it was too fiddly so I now compile on the Raspi3 directly) but I remember me playing around with the qtbase/mkspecs/common/g++-base.conf file. Like changing the -std=c++1z line to -std=c++11, so cheating a little bit. I guess if arm-linux-gnueabihf-g++ does not know c++1z yet, there's not much else you can do.

                              N Offline
                              N Offline
                              Niko Hallikainen
                              wrote on last edited by
                              #14

                              @I.C.Wiener I try to change that line, but now I get this error:

                              Symbolic function binding disabled.
                              checking for C++11...
                              /usr/bin/g++ -c -march=armv8-a+crc -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -pipe -Os -mthumb -std=c++1z -mfloat-abi=hard -O2 -std=gnu++11 -Wall -W -fPIC  -I. -I../../../mkspecs/devices/linux-rpi3-g++ -o c++11.o c++11.cpp
                              g++: error: unrecognized command line option â-std=c++1zâ
                              Makefile:417: recipe for target 'c++11.o' failed
                              make: *** [c++11.o] Error 1
                              C++11 disabled.
                              ERROR: Qt requires a C++11 compiler and yours does not seem to be that.
                              Please upgrade.
                              

                              How I can fix this?

                              1 Reply Last reply
                              0
                              • N Niko Hallikainen

                                @I.C.Wiener Yes I install that from ubuntu repository, but it give that error.

                                /usr/bin/arm-linux-gnueabihf-g++ -c -march=armv8-a+crc -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -pipe -Os -mthumb -std=c++1z -mfloat-abi=hard --sysroot=/home/nikohal/raspi/sysroot -g -Wall -W -fPIC  -I. -I../../mkspecs/devices/linux-rpi3-g++ -o arch.o arch.cpp
                                arm-linux-gnueabihf-g++: error: unrecognized command line option ‘-std=c++1z’
                                make: *** [arch.o] Error 1
                                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 enabled.
                                /usr/bin/arm-linux-gnueabihf-g++ -c -fvisibility=hidden fvisibility.c
                                Symbol visibility control enabled.
                                /usr/bin/arm-linux-gnueabihf-g++ --sysroot=/home/nikohal/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... 
                                /usr/bin/arm-linux-gnueabihf-g++ -c -march=armv8-a+crc -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -pipe -Os -mthumb -std=c++1z -mfloat-abi=hard --sysroot=/home/nikohal/raspi/sysroot -O2 -std=gnu++11 -Wall -W -fPIC  -I. -I../../../mkspecs/devices/linux-rpi3-g++ -o c++11.o c++11.cpp
                                arm-linux-gnueabihf-g++: error: unrecognized command line option ‘-std=c++1z’
                                make: *** [c++11.o] Error 1
                                C++11 disabled.
                                ERROR: Qt requires a C++11 compiler and yours does not seem to be that.
                                Please upgrade.
                                

                                I Google that, but nothing similar not found

                                S Offline
                                S Offline
                                shivaVMC
                                wrote on last edited by
                                #15

                                @Niko-Hallikainen
                                I too stuckup with the same issue,can you please help on the same.1 day wasted on the same error.it would be great help for me on ur suggestion.

                                Thanks In advance

                                Pablo J. RoginaP 1 Reply Last reply
                                0
                                • S shivaVMC

                                  @Niko-Hallikainen
                                  I too stuckup with the same issue,can you please help on the same.1 day wasted on the same error.it would be great help for me on ur suggestion.

                                  Thanks In advance

                                  Pablo J. RoginaP Offline
                                  Pablo J. RoginaP Offline
                                  Pablo J. Rogina
                                  wrote on last edited by
                                  #16

                                  @shivaVMC what about following this guide?

                                  Upvote the answer(s) that helped you solve the issue
                                  Use "Topic Tools" button to mark your post as Solved
                                  Add screenshots via postimage.org
                                  Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                                  S 2 Replies Last reply
                                  1
                                  • Pablo J. RoginaP Pablo J. Rogina

                                    @shivaVMC what about following this guide?

                                    S Offline
                                    S Offline
                                    shivaVMC
                                    wrote on last edited by
                                    #17

                                    @Pablo-J.-Rogina
                                    I followed the complete procedure as per below link,Just changed the V_5.7.1 to my V_5.7.0
                                    https://lb.raspberrypi.org/forums/viewtopic.php?t=204529
                                    Still I m having the same issue can you please help me out on this,Almost I have spent 8 Houors on sorting this error.It will a kind support to reduce me tension.

                                    Thanks In advance

                                    1 Reply Last reply
                                    0
                                    • Pablo J. RoginaP Pablo J. Rogina

                                      @shivaVMC what about following this guide?

                                      S Offline
                                      S Offline
                                      shivaVMC
                                      wrote on last edited by
                                      #18

                                      @Pablo-J.-Rogina
                                      Initially I was following that guide only,but I failed at beloe step
                                      git clone git://code.qt.io/qt/qtbase.git -b linux-rasp-pi3-g++
                                      Cloning into 'qtbase'...
                                      fatal: Remote branch linux-rasp-pi3-g++ not found in upstream origin

                                      Pablo J. RoginaP 1 Reply Last reply
                                      0
                                      • S shivaVMC

                                        @Pablo-J.-Rogina
                                        Initially I was following that guide only,but I failed at beloe step
                                        git clone git://code.qt.io/qt/qtbase.git -b linux-rasp-pi3-g++
                                        Cloning into 'qtbase'...
                                        fatal: Remote branch linux-rasp-pi3-g++ not found in upstream origin

                                        Pablo J. RoginaP Offline
                                        Pablo J. RoginaP Offline
                                        Pablo J. Rogina
                                        wrote on last edited by
                                        #19

                                        @shivaVMC said in Qt 5.7 and cross compile:

                                        git clone git://code.qt.io/qt/qtbase.git -b linux-rasp-pi3-g++

                                        You need to specify what Qt branch (i.e. 5.7, ..., 5.10, etc.) you want to clone from Git repository, let's say you want to cross-compile Qt 5.10:

                                        git clone git://code.qt.io/qt/qtbase.git -b 5.10
                                        

                                        then you'll have a folder qtbase will all the sources to build Qt 5.10

                                        Upvote the answer(s) that helped you solve the issue
                                        Use "Topic Tools" button to mark your post as Solved
                                        Add screenshots via postimage.org
                                        Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                                        S 2 Replies Last reply
                                        2
                                        • Pablo J. RoginaP Pablo J. Rogina

                                          @shivaVMC said in Qt 5.7 and cross compile:

                                          git clone git://code.qt.io/qt/qtbase.git -b linux-rasp-pi3-g++

                                          You need to specify what Qt branch (i.e. 5.7, ..., 5.10, etc.) you want to clone from Git repository, let's say you want to cross-compile Qt 5.10:

                                          git clone git://code.qt.io/qt/qtbase.git -b 5.10
                                          

                                          then you'll have a folder qtbase will all the sources to build Qt 5.10

                                          S Offline
                                          S Offline
                                          shivaVMC
                                          wrote on last edited by
                                          #20

                                          @Pablo-J.-Rogina
                                          Hi Rogina,
                                          Thank You,Thanks alot for quick response.
                                          Your Comments/Suggestions are perfect to fix my issue.
                                          Everything Looks fine now and my problem is solved.

                                          Excellent...!!!

                                          1 Reply Last reply
                                          0

                                          • Login

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