Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-88625

qt webengine can't compile on windows with ninja error related to treating warnings as errors

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 5.14.0, 5.14.1, 5.14.2, 5.15.1
    • WebEngine
    • None
    • windows 10
      msvc 2019 and msvc 2017
    • Windows

    Description

      I have qt 5.14.2 built from source (without qtwebengine). I want to add qtwebengine module to my own built 5.14.2

      I am building qtwebengine from source in windows using qtwebengine-everywhere-src-5.15.1 using "qmake qtwebengin.pro" with below configuration:

      • I am using win_flex_bison-latest.zip extracted and added to the system path. win_bison.exe and win_flex.exe renamed to bison.exe and flex.exe.
      • gperf-3.0.1.exe installed and added to system path.
      • Python 2.7.8 used.
      • I have msvc2019 including Windows 10 SDK version 10.0.18362 and opened x64 native tools

      The result of "qmake qtwebengin.pro" command is:

      Info: creating stash file C:\11\.qmake.stash
      Info: creating cache file C:\11\.qmake.cacheRunning configuration tests...
      Checking for architecture supported... yes
      Checking for bison... D:/Qt/QtCorrectedAli/mkspecs/features/qt_configure.prf:413: Unexpected return value from test 'ensurePathEnv': C:/gnuwin32/bin/bison.exe.
      yes
      Checking for submodule initialized... yes
      Checking for build path without whitespace... yes
      Checking for platform supported...
      Checking for gperf... D:/Qt/QtCorrectedAli/mkspecs/features/qt_configure.prf:413: Unexpected return value from test 'ensurePathEnv': C:/gnuwin32/bin/gperf.exe.
      yes
      Checking for flex... D:/Qt/QtCorrectedAli/mkspecs/features/qt_configure.prf:413: Unexpected return value from test 'ensurePathEnv': C:/gnuwin32/bin/flex.exe.
      yes
      Checking for python2... C:/Python27/python.exe
      Checking for 64bit compiler... yes
      Checking for winversion... yes
      Checking for jumbo build merge limit... 0
      Checking for d-bus... no
      Checking for fontconfig... no
      Checking for libdrm... no
      Checking for system ninja... \Microsoft was unexpected at this time.
      no
      Checking for xcomposite... no
      Checking for xcursor... no
      Checking for xi... no
      Checking for xtst... no
      Checking for embedded build... no
      Checking for node.js... yes
      Done running configuration tests.Configure summary:Qt WebEngine Build Tools:
        Use System Ninja ....................... no
        Use System Gn .......................... no
        Jumbo Build Merge Limit ................ no
        Developer build ........................ no
        Sanitizer .............................. no
      Qt WebEngineCore:
        Embedded build ......................... no
        Full debug information ................. no
        Pepper Plugins ......................... yes
        Printing and PDF ....................... yes
        Proprietary Codecs ..................... no
        Spellchecker ........................... yes
        Native Spellchecker .................... no
        WebRTC ................................. yes
        PipeWire over GIO ...................... no
        Geolocation ............................ yes
        WebChannel support ..................... yes
        Kerberos Authentication ................ yes
        Extensions ............................. yes
        Node.js ................................ yes
      Qt WebEngineQml:
        Support Qt WebEngine Qml ............... yes
        UI Delegates ........................... yes
        Test Support ........................... no
      Qt WebEngineWidgets:
        Support Qt WebEngine Widgets ........... yes
      Qt PDF:
        Support V8 ............................. no
        Support XFA ............................ no
        Support XFA-BMP ........................ no
        Support XFA-GIF ........................ no
        Support XFA-PNG ........................ no
        Support XFA-TIFF ....................... no
      Qt PDF Widgets:
        Support Qt PDF Widgets ................. yesQt is now configured for building. Just run 'nmake'.
      Once everything is built, you must run 'nmake install'.
      Qt will be installed into 'D:\Qt\QtCorrectedAli'.Prior to reconfiguration, make sure you remove any leftovers from
      the previous build.

      When I run nmake the result is: 

      C:\11>nmakeMicrosoft (R) Program Maintenance Utility Version 14.28.29333.0
      Copyright (C) Microsoft Corporation.  All rights reserved.        cd src\ && ( if not exist Makefile D:\Qt\QtCorrectedAli\bin\qmake.exe -o Makefile C:\11\src\src.pro ) && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX64\x64\nmake.exe" -f Makefile
      Microsoft (R) Program Maintenance Utility Version 14.28.29333.0
      Copyright (C) Microsoft Corporation.  All rights reserved.        cd buildtools\ && ( if not exist Makefile D:\Qt\QtCorrectedAli\bin\qmake.exe -o Makefile C:\11\src\buildtools\buildtools.pro ) && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX64\x64\nmake.exe" -f MakefileMicrosoft (R) Program Maintenance Utility Version 14.28.29333.0
      Copyright (C) Microsoft Corporation.  All rights reserved.        ( if not exist Makefile.ninja D:\Qt\QtCorrectedAli\bin\qmake.exe -o Makefile.ninja C:\11\src\buildtools\ninja.pro ) && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX64\x64\nmake.exe" -f Makefile.ninja
      bootstrapping ninja...
      warning: A compatible version of re2c (>= 0.11.3) was not found; changes to src/*.in.cc will not affect your build.
      build.cc
      build_log.cc
      clean.cc
      clparser.cc
      debug_flags.cc
      depfile_parser.cc
      deps_log.cc
      disk_interface.cc
      edit_distance.cc
      eval_env.cc
      graph.cc
      graphviz.cc
      lexer.cc
      line_printer.cc
      manifest_parser.cc
      metrics.cc
      state.cc
      string_piece_util.cc
      util.cc
      version.cc
      subprocess-win32.cc
      includes_normalize-win32.cc
      msvc_helper-win32.cc
      msvc_helper_main-win32.cc
      minidump-win32.cc
      getopt.c
      ninja.cc
      Generating code
      Finished generating code
      wrote build.ninja.
      bootstrap complete.  rebuilding...
      [29/29] LINK ninja.exe
      Generating code
      Finished generating codeMicrosoft (R) Program Maintenance Utility Version 14.28.29333.0
      Copyright (C) Microsoft Corporation.  All rights reserved.        "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX64\x64\nmake.exe" -f Makefile.ninja.DebugMicrosoft (R) Program Maintenance Utility Version 14.28.29333.0
      Copyright (C) Microsoft Corporation.  All rights reserved.        ( if not exist Makefile.gn D:\Qt\QtCorrectedAli\bin\qmake.exe -o Makefile.gn C:\11\src\buildtools\gn.pro ) && "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX64\x64\nmake.exe" -f Makefile.gn
      Project MESSAGE: C:\11\src\3rdparty\gn\build\gen.py --no-last-commit-position --out-path C:/11/src/3rdparty/gn/out/Release --cc "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\Hostx64\x64\cl.exe" --cxx "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\Hostx64\x64\cl.exe" --ld "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\Hostx64\x64\link.exe" --use-lto
      ...

      it continues and reach a point that ninja produce error: 

      \\********* attention: I shortened long lines. the full is attached
      ...
      FAILED: obj/third_party/angle/angle_common/mathutil.obj
      ...
      ../../3rdparty/chromium/third_party/angle/src/common/mathutil.cpp(75): error C4244: '=': conversion from 'double' to 'float', possible loss of data
      ../../3rdparty/chromium/third_party/angle/src/common/mathutil.cpp(77): error C4244: '=': conversion from 'double' to 'float', possible loss of data
      ../../3rdparty/chromium/third_party/angle/src/common/mathutil.cpp(79): error C4244: '=': conversion from 'double' to 'float', possible loss of data
      ...
      ninja: build stopped: subcommand failed.
      NMAKE : fatal error U1077: 'C:\11\src\3rdparty\ninja\ninja.exe' : return code '0x1'
      Stop.
      NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX64\x64\nmake.exe"' : return code '0x2'
      Stop.
      NMAKE : fatal error U1077: '(' : return code '0x2'
      Stop.
      NMAKE : fatal error U1077: 'cd' : return code '0x2'
      Stop.
      NMAKE : fatal error U1077: 'cd' : return code '0x2'
      Stop.
      

       it is very strange that a simple waring of "conversion from 'double' to 'float' " reported as error.

       I spent about one week to solve the matter but not successful. Some of my unsuccessful efforts:

      •  using msvc 2017 not successful. maybe not the same error but again related to warnings treated as error especially in conversions.
      • using earlier versions of qtwebengines-source upto qtwebengine-everywhere-src-5.13.2 not successful. Maybe not the same error but again related to warings treated as error especially in conversions.
      • I have another qt 5.15.1 prebuild using online_installer. I tried to use its qmake but again not successful.
      • I tried the same on another pc with Windows server but getting same result.
      • manually changed mathutil.cpp lines 75, 77 and 79. when I put a static_cast to float, the problem of mathutil.cpp seems to be solved. But again some other error later produced. please see attachment "after_fixing_mathutil_cpp"

      I think the warning "warning: A compatible version of re2c (>= 0.11.3) was not found; changes to src/.in.cc will not affect your build*" in bootstrapping ninja is source of all these error. Even I tried to manipulate configure.py in src\3rdparty\ninja folder but not successful!

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt_webengine_team Qt WebEngine Team
            ali-abrishami ali-abrishami
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes