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. Building QtWebEngine from source fails due to using the wrong compiler

Building QtWebEngine from source fails due to using the wrong compiler

Scheduled Pinned Locked Moved Solved Installation and Deployment
3 Posts 2 Posters 841 Views 1 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.
  • I Offline
    I Offline
    itsapm
    wrote on last edited by
    #1

    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 -j
    

    Build 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’
    
    Christian EhrlicherC 1 Reply Last reply
    0
    • I itsapm

      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 -j
      

      Build 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’
      
      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @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.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      I 1 Reply Last reply
      1
      • Christian EhrlicherC Christian Ehrlicher

        @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.

        I Offline
        I Offline
        itsapm
        wrote on last edited by
        #3

        @Christian-Ehrlicher
        That works, but it wasn't the fix I was hoping for. But marking it "solved" anyways.

        1 Reply Last reply
        0
        • I itsapm has marked this topic as solved on

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved