Building QtWebEngine from source fails due to using the wrong compiler
-
Trying to build Qt 5.15.8 from source. Running on RHEL 7 .7. Running configure and the make inside
scl enable devtoolset-11 llvm-toolset-12.0 rh-nodejs8 'bash'My configure/make command:
# ./configure -prefix /opt/Qt5.15.8/5.15.8 -v -xcb -xcb-xlib -bundled-xcb-xinput -release -fontconfig -feature-freetype -opensource -confirm-license -nomake examples -nomake tests # gmake -jBuild eventually fails (see below)... and it is clearly because the webengine build is using /bin/g++ (GCC 4.8.5) instead of g++ from devtoolset-11 (GCC 11.2.1) - GCC 4.8.5 doesn't support the -std=gnu++14 command line option. Clearly other parts of the build are using the devtoolset-11 g++, what's the trick to get webengine to do so? Don't want to overwrite /bin/g++ to fix the problem. The ultimate problem seems to be that the file toolchain.ninja in qtwebengine/src/core/release is where it is specifying the use of /bin/g++, but it's not obvious to me how to override this.
[1/20083] /bin/g++ -MMD -MF obj/base/base_static/base_switches.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Igen -I../../3rdparty/chromium -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -m64 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-packed-not-aligned -Wno-dangling-else -Wno-missing-field-initializers -Wno-unused-parameter -fno-omit-frame-pointer -g0 -fvisibility=hidden -O2 -fno-ident -fdata-sections -ffunction-sections -std=gnu++14 -Wno-narrowing -Wno-class-memaccess -Wno-attributes -Wno-class-memaccess -Wno-subobject-linkage -Wno-invalid-offsetof -Wno-return-type -Wno-deprecated-copy -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -c ../../3rdparty/chromium/base/base_switches.cc -o obj/base/base_static/base_switches.o FAILED: obj/base/base_static/base_switches.o /bin/g++ -MMD -MF obj/base/base_static/base_switches.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Igen -I../../3rdparty/chromium -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -m64 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-packed-not-aligned -Wno-dangling-else -Wno-missing-field-initializers -Wno-unused-parameter -fno-omit-frame-pointer -g0 -fvisibility=hidden -O2 -fno-ident -fdata-sections -ffunction-sections -std=gnu++14 -Wno-narrowing -Wno-class-memaccess -Wno-attributes -Wno-class-memaccess -Wno-subobject-linkage -Wno-invalid-offsetof -Wno-return-type -Wno-deprecated-copy -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -c ../../3rdparty/chromium/base/base_switches.cc -o obj/base/base_static/base_switches.o g++: error: unrecognized command line option ‘-std=gnu++14’ -
Trying to build Qt 5.15.8 from source. Running on RHEL 7 .7. Running configure and the make inside
scl enable devtoolset-11 llvm-toolset-12.0 rh-nodejs8 'bash'My configure/make command:
# ./configure -prefix /opt/Qt5.15.8/5.15.8 -v -xcb -xcb-xlib -bundled-xcb-xinput -release -fontconfig -feature-freetype -opensource -confirm-license -nomake examples -nomake tests # gmake -jBuild eventually fails (see below)... and it is clearly because the webengine build is using /bin/g++ (GCC 4.8.5) instead of g++ from devtoolset-11 (GCC 11.2.1) - GCC 4.8.5 doesn't support the -std=gnu++14 command line option. Clearly other parts of the build are using the devtoolset-11 g++, what's the trick to get webengine to do so? Don't want to overwrite /bin/g++ to fix the problem. The ultimate problem seems to be that the file toolchain.ninja in qtwebengine/src/core/release is where it is specifying the use of /bin/g++, but it's not obvious to me how to override this.
[1/20083] /bin/g++ -MMD -MF obj/base/base_static/base_switches.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Igen -I../../3rdparty/chromium -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -m64 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-packed-not-aligned -Wno-dangling-else -Wno-missing-field-initializers -Wno-unused-parameter -fno-omit-frame-pointer -g0 -fvisibility=hidden -O2 -fno-ident -fdata-sections -ffunction-sections -std=gnu++14 -Wno-narrowing -Wno-class-memaccess -Wno-attributes -Wno-class-memaccess -Wno-subobject-linkage -Wno-invalid-offsetof -Wno-return-type -Wno-deprecated-copy -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -c ../../3rdparty/chromium/base/base_switches.cc -o obj/base/base_static/base_switches.o FAILED: obj/base/base_static/base_switches.o /bin/g++ -MMD -MF obj/base/base_static/base_switches.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Igen -I../../3rdparty/chromium -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -m64 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-packed-not-aligned -Wno-dangling-else -Wno-missing-field-initializers -Wno-unused-parameter -fno-omit-frame-pointer -g0 -fvisibility=hidden -O2 -fno-ident -fdata-sections -ffunction-sections -std=gnu++14 -Wno-narrowing -Wno-class-memaccess -Wno-attributes -Wno-class-memaccess -Wno-subobject-linkage -Wno-invalid-offsetof -Wno-return-type -Wno-deprecated-copy -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -c ../../3rdparty/chromium/base/base_switches.cc -o obj/base/base_static/base_switches.o g++: error: unrecognized command line option ‘-std=gnu++14’@itsapm said in Building QtWebEngine from source fails due to using the wrong compiler:
what's the trick to get webengine to do so?
make sure the symlink of /bin/g++ links to the correct compiler.
-
@itsapm said in Building QtWebEngine from source fails due to using the wrong compiler:
what's the trick to get webengine to do so?
make sure the symlink of /bin/g++ links to the correct compiler.
@Christian-Ehrlicher
That works, but it wasn't the fix I was hoping for. But marking it "solved" anyways. -
I itsapm has marked this topic as solved on