Qt World Summit: Submit your Presentation

Building Qt from source, qtwebengine missing

  • I build from source with theses step on Windows sucessfully:
    But qtwebengine.dll is not built for some reason, am I missing something?

    git clone https://code.qt.io/qt/qt5.git                   
    cd qt5
    git checkout v5.11.0-alpha1
    perl ./init-repository --module-subset=default,qtwebengine 
    configure -opensource -confirm-license -release -webengine-pepper-plugins -webengine-proprietary-codecs OPENSSL_LIBS="-lssleay32 -llibeay32" -openssl-linked -I C:\Dropbox\OpenSSL-win32\include -L C:\Dropbox\OpenSSL-win32\lib -prefix D:\qt5.11.0_alpha\
    nmake install

  • Lifetime Qt Champion


    What compiler are you using ?

  • Lifetime Qt Champion

    You need to have a recent Win10SDK - otherwise it will not get compiled.

  • I'm using MSVC2015
    VS2015 x86 Native Tools Command Prompt

    I'll try to download latest Win10DSK and retry, but I remember building Q5.10.0 with Qtwebengine without issues

  • @maximus

    I just rebuild with Windows 10SDK installed and got same issue.
    Is there a list of the possible value of --module-subset flag? Just to make sure I am using the right one.

    I would except the build to fail if it can not build qtwebengine?

    Just tried again and I just have in my build bin directory

    edit: just saw the init file, ill try with "all" flag, result`:

    Project ERROR: D:/qt5/qtenginio/examples/enginio/widgets/image-gallery-cpp/image-gallery-cpp.pro is lacking an install target.

  • Lifetime Qt Champion

    No need to build enginio. It's been obsoleted since a long time.

    You can however try to build the module directly. Make a build folder and call qmake /path/to/qtwebengine from there.

  • @SGaist

    anyway I can remove enginio from the build? why is it still in the all module if obsolete?
    I would like to call make only once from the top qt source, and everything be built.
    I did not have that problem building on macOS

  • Lifetime Qt Champion

    Yes you can. It might be the module subset that still includes it.

    It was just to determine whether you have something missing in order to build qtwebengine. Do you have all the needed tools installed on your Windows machine ?

  • @SGaist

    Yes I have all I need, I previously built it sucessfully.
    Would this command works?

    perl ./init-repository --module-subset=all,-enginio
    I just need standard qt module and qtwebengine modules

  • Lifetime Qt Champion

    Then I would still recommend to try to build the module independently to at least know if there's something that might have gone wrong during the configure step.

  • I am a newbie when I need to diverge from the steps.

    How can I build qtwebengine separatly? I have already done nmake and nmake install,

    I am in the qt5 source folder of qtwebengine


  • Lifetime Qt Champion

    mkdir D:\build_qtwebengine
    cd D:\build_qtwebengine
    \path\to\qmake.exe D:\qt5\qtwebengine
    jom.exe install

  • @SGaist

    Looking good but the step remove that flag "Proprietary Codecs " that I had set up previously when configuring at the qt5 root folder. Anyway to redo that step?
    Why is running nmake on qt5 source root not building qtwebengine? I am a bit confuse.

    D:\build_qtwebengine>D:\qt5.11.0_alpha\bin\qmake.exe D:\qt5\qtwebengine

    Running configuration tests...
    Done running configuration tests.

    Configure summary:

    Qt WebEngine:
    Embedded build ......................... no
    Pepper Plugins ......................... yes
    Printing and PDF ....................... yes
    Proprietary Codecs ..................... no
    Spellchecker ........................... yes
    Native Spellchecker .................... no
    WebRTC ................................. yes
    Use System Ninja ....................... no
    Geolocation ............................ yes
    Use v8 snapshot ........................ yes

    Qt is now configured for building. Just run 'nmake'.
    Once everything is built, Qt is installed.
    You should NOT run 'nmake install'.
    Note that this build cannot be deployed to other machines or devices.

    Trying to understand init repository help:
    would this be possible?
    perl ./init-repository --module-subset=all,-qtenginio
    Will try..

        Only initialize the specified subset of modules given as the
        argument. Specified modules must already exist in .gitmodules. The
        string "all" results in cloning all known modules. The strings
        "essential", "addon", "preview", "deprecated", "obsolete", and
        "ignore" refer to classes of modules; "default" maps to
        "essential,addon,preview,deprecated", which corresponds with the
        set of maintained modules and is also the default set. Module
        names may be prefixed with a dash to exclude them from a bigger
        set, e.g. "all,-ignore".*

  • Here is my latest try with
    perl ./init-repository --module-subset=all,-qtenginio

    graphicsitems\qdeclarativetextinput.cpp(517): error C2039: 'setCursorBlinkPeriod': is not a member of 'QWidgetLineControl'
    d:\qt5\qtbase\include\qtwidgets\5.11.0\qtwidgets\private\../../../../../src/widgets/widgets/qwidgetlinecontrol_p.h(82): note: see declaration of 'QWidgetLineControl'

    now trying with:
    perl ./init-repository --module-subset=all,-qtenginio,-qtquick1,-qtquickcontrols2

  • Lifetime Qt Champion

    Strange, did you try with the sources of the latest beta release rather than a clone ?

  • @SGaist

    I use the latest tag available, v5.11.0-alpha1
    Needed the latest chromium available.

    git clone https://code.qt.io/qt/qt5.git
    cd qt5
    git checkout v5.11.0-alpha1

    Just wish there was a flag -subset=default with qtwebengine

  • Lifetime Qt Champion

    Since it seems to cause you trouble, don't use subset and just delete the modules you don't use or use the -skip option of configure.

  • @SGaist

    Thanks SGaist, our champion,
    Finally, I just removed qtenginio from the makefile and rebuilt.

    Maybe removing qtenginio from the build would be good, since it fail to build by default on windows.

    for the other, step used to build from scratch :
    git clone https://code.qt.io/qt/qt5.git
    cd qt5
    git checkout v5.11.0-beta4
    perl ./init-repository --module-subset=all
    configure -opensource -confirm-license -release -webengine-pepper-plugins -webengine-proprietary-codecs ....etc
    --remove module not wanted; all occurence of -qtenginio inside file Makefile
    nmake install

  • Lifetime Qt Champion

    Great !

    Thanks for the feedback :)

  • found out why QtWebengine was not being built, it require MSVC2017 to be built, yet the configure and make command do not give any feedback if you use MSVC2015, then the binary are just not there.

  • Lifetime Qt Champion

    Thanks for sharing !

    I just checked the documentation snapshot and indeed the specs have been bumped to VS2017 only.

Log in to reply