Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt 5.13.1 for raspberry pi CM3: "#include<random>" build error
QtWS25 Last Chance

Qt 5.13.1 for raspberry pi CM3: "#include<random>" build error

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
4 Posts 2 Posters 970 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.
  • D Offline
    D Offline
    dxvx
    wrote on last edited by dxvx
    #1

    Hello everyone!
    I'm trying to cross-compile qt 5.13.1 for raspberry pi3 (CM3) but I these problems:

    qt-everywhere-5.13.1/qtbase> ./configure -release -opensource -confirm-license -no-use-gold-linker -c++std c++17 -opengl es2 -make libs -no-gbm \
    -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=~/raspi-qt/gcc-linaro-7.4.1-x86_64_armv8l-linux-gnueabihf/bin/armv8l-linux-gnueabihf- \
    -sysroot ~/raspi-qt/raspbian-sysroot -prefix /opt/qt5 -extprefix ~/raspi-qt/qt5-pi -hostprefix ~/raspi-qt/qt5-tools \
    -skip qt3d -skip qtandroidextras -skip qtdatavis3d -skip qtmacextras -skip qtpurcheasing -skip qtwebchannel -skip qtwebengine -skip qtwebplugin -skip qtwebview -skip qtscript -skip qtwinextras -skip qtx11extras -nomake examples -nomake tests -no-compile-examples
    ...bla bla bla...
    ERROR: Feature 'c++14' was enabled, but the pre-condition 'features.c++11 && tests.c++14' failed.
    ERROR: Feature 'c++1z' was enabled, but the pre-condition 'features.c++14 && tests.c++1z' failed.
    ERROR: C++11 <random> is required and is missing or failed to compile.
    Check config.log for details.
    

    or without -c++std c++17

    qt-everywhere-5.13.1/qtbase> ./configure -release -opensource -confirm-license -no-use-gold-linker -opengl es2 -make libs -no-gbm \
    -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=~/raspi-qt/gcc-linaro-7.4.1-x86_64_armv8l-linux-gnueabihf/bin/armv8l-linux-gnueabihf- \
    -sysroot ~/raspi-qt/raspbian-sysroot -prefix /opt/qt5 -extprefix ~/raspi-qt/qt5-pi -hostprefix ~/raspi-qt/qt5-tools \
    -skip qt3d -skip qtandroidextras -skip qtdatavis3d -skip qtmacextras -skip qtpurcheasing -skip qtwebchannel -skip qtwebengine -skip qtwebplugin -skip qtwebview -skip qtscript -skip qtwinextras -skip qtx11extras -nomake examples -nomake tests -no-compile-examples
    ...bla bla bla...
    ERROR: C++11 <random> is required and is missing or failed to compile.
    

    I have followed this tutorial but using the linaro toolchain 7.4.1 for armv8l. The original raspbian toolchain gives me the same errors.

    What ca I do?
    Many thanks!

    jsulmJ 1 Reply Last reply
    0
    • D dxvx

      Hello everyone!
      I'm trying to cross-compile qt 5.13.1 for raspberry pi3 (CM3) but I these problems:

      qt-everywhere-5.13.1/qtbase> ./configure -release -opensource -confirm-license -no-use-gold-linker -c++std c++17 -opengl es2 -make libs -no-gbm \
      -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=~/raspi-qt/gcc-linaro-7.4.1-x86_64_armv8l-linux-gnueabihf/bin/armv8l-linux-gnueabihf- \
      -sysroot ~/raspi-qt/raspbian-sysroot -prefix /opt/qt5 -extprefix ~/raspi-qt/qt5-pi -hostprefix ~/raspi-qt/qt5-tools \
      -skip qt3d -skip qtandroidextras -skip qtdatavis3d -skip qtmacextras -skip qtpurcheasing -skip qtwebchannel -skip qtwebengine -skip qtwebplugin -skip qtwebview -skip qtscript -skip qtwinextras -skip qtx11extras -nomake examples -nomake tests -no-compile-examples
      ...bla bla bla...
      ERROR: Feature 'c++14' was enabled, but the pre-condition 'features.c++11 && tests.c++14' failed.
      ERROR: Feature 'c++1z' was enabled, but the pre-condition 'features.c++14 && tests.c++1z' failed.
      ERROR: C++11 <random> is required and is missing or failed to compile.
      Check config.log for details.
      

      or without -c++std c++17

      qt-everywhere-5.13.1/qtbase> ./configure -release -opensource -confirm-license -no-use-gold-linker -opengl es2 -make libs -no-gbm \
      -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=~/raspi-qt/gcc-linaro-7.4.1-x86_64_armv8l-linux-gnueabihf/bin/armv8l-linux-gnueabihf- \
      -sysroot ~/raspi-qt/raspbian-sysroot -prefix /opt/qt5 -extprefix ~/raspi-qt/qt5-pi -hostprefix ~/raspi-qt/qt5-tools \
      -skip qt3d -skip qtandroidextras -skip qtdatavis3d -skip qtmacextras -skip qtpurcheasing -skip qtwebchannel -skip qtwebengine -skip qtwebplugin -skip qtwebview -skip qtscript -skip qtwinextras -skip qtx11extras -nomake examples -nomake tests -no-compile-examples
      ...bla bla bla...
      ERROR: C++11 <random> is required and is missing or failed to compile.
      

      I have followed this tutorial but using the linaro toolchain 7.4.1 for armv8l. The original raspbian toolchain gives me the same errors.

      What ca I do?
      Many thanks!

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

      @dxvx Since 5.6 Qt requires C++11, you should activate that.

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

      1 Reply Last reply
      1
      • D Offline
        D Offline
        dxvx
        wrote on last edited by
        #3

        @jsulm how can activate c++11?
        When I perform the second compilation (without -c++std) the configure process gives:

        Building on: linux-g++ (x86_64, CPU features: mmx sse sse2)
        Building for: devices/linux-rasp-pi3-g++ (arm, CPU features: neon)
        Target compiler: gcc 9.2.1
        Configuration: cross_compile enable_new_dtags largefile neon precompile_header shared rpath release c++11 concurrent dbus reduce_exports stl
        Build options:
          Mode ................................... release
          Optimize release build for size ........ no
          Building shared libraries .............. yes
          Using C standard ....................... C11
          Using C++ standard ..................... C++11
          Using ccache ........................... no
          Using new DTAGS ........................ yes
          Using precompiled headers .............. yes
          Using LTCG ............................. no
          Target compiler supports:
            NEON ................................. yes
          Build parts ............................ libs
        

        so I think that c++11 is activated... Is it true?

        jsulmJ 1 Reply Last reply
        0
        • D dxvx

          @jsulm how can activate c++11?
          When I perform the second compilation (without -c++std) the configure process gives:

          Building on: linux-g++ (x86_64, CPU features: mmx sse sse2)
          Building for: devices/linux-rasp-pi3-g++ (arm, CPU features: neon)
          Target compiler: gcc 9.2.1
          Configuration: cross_compile enable_new_dtags largefile neon precompile_header shared rpath release c++11 concurrent dbus reduce_exports stl
          Build options:
            Mode ................................... release
            Optimize release build for size ........ no
            Building shared libraries .............. yes
            Using C standard ....................... C11
            Using C++ standard ..................... C++11
            Using ccache ........................... no
            Using new DTAGS ........................ yes
            Using precompiled headers .............. yes
            Using LTCG ............................. no
            Target compiler supports:
              NEON ................................. yes
            Build parts ............................ libs
          

          so I think that c++11 is activated... Is it true?

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

          @dxvx said in Qt 5.13.1 for raspberry pi CM3: "#include<random>" build error:

          so I think that c++11 is activated... Is it true?

          Looks like it is, yes

          "how can activate c++11?" -c++std c++11

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

          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