Raspberry Pi Beginners Issue: toolchain or QMakeSpec is broken



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



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


  • Moderators

    @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.



  • 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




  • @Rahman run this command --- sudo apt-get install libc6-i386 lib32z1 lib32stdc++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.


Log in to reply
 

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