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

Under the current conditions specified in the documentation, it is not possible to build the module through cross-compilation

    XMLWordPrintable

Details

    • Windows
    • 7765029d0 (dev), ed9253485 (6.5)

    Description

      Latest doc says (https://doc.qt.io/qt-6/qtwebengine-platform-notes.html):
      ```
      Qt WebEngine can only be built on 64-bit Windows, with a x64-bit toolchain. For building Qt WebEngine for x86 applications, you need to configure and compile Qt with the Visual Studio x64 to x86 cross-compile toolchain. This toolchain can be set up on the command line by running vcvarsall.bat amd64_x86
      ```

      Let's start from the fact that amd64_x86 is not a modern option - instead of it we must use x64_x86. Yes these flags are the same as stated in https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#vcvarsall-syntax

      But such fact would be very pleasant to see and in the DOCs)
      And one more thing: Windows installation of VS already does a set up of 4 special file's shortcuts in Main Menu: (https://ibb.co/FVc1fg3)
      So in fact at DOCs we MUST to see a direct reference to ONE of these win-shortcuts! If we here talk about Windows compilation. And not a text in form like "open terminal, run command, script, bat.... add parameters" - We are all not in a linux dear developers!

      OK, if mentioned amd64_x86 is in fact equal to x64_x86 - I click the second link from my pic.
      Command prompt window is opening and I see that all predefined steps for configuring my building VS2019 platform is performing very well.
      So, after that I go into specially created .\Build folder inside the Qt 6.5.0 LTS sources directory, run
      ..\configure script.
      ```
      -prefix D:\Qt\6.5.0-LTS -debug-and-release -force-debug-info -shared -platform win32-msvc -opensource -confirm-license -qt-doubleconversion -qt-pcre -c+std c+20
      ```
      Till now All is fine, as it was stated in the output of this script:
      ```
      Qt is now configured for building. Just run 'cmake --build . --parallel'
      ```
      I ran this command.
      And... after a few hours I've got following (yep, my comp is outdated, i know it, but it still works well for my needs):
      ```
      FAILED: qtwebengine/src/core/Debug/AMD64/QtWebEngineCore.stamp qtwebengine/src/core/Debug/AMD64/QtWebEngineCore D://6.5.0-source/Build/qtwebengine/src/core/Debug/AMD64/QtWebEngineCore.stamp D://6.5.0-source/Build/qtwebengine/src/core/Debug/AMD64/QtWebEngineCore
      cmd.exe /C "cd /D D:\6.5.0-source\Build\qtwebengine\src\core && "I:\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja\ninja.exe" -C D://6.5.0-source/Build/qtwebengine/src/core/Debug/AMD64 QtWebEngineCore"
      ninja: build stopped: subcommand failed.
      ```

      <sarcasm>A Very useful output of compilation process, Isn't it? </sarcasm>

      After another portion of time research tasks I found this:
      ```
      ninja t msvc e environment.x86 - "I:\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x86\cl.exe" /c ../../../../../../qtwebengine/src/3rdparty/chromium/base/allocator/partition_allocator/memory_reclaimer.cc /Foobj/base/allocator/partition_allocator/partition_alloc/memory_reclaimer.obj /nologo -DPA_PCSCAN_STACK_SUPPORTED -DUSE_AURA=1 -DTOOLKIT_QT -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_STD_C -D_CRT_RAND_S -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -D_ATL_NO_OPENGL -D_WINDOWS -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DPSAPI_VERSION=2 -DWIN32 -D_SECURE_ATL -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_UNICODE -DUNICODE -DNTDDI_VERSION=NTDDI_WIN10_FE -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DIS_PARTITION_ALLOC_IMPL -Igen -I../../../../../../qtwebengine/src/3rdparty/chromium /wd4091 /wd4127 /wd4251 /wd4275 /wd4312 /wd4324 /wd4351 /wd4355 /wd4503 /wd4589 /wd4611 /wd4100 /wd4121 /wd4244 /wd4505 /wd4510 /wd4512 /wd4610 /wd4838 /wd4995 /wd4996 /wd4456 /wd4457 /wd4458 /wd4459 /wd4200 /wd4201 /wd4204 /wd4221 /wd4245 /wd4267 /wd4305 /wd4389 /wd4702 /wd4701 /wd4703 /wd4661 /wd4706 /wd4715 /wd4003 /wd4068 /wd5051 /wd4244 /Gy /FS /bigobj /utf-8 /Zc:sizedDealloc /wd4117 /DDATE= /DTIME= /DTIMESTAMP_= /Od /Ob0 /GF /Zi /MDd /wd4577 /std:c++17 /TP /GR /Fd"obj/base/allocator/partition_allocator/partition_alloc_cc.pdb"
      memory_reclaimer.cc
      D:_\6.5.0-source\qtwebengine\src\3rdparty\chromium\base/allocator/partition_allocator/starscan/state_bitmap.h(239): error C3861: __popcnt64: Identifier not found
      ```

      HOW is that possible? I see only 2 options:
      1) DOCs are completely wrong. The first quote from mentioned link contains useless words like: "For building Qt WebEngine for x86 applications, you need to configure and compile Qt with the Visual Studio x64 to x86 cross-compile toolchain." Because practice shows that it's the impossible thing.
      2) Sources were not tested very carefully. So this theoretically valid option - to compile Qt WebEngine using the cross-compile toolchain - has actually become forbidden from some point in time....

      THUS now I have a main question - how to compile this LTS release? Taking into account that I can't use pure x64 compilation at all.

      AND btw HOW to completely disable output of lines like:
      ```
      Note: including file: D:_\6.5.0-source\qtwebengine\src\3rdparty\chromium\base/allocator/partition_allocator/starscan/pcscan.h
      Note: including file: D:_\6.5.0-source\qtwebengine\src\3rdparty\chromium\base/allocator/partition_allocator/starscan/pcscan_scheduling.h
      ```
      these "notes" - are madness....

      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
            razermind LittleJ .bro
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes