Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Raspberry Pi Beginners Issue: toolchain or QMakeSpec is broken

Raspberry Pi Beginners Issue: toolchain or QMakeSpec is broken

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
cross-compilingarmhftoolchain
7 Posts 7 Posters 18.8k 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.
  • C Offline
    C Offline
    CybeX
    wrote on 27 Dec 2016, 23:27 last edited by CybeX
    #1

    Good day all

    Please note: newbie here, I am following this tutorial, attempting to make sense of it with my very limited knowledge.

    I am attempting to ,to my understanding, build a version of QT for my Raspberry Pi 3 by following this wiki tutorial

    I run into an error when configuring the qtbase with the command:

    ./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/rasp-pi-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi -hostprefix /usr/local/qt5pi
    

    Note that I am copying and pasting, if there is some mistake, it should be no fault of my own since I am trying to make sense of this as it is my first time doing this.

    The ouput follows:

    ~/opt/qt5/qtbase$ ./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/rasp-pi-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi -hostprefix /usr/local/qt5pi
    
    
    <srcbase> = /home/cx/opt/qt5/qtbase 
    <outbase> = /home/cx/opt/qt5/qtbase 
    Creating qmake...
    .Done.
    
    This is the Qt Open Source Edition.
    
    You have already accepted the terms of the Open Source license.
    
    Running configuration tests...
    Checking for valid makespec... 
    ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.
    
    Check config.log for details.
    

    Config.log contents

    Additional Info

    I have followed the tutorial to the "T"

    System : Linux Gnome 16.04 AMD64

    uname -r
    4.8.3-040803-generic
    
    gcc --version
    gcc (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
    Copyright (C) 2016 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    

    Any advice or recommendations would be much appreciated!

    A 1 Reply Last reply 2 Jan 2017, 20:12
    0
    • S Offline
      S Offline
      sieciech
      wrote on 2 Jan 2017, 10:07 last edited by
      #2

      All info you need is already pasted by you in config.log:

      /home/cx/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.7.2/../../../../arm-linux-gnueabihf/bin/ld: cannot find crt1.o: No such file or directory
      /home/cx/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.7.2/../../../../arm-linux-gnueabihf/bin/ld: cannot find crti.o: No such file or directory
      /home/cx/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.7.2/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lm
      collect2: error: ld returned 1 exit status
      Makefile:64: recipe for target 'verifyspec' failed
      make: *** [verifyspec] Error 1

      I think its compiler issue. You can google about fixing it. I remeber that i had to do some symbolic link tricks with g++ compiler, plus i had to install g++ compile (c++ 11 or even 14) to make qt compiled...
      regards
      W.

      1 Reply Last reply
      0
      • C CybeX
        27 Dec 2016, 23:27

        Good day all

        Please note: newbie here, I am following this tutorial, attempting to make sense of it with my very limited knowledge.

        I am attempting to ,to my understanding, build a version of QT for my Raspberry Pi 3 by following this wiki tutorial

        I run into an error when configuring the qtbase with the command:

        ./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/rasp-pi-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi -hostprefix /usr/local/qt5pi
        

        Note that I am copying and pasting, if there is some mistake, it should be no fault of my own since I am trying to make sense of this as it is my first time doing this.

        The ouput follows:

        ~/opt/qt5/qtbase$ ./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/rasp-pi-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi -hostprefix /usr/local/qt5pi
        
        
        <srcbase> = /home/cx/opt/qt5/qtbase 
        <outbase> = /home/cx/opt/qt5/qtbase 
        Creating qmake...
        .Done.
        
        This is the Qt Open Source Edition.
        
        You have already accepted the terms of the Open Source license.
        
        Running configuration tests...
        Checking for valid makespec... 
        ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.
        
        Check config.log for details.
        

        Config.log contents

        Additional Info

        I have followed the tutorial to the "T"

        System : Linux Gnome 16.04 AMD64

        uname -r
        4.8.3-040803-generic
        
        gcc --version
        gcc (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
        Copyright (C) 2016 Free Software Foundation, Inc.
        This is free software; see the source for copying conditions.  There is NO
        warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
        

        Any advice or recommendations would be much appreciated!

        A Offline
        A Offline
        ambershark
        wrote on 2 Jan 2017, 20:12 last edited by
        #3

        @CybeX From that tutorial:

        The default mkspec symlink is broken.
        It means that mkspec is not found on your sysroot, so your must copy it.
        
        paulo@westeros:~$ sudo cp -r /usr/local/qt5pi/mkspecs/ /mnt/rasp-pi-rootfs/usr/local/qt5pi/
        If the problem persists, create the missing symlink, e.g.
        
        sudo ln -s /usr/local/qt5pi/mkspecs/devices/linux-rasp-pi-g''+ /usr/local/qt5pi/mkspecs/default
        It is probably a good idea to do the same for the sysroot mkspecs.
        

        Looks like you need to do that and you'll be good to go.

        My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

        1 Reply Last reply
        0
        • R Offline
          R Offline
          Rahman
          wrote on 5 Jan 2017, 17:59 last edited by
          #4

          hi everyone,

          i could't get that crass compile tools from the link given int tutorials here.

          there is a link here in the tutorial but it requires username and password.

          i search this files in google and get the files from this link

          but there is a error "The toolchain or QMakeSpec is broken".

          anyone can help ?

          config.log


          executing config test verifyspec

          • cd /home/rahman/opt/qt5/qtbase/config.tests/common/verifyspec && /home/rahman/opt/qt5/qtbase/bin/qmake -qtconf /home/rahman/opt/qt5/qtbase/bin/qt.conf "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared console" "QMAKE_CFLAGS += --sysroot=/mnt/rasp-pi-rootfs" "QMAKE_CXXFLAGS += --sysroot=/mnt/rasp-pi-rootfs" "QMAKE_LFLAGS += --sysroot=/mnt/rasp-pi-rootfs" /home/rahman/opt/qt5/qtbase/config.tests/common/verifyspec

          /home/rahman/opt/qt5/qtbase/mkspecs/features/toolchain.prf:113: Variable QMAKE_CXX.COMPILER_MACROS is not defined.

          • cd /home/rahman/opt/qt5/qtbase/config.tests/common/verifyspec && MAKEFLAGS= /usr/bin/make clean && MAKEFLAGS= /usr/bin/make

          rm -f verifyspec.o
          rm -f *~ core *.core
          /home/rahman/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/mnt/rasp-pi-rootfs -O2 -Wall -W -fPIC -I. -I/home/rahman/opt/qt5/qtbase/mkspecs/devices/linux-rasp-pi-g++ -o verifyspec.o verifyspec.cpp
          /home/rahman/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
          Makefile:175: recipe for target 'verifyspec.o' failed
          make: *** [verifyspec.o] Error 127


          A 1 Reply Last reply 23 Mar 2017, 15:41
          0
          • R Rahman
            5 Jan 2017, 17:59

            hi everyone,

            i could't get that crass compile tools from the link given int tutorials here.

            there is a link here in the tutorial but it requires username and password.

            i search this files in google and get the files from this link

            but there is a error "The toolchain or QMakeSpec is broken".

            anyone can help ?

            config.log


            executing config test verifyspec

            • cd /home/rahman/opt/qt5/qtbase/config.tests/common/verifyspec && /home/rahman/opt/qt5/qtbase/bin/qmake -qtconf /home/rahman/opt/qt5/qtbase/bin/qt.conf "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared console" "QMAKE_CFLAGS += --sysroot=/mnt/rasp-pi-rootfs" "QMAKE_CXXFLAGS += --sysroot=/mnt/rasp-pi-rootfs" "QMAKE_LFLAGS += --sysroot=/mnt/rasp-pi-rootfs" /home/rahman/opt/qt5/qtbase/config.tests/common/verifyspec

            /home/rahman/opt/qt5/qtbase/mkspecs/features/toolchain.prf:113: Variable QMAKE_CXX.COMPILER_MACROS is not defined.

            • cd /home/rahman/opt/qt5/qtbase/config.tests/common/verifyspec && MAKEFLAGS= /usr/bin/make clean && MAKEFLAGS= /usr/bin/make

            rm -f verifyspec.o
            rm -f *~ core *.core
            /home/rahman/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -marm -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/mnt/rasp-pi-rootfs -O2 -Wall -W -fPIC -I. -I/home/rahman/opt/qt5/qtbase/mkspecs/devices/linux-rasp-pi-g++ -o verifyspec.o verifyspec.cpp
            /home/rahman/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
            Makefile:175: recipe for target 'verifyspec.o' failed
            make: *** [verifyspec.o] Error 127


            A Offline
            A Offline
            Alex_Z
            wrote on 23 Mar 2017, 15:41 last edited by
            #5

            @Rahman run this command --- sudo apt-get install libc6-i386 lib32z1 lib32stdc++6

            1 Reply Last reply
            0
            • sneubertS Offline
              sneubertS Offline
              sneubert
              wrote on 23 Mar 2017, 16:23 last edited by
              #6

              I also tried the Raspberry Pi Beginners Guide days ago, but with no success.
              A more recent Guide is here https://wiki.qt.io/RaspberryPi2EGLFS.
              It´s using the offical rpi cross toolchain and a working script to fix the symlink issue.
              Also syncing the sysroot from a running image is easier than mounting it with a loop device.

              1 Reply Last reply
              1
              • bresniaB Offline
                bresniaB Offline
                bresnia
                wrote on 8 Jun 2018, 22:11 last edited by bresnia 6 Aug 2018, 22:12
                #7

                Because I had the same Issues with the same Tutorial and often came along this discussion while searching for possible solutions, I took the privilege to dig up this old thread. With the help of What would be a pratical example of sysroot and prefix options for Qt and especially the mentioned option,

                quote:"
                -no-gcc-sysroot

                • very specific hack for compilers that can't find their own crt inside --sysroot

                • passes sysroot to pkgconfig and others, but not to gcc

                • so that gcc will be called with -L/sysroot/lib/ correctly, but doesn't try to find implicit paths (crt) here.

                ", I was able to fix the problem.

                1 Reply Last reply
                5

                • Login

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