Qt 5.9.1 cross compilation error
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: *** [run_ninja] Error 1 make: 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: *** [sub-gn_run-pro-make_first] Error 2 make: 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: *** [sub-core-make_first] Error 2 make: 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: *** [sub-src-make_first] Error 2 make: 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
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.
@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
roundis defined from c++11 standard.
Can i avoid this error if i skip
I am building Qt for linux and i have cross compiled mesa libraries.
Just realised you are using uClibc, I don't know how much of the standard it implements.
@SGaist You mean uClibc doesn't implement all the c++11 standard ?
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.
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.