Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. error: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20'
Forum Updated to NodeBB v4.3 + New Features

error: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20'

Scheduled Pinned Locked Moved Solved Mobile and Embedded
24 Posts 4 Posters 16.1k Views 2 Watching
  • 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.
  • SGaistS SGaist

    Hi,

    Did you try with the arm-rpi-4.9.3-linux-gnueabihf that's in the same repository ?

    J Offline
    J Offline
    JiujiuTong
    wrote on last edited by JiujiuTong
    #4

    @SGaist
    @jsulm

    i first set the compiler path to gcc-linaro-arm-linux-gnueabihf-raspbian-x64, then i found the issue, i try to set it to arm-4.9.3-linux-gnueabihf in qtcreator, but i find the compiler path is still: ~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++
    even i reinstall the qtcreator and reconfigure the compiler(i find the compiler path in the file" makefile"),is there any other ways can set the compiler to arm-4.9.3-linux-gnueabihf ?
    another info:
    i try to replace the gcc-linaro-arm-linux-gnueabihf-raspbian-x64 with arm-4.9.3-linux-gnueabihf in makefile and run build project in qtcreator, there is an error :/home/tong/raspi/sysroot/usr/include/features.h:374: error: sys/cdefs.h: No such file or directory

    include <sys/cdefs.h>

                         ^
    
    1 Reply Last reply
    0
    • SGaistS SGaist

      Hi,

      Did you try with the arm-rpi-4.9.3-linux-gnueabihf that's in the same repository ?

      J Offline
      J Offline
      JiujiuTong
      wrote on last edited by JiujiuTong
      #5

      @SGaist @jsulm
      when i set compiler to arm-rpi-4.9.3-linux-gnueabihf.
      there is an waring::
      :-1: warning: "/home/tong/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++" is used by qmake, but "/home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++" is configured in the kit.
      Please update your kit or choose a mkspec for qmake that matches your target environment better.
      and the makefile qtcreator created still contains the gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #6

        You should re-cross-compile Qt with that compiler directly.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        J 1 Reply Last reply
        0
        • SGaistS SGaist

          You should re-cross-compile Qt with that compiler directly.

          J Offline
          J Offline
          JiujiuTong
          wrote on last edited by JiujiuTong
          #7

          @SGaist
          well , i tried it , here is configure error:
          /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -marm -mthumb-interwork -mfpu=neon-vfpv4 -mtune=cortex-a7 -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/home/tong/raspi/sysroot -g -Wall -W -fPIC -I. -I../../mkspecs/devices/linux-rasp-pi2-g++ -o arch.o arch.cpp
          In file included from /home/tong/raspi/sysroot/usr/include/stdio.h:27:0,
          from arch.cpp:43:
          /home/tong/raspi/sysroot/usr/include/features.h:374:25: fatal error: sys/cdefs.h: No such file or directory

          include <sys/cdefs.h>

                               ^
          

          compilation terminated.
          make: *** [arch.o] Error 1
          Makefile:199: recipe for target 'arch.o' failed
          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.
          /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -fvisibility=hidden fvisibility.c
          Symbol visibility control enabled.
          collect2: fatal error: cannot find 'ld'
          compilation terminated.
          /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ --sysroot=/home/tong/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++14...
          /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -marm -mthumb-interwork -mfpu=neon-vfpv4 -mtune=cortex-a7 -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/home/tong/raspi/sysroot -O2 -std=gnu++1y -Wall -W -fPIC -I. -I../../../mkspecs/devices/linux-rasp-pi2-g++ -o c++14.o c++14.cpp
          /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -Wl,-rpath-link,/home/tong/raspi/sysroot/opt/vc/lib -Wl,-rpath-link,/home/tong/raspi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/tong/raspi/sysroot/lib/arm-linux-gnueabihf -mfloat-abi=hard -Wl,-O1 -o c++14 c++14.o --sysroot=/home/tong/raspi/sysroot
          /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.9.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find crt1.o: No such file or directory
          /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.9.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find crti.o: No such file or directory
          /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.9.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lm
          collect2: error: ld returned 1 exit status
          make: *** [c++14] Error 1
          Makefile:92: recipe for target 'c++14' failed
          C++14 disabled.
          checking for default C++ standard edition...
          /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -pipe -march=armv7-a -marm -mthumb-interwork -mfpu=neon-vfpv4 -mtune=cortex-a7 -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/home/tong/raspi/sysroot -O2 -Wall -W -fPIC -I. -I../../../mkspecs/devices/linux-rasp-pi2-g++ -o c++default.ii -E c++default.cpp
          default C++ standard edition enabled.
          checking for 64-bit std::atomic...
          /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -marm -mthumb-interwork -mfpu=neon-vfpv4 -mtune=cortex-a7 -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/home/tong/raspi/sysroot -O2 -std=gnu++11 -Wall -W -fPIC -I. -I../../../mkspecs/devices/linux-rasp-pi2-g++ -o atomic64.o atomic64.cpp
          In file included from /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/arm-linux-gnueabihf/bits/os_defines.h:39:0,
          from /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/arm-linux-gnueabihf/bits/c++config.h:430,
          from /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/bits/atomic_base.h:35,
          from /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/atomic:41,
          from atomic64.cpp:40:
          /home/tong/raspi/sysroot/usr/include/features.h:374:25: fatal error: sys/cdefs.h: No such file or directory

          include <sys/cdefs.h>

                               ^
          

          compilation terminated.
          make: *** [atomic64.o] Error 1
          Makefile:198: recipe for target 'atomic64.o' failed
          64-bit std::atomic disabled.
          checking for 64-bit std::atomic in -latomic...
          /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -marm -mthumb-interwork -mfpu=neon-vfpv4 -mtune=cortex-a7 -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/home/tong/raspi/sysroot -O2 -std=gnu++11 -Wall -W -fPIC -I. -I../../../mkspecs/devices/linux-rasp-pi2-g++ -o atomic64.o atomic64.cpp
          In file included from /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/arm-linux-gnueabihf/bits/os_defines.h:39:0,
          from /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/arm-linux-gnueabihf/bits/c++config.h:430,
          from /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/bits/atomic_base.h:35,
          from /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/atomic:41,
          from atomic64.cpp:40:
          /home/tong/raspi/sysroot/usr/include/features.h:374:25: fatal error: sys/cdefs.h: No such file or directory

          include <sys/cdefs.h>

                               ^
          

          compilation terminated.
          make: *** [atomic64.o] Error 1
          Makefile:198: recipe for target 'atomic64.o' failed
          64-bit std::atomic in -latomic disabled.
          checking for std::atomic for function pointers...
          /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -marm -mthumb-interwork -mfpu=neon-vfpv4 -mtune=cortex-a7 -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/home/tong/raspi/sysroot -O2 -std=gnu++11 -Wall -W -fPIC -I. -I../../../mkspecs/devices/linux-rasp-pi2-g++ -o atomicfptr.o atomicfptr.cpp
          In file included from /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/arm-linux-gnueabihf/bits/os_defines.h:39:0,
          from /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/arm-linux-gnueabihf/bits/c++config.h:430,
          from /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/bits/atomic_base.h:35,
          from /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/atomic:41,
          from atomicfptr.cpp:34:
          /home/tong/raspi/sysroot/usr/include/features.h:374:25: fatal error: sys/cdefs.h: No such file or directory

          include <sys/cdefs.h>

                               ^
          

          compilation terminated.
          make: *** [atomicfptr.o] Error 1
          Makefile:198: recipe for target 'atomicfptr.o' failed
          std::atomic for function pointers disabled.
          ERROR: detected a std::atomic implementation that fails for function pointers.
          Please apply the patch corresponding to your Standard Library vendor, found in
          /home/tong/raspi/qt-everywhere-opensource-src-5.7.1/qtbase/config.tests/common/atomicfptr

          here is feature.h info:
          /* This is here only because every header file already includes this one. */
          #ifndef ASSEMBLER

          ifndef _SYS_CDEFS_H

          include <sys/cdefs.h>

          endif

          my configure:
          ./configure -release -opengl es2 -skip wayland -device linux-rasp-pi2-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -v |tee config.out

          H 1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #8

            Do you have a development environment installed on your RPi3 ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            J 1 Reply Last reply
            0
            • SGaistS SGaist

              Do you have a development environment installed on your RPi3 ?

              J Offline
              J Offline
              JiujiuTong
              wrote on last edited by JiujiuTong
              #9

              @SGaist
              no ,I don't think so.
              1,my rpi3 is clean image download form raspberry, i install some packages needed for my project
              2,i sync the the files to host,
              3,install qt with configuration gcc-linaro-arm-linux-gnueabihf-raspbian-x64.
              4,sync qt files to rpi3,
              5,i find one package is missed, i install the package on rpi3
              6, sync the file to myhost again
              7,i find the problem describe here , i follow your suggestion, in order to reinstall qt i run make unisntall and make clean
              8,configure the qt with arm-rpi-4.9.3-linux-gnueabihf.
              9,error happens
              do you think i should clean my rpi3 and reinstall it?

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #10

                Take a look at this bug report of the tools repository.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                J 2 Replies Last reply
                1
                • SGaistS SGaist

                  Take a look at this bug report of the tools repository.

                  J Offline
                  J Offline
                  JiujiuTong
                  wrote on last edited by
                  #11

                  @SGaist
                  thank you,i will try

                  1 Reply Last reply
                  1
                  • SGaistS SGaist

                    Take a look at this bug report of the tools repository.

                    J Offline
                    J Offline
                    JiujiuTong
                    wrote on last edited by
                    #12

                    @SGaist @jsulm
                    i successfully run my pro , Thank you very much!

                    1 Reply Last reply
                    1
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #13

                      You're welcome !

                      Since you have it working now please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      J 1 Reply Last reply
                      1
                      • J JiujiuTong

                        @SGaist
                        well , i tried it , here is configure error:
                        /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -marm -mthumb-interwork -mfpu=neon-vfpv4 -mtune=cortex-a7 -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/home/tong/raspi/sysroot -g -Wall -W -fPIC -I. -I../../mkspecs/devices/linux-rasp-pi2-g++ -o arch.o arch.cpp
                        In file included from /home/tong/raspi/sysroot/usr/include/stdio.h:27:0,
                        from arch.cpp:43:
                        /home/tong/raspi/sysroot/usr/include/features.h:374:25: fatal error: sys/cdefs.h: No such file or directory

                        include <sys/cdefs.h>

                                             ^
                        

                        compilation terminated.
                        make: *** [arch.o] Error 1
                        Makefile:199: recipe for target 'arch.o' failed
                        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.
                        /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -fvisibility=hidden fvisibility.c
                        Symbol visibility control enabled.
                        collect2: fatal error: cannot find 'ld'
                        compilation terminated.
                        /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ --sysroot=/home/tong/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++14...
                        /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -marm -mthumb-interwork -mfpu=neon-vfpv4 -mtune=cortex-a7 -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/home/tong/raspi/sysroot -O2 -std=gnu++1y -Wall -W -fPIC -I. -I../../../mkspecs/devices/linux-rasp-pi2-g++ -o c++14.o c++14.cpp
                        /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -Wl,-rpath-link,/home/tong/raspi/sysroot/opt/vc/lib -Wl,-rpath-link,/home/tong/raspi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/tong/raspi/sysroot/lib/arm-linux-gnueabihf -mfloat-abi=hard -Wl,-O1 -o c++14 c++14.o --sysroot=/home/tong/raspi/sysroot
                        /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.9.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find crt1.o: No such file or directory
                        /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.9.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find crti.o: No such file or directory
                        /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/4.9.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lm
                        collect2: error: ld returned 1 exit status
                        make: *** [c++14] Error 1
                        Makefile:92: recipe for target 'c++14' failed
                        C++14 disabled.
                        checking for default C++ standard edition...
                        /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -pipe -march=armv7-a -marm -mthumb-interwork -mfpu=neon-vfpv4 -mtune=cortex-a7 -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/home/tong/raspi/sysroot -O2 -Wall -W -fPIC -I. -I../../../mkspecs/devices/linux-rasp-pi2-g++ -o c++default.ii -E c++default.cpp
                        default C++ standard edition enabled.
                        checking for 64-bit std::atomic...
                        /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -marm -mthumb-interwork -mfpu=neon-vfpv4 -mtune=cortex-a7 -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/home/tong/raspi/sysroot -O2 -std=gnu++11 -Wall -W -fPIC -I. -I../../../mkspecs/devices/linux-rasp-pi2-g++ -o atomic64.o atomic64.cpp
                        In file included from /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/arm-linux-gnueabihf/bits/os_defines.h:39:0,
                        from /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/arm-linux-gnueabihf/bits/c++config.h:430,
                        from /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/bits/atomic_base.h:35,
                        from /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/atomic:41,
                        from atomic64.cpp:40:
                        /home/tong/raspi/sysroot/usr/include/features.h:374:25: fatal error: sys/cdefs.h: No such file or directory

                        include <sys/cdefs.h>

                                             ^
                        

                        compilation terminated.
                        make: *** [atomic64.o] Error 1
                        Makefile:198: recipe for target 'atomic64.o' failed
                        64-bit std::atomic disabled.
                        checking for 64-bit std::atomic in -latomic...
                        /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -marm -mthumb-interwork -mfpu=neon-vfpv4 -mtune=cortex-a7 -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/home/tong/raspi/sysroot -O2 -std=gnu++11 -Wall -W -fPIC -I. -I../../../mkspecs/devices/linux-rasp-pi2-g++ -o atomic64.o atomic64.cpp
                        In file included from /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/arm-linux-gnueabihf/bits/os_defines.h:39:0,
                        from /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/arm-linux-gnueabihf/bits/c++config.h:430,
                        from /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/bits/atomic_base.h:35,
                        from /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/atomic:41,
                        from atomic64.cpp:40:
                        /home/tong/raspi/sysroot/usr/include/features.h:374:25: fatal error: sys/cdefs.h: No such file or directory

                        include <sys/cdefs.h>

                                             ^
                        

                        compilation terminated.
                        make: *** [atomic64.o] Error 1
                        Makefile:198: recipe for target 'atomic64.o' failed
                        64-bit std::atomic in -latomic disabled.
                        checking for std::atomic for function pointers...
                        /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -marm -mthumb-interwork -mfpu=neon-vfpv4 -mtune=cortex-a7 -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/home/tong/raspi/sysroot -O2 -std=gnu++11 -Wall -W -fPIC -I. -I../../../mkspecs/devices/linux-rasp-pi2-g++ -o atomicfptr.o atomicfptr.cpp
                        In file included from /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/arm-linux-gnueabihf/bits/os_defines.h:39:0,
                        from /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/arm-linux-gnueabihf/bits/c++config.h:430,
                        from /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/bits/atomic_base.h:35,
                        from /home/tong/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/include/c++/4.9.3/atomic:41,
                        from atomicfptr.cpp:34:
                        /home/tong/raspi/sysroot/usr/include/features.h:374:25: fatal error: sys/cdefs.h: No such file or directory

                        include <sys/cdefs.h>

                                             ^
                        

                        compilation terminated.
                        make: *** [atomicfptr.o] Error 1
                        Makefile:198: recipe for target 'atomicfptr.o' failed
                        std::atomic for function pointers disabled.
                        ERROR: detected a std::atomic implementation that fails for function pointers.
                        Please apply the patch corresponding to your Standard Library vendor, found in
                        /home/tong/raspi/qt-everywhere-opensource-src-5.7.1/qtbase/config.tests/common/atomicfptr

                        here is feature.h info:
                        /* This is here only because every header file already includes this one. */
                        #ifndef ASSEMBLER

                        ifndef _SYS_CDEFS_H

                        include <sys/cdefs.h>

                        endif

                        my configure:
                        ./configure -release -opengl es2 -skip wayland -device linux-rasp-pi2-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -v |tee config.out

                        H Offline
                        H Offline
                        huck
                        wrote on last edited by
                        #14

                        @JiujiuTong said in error: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20':

                        ERROR: detected a std::atomic implementation that fails for function pointers.

                        hello, I got the same problem as you did

                        ERROR: detected a std::atomic implementation that fails for function pointers.

                        How did your solve it, please?

                        J 1 Reply Last reply
                        0
                        • H huck

                          @JiujiuTong said in error: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20':

                          ERROR: detected a std::atomic implementation that fails for function pointers.

                          hello, I got the same problem as you did

                          ERROR: detected a std::atomic implementation that fails for function pointers.

                          How did your solve it, please?

                          J Offline
                          J Offline
                          JiujiuTong
                          wrote on last edited by JiujiuTong
                          #15

                          @huck
                          recompile QT with arm-rpi-4.9.3-linux-gnueabihf tool

                          H 1 Reply Last reply
                          0
                          • J JiujiuTong

                            @huck
                            recompile QT with arm-rpi-4.9.3-linux-gnueabihf tool

                            H Offline
                            H Offline
                            huck
                            wrote on last edited by
                            #16

                            @JiujiuTong said in error: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20':

                            ith arm-rpi-4.9.3-linux-gnueabihf tool

                            i am not compile qt yet, just in ./configure stage. by the way is arm-rpi-4.9.3-linux-gnueabihf a must?

                            J 1 Reply Last reply
                            0
                            • H huck

                              @JiujiuTong said in error: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20':

                              ith arm-rpi-4.9.3-linux-gnueabihf tool

                              i am not compile qt yet, just in ./configure stage. by the way is arm-rpi-4.9.3-linux-gnueabihf a must?

                              J Offline
                              J Offline
                              JiujiuTong
                              wrote on last edited by JiujiuTong
                              #17

                              @huck
                              do you mean that the error happens when you run ./configure ? can you past the error information ?

                              H 1 Reply Last reply
                              0
                              • J JiujiuTong

                                @huck
                                do you mean that the error happens when you run ./configure ? can you past the error information ?

                                H Offline
                                H Offline
                                huck
                                wrote on last edited by
                                #18

                                @JiujiuTong yes , in configure run. and I am using imx6, instead of raspberry

                                Proprietary Codecs ..................... no
                                Spellchecker ........................... yes
                                ALSA ................................... no
                                PulseAudio ............................. no

                                Note: QtSerialBus: Cannot find linux/can.h and linux/can/raw.h Linux headers for socketCAN support.

                                Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.

                                WARNING: No QPA platform plugin enabled! This will
                                produce a Qt that cannot run GUI applications.
                                The dependencies needed for xcb to build are listed in
                                src/plugins/platforms/xcb/README

                                ERROR: detected a std::atomic implementation that fails for function pointers.
                                Please apply the patch corresponding to your Standard Library vendor, found in
                                qtbase/config.tests/common/atomicfptr

                                J 1 Reply Last reply
                                0
                                • H huck

                                  @JiujiuTong yes , in configure run. and I am using imx6, instead of raspberry

                                  Proprietary Codecs ..................... no
                                  Spellchecker ........................... yes
                                  ALSA ................................... no
                                  PulseAudio ............................. no

                                  Note: QtSerialBus: Cannot find linux/can.h and linux/can/raw.h Linux headers for socketCAN support.

                                  Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.

                                  WARNING: No QPA platform plugin enabled! This will
                                  produce a Qt that cannot run GUI applications.
                                  The dependencies needed for xcb to build are listed in
                                  src/plugins/platforms/xcb/README

                                  ERROR: detected a std::atomic implementation that fails for function pointers.
                                  Please apply the patch corresponding to your Standard Library vendor, found in
                                  qtbase/config.tests/common/atomicfptr

                                  J Offline
                                  J Offline
                                  JiujiuTong
                                  wrote on last edited by
                                  #19

                                  @huck
                                  sorry, it's not the same phenomenon...
                                  @SGaist @jsulm
                                  we need your helps :)

                                  H 1 Reply Last reply
                                  0
                                  • J JiujiuTong

                                    @huck
                                    sorry, it's not the same phenomenon...
                                    @SGaist @jsulm
                                    we need your helps :)

                                    H Offline
                                    H Offline
                                    huck
                                    wrote on last edited by
                                    #20

                                    @JiujiuTong VC 10 VC 11 GCC 4.6 GCC 4.7 替代方案
                                    Reworded sequence points No No No No
                                    Atomics No Yes No Yes Boost.Atomic

                                    I think my gcc does not supoort “std::atomic”

                                    thank you all the same

                                    jsulmJ 1 Reply Last reply
                                    0
                                    • H huck

                                      @JiujiuTong VC 10 VC 11 GCC 4.6 GCC 4.7 替代方案
                                      Reworded sequence points No No No No
                                      Atomics No Yes No Yes Boost.Atomic

                                      I think my gcc does not supoort “std::atomic”

                                      thank you all the same

                                      jsulmJ Offline
                                      jsulmJ Offline
                                      jsulm
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #21

                                      @huck You should execute configure with -v and post the actual compiler error.
                                      What is you GCC version?

                                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      H 1 Reply Last reply
                                      0
                                      • jsulmJ jsulm

                                        @huck You should execute configure with -v and post the actual compiler error.
                                        What is you GCC version?

                                        H Offline
                                        H Offline
                                        huck
                                        wrote on last edited by
                                        #22

                                        @jsulm said in error: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20':

                                        uld execute configure with -v and post the actu

                                        I did add -v in ./configure . I didn't make it yet, so this is the whole info
                                        my gcc 4.6.2

                                        1 Reply Last reply
                                        0
                                        • SGaistS SGaist

                                          You're welcome !

                                          Since you have it working now please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)

                                          J Offline
                                          J Offline
                                          JiujiuTong
                                          wrote on last edited by JiujiuTong
                                          #23

                                          @SGaist
                                          another question:
                                          do you think the tools list below can be used for raspberry pi3?
                                          https://releases.linaro.org/components/toolchain/binaries/5.4-2017.01/arm-linux-gnueabihf/
                                          for example gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf.tar.xz seems like a new tool.

                                          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