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

qtwebengine cannot be built on windows.

    XMLWordPrintable

Details

    • Windows

    Description

      I'm trying to build the Qt Webengine on Windows with MSVS 2022 (17.4.0) with conan and it keeps failing with this error:

      Creating library qtbase\lib\Qt6WebEngineCored.lib and object qtbase\lib\Qt6WebEngineCored.exp
      blink_core.lib(core_jumbo_225.obj) : error LNK2019: unresolved external symbol "public: void __cdecl blink::GraphicsContext::DrawTextW(class blink::Font const &,struct blink::TextRunPaintInfo const &,class blink::FloatPoint const &,class cc::PaintFlags const &,int)" (?DrawTextW@GraphicsContext@blink@@QEAAXAEBVFont@2@AEBUTextRunPaintInfo@2@AEBVFloatPoint@2@AEBVPaintFlags@cc@@H@Z) referenced in function "private: void __cdecl blink::SVGInlineTextBoxPainter::PaintText(struct blink::PaintInfo const &,class blink::TextRun &,struct blink::SVGTextFragment const &,int,int,class cc::PaintFlags const &)" (?PaintText@SVGInlineTextBoxPainter@blink@@AEAAXAEBUPaintInfo@2@AEAVTextRun@2@AEBUSVGTextFragment@2@HHAEBVPaintFlags@cc@@@Z)
      qtbase\bin\Qt6WebEngineCored.dll : fatal error LNK1120: 1 unresolved externals
      ninja: build stopped: subcommand failed.

       

      I was not able to find a definition for `blink::GraphicsContext::DrawTextW`. I suspect what is going on is that the `#define DrawText DrawTextW` in `./qtwebengine/src/3rdparty/chromium/base/win/windows_types.h` are replacing `blink::GraphicsContext::DrawText` with ``blink::GraphicsContext::DrawTextW` from (`./3rdparty/chromium/third_party/blink/renderer/platform/graphics/graphics_context.h`) in certain situations 

      To reproduce, I use conan to build it.
      Here's the command that I used:

      conan install conanfile.py --build missing -s build_type=Debug --settings compiler.version=17  -s "compiler=Visual Studio"

       

      and here's the `conanfile.py`:

      # import pydevd_pycharm
      from conans import ConanFile
      from conans.errors import ConanException
      required_conan_version = ">=1.54.0"
      
      class DragonflyConan(ConanFile):
          generators = "cmake", "cmake_paths", "cmake_find_package"
          settings = "os", "build_type"
      
          def requirements(self):
              # pydevd_pycharm.settrace('localhost', port=62421, stdoutToServer=True, stderrToServer=True)
              self.requires("qt/6.3.1")
              self.requires("icu/70.1") # force the use of icu 70.1 for the python distro
              self._add_requirements_to_manage_conflicts()
      
          def _add_requirements_to_manage_conflicts(self):
              # qt / opencascade
              self.requires('freetype/2.12.1')
              # qt / cpr
              self.requires("zlib/1.2.13")
              # qt / cpr
              self.requires("zstd/1.5.2")
              # qt / cpr
              if self._is_windows:
                  self.requires("openssl/1.1.1s")
              else:
                  self.requires("openssl/1.1.1q")
      
          @property
          def _is_windows(self) -> bool:
              return self.settings.get_safe("os") == 'Windows'
      
          @property
          def _is_linux(self) -> bool:
              return self.settings.get_safe("os") == 'Linux'
      
          @property
          def _is_debug_build(self) -> bool:
              return self.settings.get_safe("build_type") == "Debug"
      
      
          def configure(self):
              self.options["qt"].shared = True
              self.options["qt"].qttools = not self._is_debug_build
              self.options["qt"].qtwebchannel = True
              self.options["qt"].qtwebengine = True
              self.options["qt"].qtwebsockets = True
              self.options["qt"].qt5compat= True
              self.options["qt"].qtsvg= True
              self.options["qt"].qtimageformats= True
              self.options["qt"].qtscxml= True
              self.options["qt"].qtmultimedia= False
              self.options["qt"].qtactiveqt= False
              self.options["qt"].qtdatavis3d= False
              self.options["qt"].qtdeclarative= False
              self.options["qt"].qtlanguageserver= False
              self.options["qt"].qtshadertools= True  # needed for the web engine and for certain aspects of font rendering
              self.options["qt"].qtcoap= False
              self.options["qt"].qtcharts= False
              self.options["qt"].qtconnectivity= False
              self.options["qt"].qtvirtualkeyboard= False
              self.options["qt"].qtwayland= self._is_linux
              self.options["qt"].qtserialbus= False
              self.options["qt"].qtsensors= False
              self.options["qt"].with_sqlite3 = False
              self.options["qt"].with_mysql = False
              self.options["qt"].with_pq = False
              self.options["qt"].with_odbc = False
              self.options["qt"].with_libjpeg = "libjpeg"
              self.options["qt"].with_libpng = True
              self.options["qt"].with_zstd = True
              self.options["qt"].with_md4c= True
              self.options["qt"].with_freetype = True
              self.options["qt"].with_glib = False
              if not self._is_windows:
                  self.options["qt"].with_icu  = True
              self.options["qt"].gui = True
              self.options["qt"].widgets = True
      
              self.options["harfbuzz"].with_glib = False # disable glib to prevent gpl dependencies
              #self.options["harfbuzz"].shared = False
              #self.options["harfbuzz"].with_icu = True
      
              self.options["cpr"].shared = True
              self.options["freetype"].shared = False
              self.options["glew"].shared = True
              self.options["zstd"].shared = True
              self.options["zlib"].shared = True
              self.options["openssl"].shared = True
              self.options["openssl"].no_tests=True
              self.options["icu"].shared = True
              #self.options["tk"].shared = True
              self.options["tcl"].shared = True
              self.options["opencascade"].shared = True
              self.options["opencascade"].with_tk =  False
              self.options["opencascade"].with_opengl =  False
              if not self._is_windows:
                  self.options["icu"].data_packaging = "library"
              
      
      
      

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            eyen Eric Yen
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes