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.9.1 cross compilation error
Qt 6.11 is out! See what's new in the release blog

Qt 5.9.1 cross compilation error

Scheduled Pinned Locked Moved Solved Installation and Deployment
6 Posts 2 Posters 4.2k 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.
  • KartK Offline
    KartK Offline
    Kart
    wrote on last edited by Kart
    #1

    I am trying to cross compile Qt 5.9.1 with qtwebengine. But during the ninja build, this error is showing up and compilation is terminated. By default the build is using -std=gnu++11. I tried to force the build to use -std=c++11. But it is not working.
    To be honest, i am yet to understand the difference between -std=c++11 and -std=gnu++11. Can anyone point out what i am doing wrong here ?
    Thank you for looking into it.

    ../../3rdparty/chromium/third_party/angle/src/compiler/translator/ExpandIntegerPowExpressions.cpp:99:29: error: ‘round’ is not a member of ‘std’
         float frac   = absval - std::round(absval);
                                 ^
    ../../3rdparty/chromium/third_party/angle/src/compiler/translator/ExpandIntegerPowExpressions.cpp:99:29: note: suggested alternative:
    In file included from /opt/arm-hisiv300-linux/target/usr/include/features.h:416:0,
                     from /opt/arm300/arm300-linux-uclibcgnueabi/include/c++/4.8.3/arm300-linux-uclibcgnueabi/bits/os_defines.h:39,
                     from /opt/arm300-linux/arm300-linux-uclibcgnueabi/include/c++/4.8.3/arm300-linux-uclibcgnueabi/bits/c++config.h:426,
                     from /opt/arm300-linux/arm300-linux-uclibcgnueabi/include/c++/4.8.3/cmath:41,
                     from ../../3rdparty/chromium/third_party/angle/src/compiler/translator/ExpandIntegerPowExpressions.cpp:11:
    /opt/arm300-linux/target/usr/include/bits/mathcalls.h:326:1: note:   ‘round’
     __MATHCALLX (round,, (_Mdouble_ __x), (__const__))
     ^
    [7/15335] CXX obj/third_party/angle/translator/IntermNode.o
    ninja: build stopped: subcommand failed.
    Makefile.gn_run:796: recipe for target 'run_ninja' failed
    make[4]: *** [run_ninja] Error 1
    make[4]: Leaving directory '/opt/qt/qt5.9.1arm_source/qt-everywhere-opensource-src-5.9.1/qtwebengine/src/core'
    Makefile:80: recipe for target 'sub-gn_run-pro-make_first' failed
    make[3]: *** [sub-gn_run-pro-make_first] Error 2
    make[3]: Leaving directory '/opt/qt/qt5.9.1arm_source/qt-everywhere-opensource-src-5.9.1/qtwebengine/src/core'
    Makefile:77: recipe for target 'sub-core-make_first' failed
    make[2]: *** [sub-core-make_first] Error 2
    make[2]: Leaving directory '/opt/qt/qt5.9.1arm_source/qt-everywhere-opensource-src-5.9.1/qtwebengine/src'
    Makefile:46: recipe for target 'sub-src-make_first' failed
    make[1]: *** [sub-src-make_first] Error 2
    make[1]: Leaving directory '/opt/qt/qt5.9.1arm_source/qt-everywhere-opensource-src-5.9.1/qtwebengine'
    Makefile:834: recipe for target 'module-qtwebengine-make_first' failed
    make: *** [module-qtwebengine-make_first] Error 2
    

    This is the configuration i am following

    ./configure -c++std c++11  -opensource -confirm-license -xplatform linux-arm-g++ -skip wayland -no-xcb -nomake tests -nomake examples -c++std c++11 -v -prefix /opt/qt/qt5.9.1arm -proprietary-codecs -alsa -fontconfig -tslib -skip qt3d  -skip serialbus -skip svg -sysroot /opt/arm300-linux/target -L/opt/arm300-linux/target/lib -I/opt/arm300-linux/target/include -DMESA_EGL_NO_X11_HEADERS
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      AFAIK, gnu++11 is the C++11 standard plus GNU extensions. Note that you don't need to modify that as Qt 5 requires support for C++11 since 5.7.

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

      KartK 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        AFAIK, gnu++11 is the C++11 standard plus GNU extensions. Note that you don't need to modify that as Qt 5 requires support for C++11 since 5.7.

        KartK Offline
        KartK Offline
        Kart
        wrote on last edited by
        #3

        @SGaist Thanks for the information. I can't really figure out why this is an error. My arm toolchain is based on gcc version 4.8.3. I believe this version supports c++11.
        In some other forums, it says round is defined from c++11 standard.
        Can i avoid this error if i skip angle ?
        I am building Qt for linux and i have cross compiled mesa libraries.

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

          Just realised you are using uClibc, I don't know how much of the standard it implements.

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

          KartK 1 Reply Last reply
          1
          • SGaistS SGaist

            Just realised you are using uClibc, I don't know how much of the standard it implements.

            KartK Offline
            KartK Offline
            Kart
            wrote on last edited by Kart
            #5

            @SGaist You mean uClibc doesn't implement all the c++11 standard ?
            Edit :
            I went through this link to understand the difference.
            So basically when you are trying to compile a huge source like Qt, uClibc may not give you all the standards.

            1 Reply Last reply
            0
            • KartK Offline
              KartK Offline
              Kart
              wrote on last edited by
              #6

              As @SGaist have said uClibc doesn't support c++11 standard as a whole. I have switched to another arm compiler based on Glibc and this error doesn't show up.

              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