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

QMake warning "Cannot find feature windows_vulkan_sdk"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.13.2, 5.14.0 Alpha
    • 5.12.3, 5.12.4, 5.13.0
    • Build System
    • None
    • Arch Linux mingw-w64 packages, MSYS2 mingw-w64 packages
    • Windows
    • 983cfc773d1f24badbdeafd6fbbb2a5940c6f614 (qt/qtbase/5.13)

    Description

      When cross compiling Qt 5 with GCC/mingw-w64 for Windows QMake produces the following warning:

      Cannot find feature windows_vulkan_sdk

      Annoyingly this warning is not only produced when building Qt itself but also when using QMake for other projects.

      It seems the following change would at least let QMake find that feature avoiding the warning:
      diff --git a/mkspecs/common/windows-vulkan.conf b/mkspecs/common/windows-vulkan.conf}}
        index da061422dc..a5a8ec68d2 100644
        — a/mkspecs/common/windows-vulkan.conf
        +++ b/mkspecs/common/windows-vulkan.conf
        @@ -1,2 +1,2 @@
        -load(windows_vulkan_sdk)
        +load(win32/windows_vulkan_sdk)

      The line

      QMAKE_INCDIR_VULKAN = $$(VULKAN_SDK)\\\\include

      is also problematic. I am compiling under Linux where the backslash must be a regular slash. Besides, in my build environment the Vulkan headers are present under /usr/x86_64-w64-mingw32/include/vulkan. If I set VULKAN_SDK to /usr/x86_64-w64-mingw32 QMake adds -isystem /usr/x86_64-w64-mingw32/include to the linker line although that directory is already an implicit include directory. At least for GCC this messes up the include order leading to compile errors. To workaround this I now out-commented the line completely. Then it detects the feature correctly and even builds the Vulkan support library.

      Here is my full patch with workarounds for this: https://github.com/Martchus/PKGBUILDs/blob/update/qt5/qt5-base/mingw-w64/0033-Prevent-Cannot-find-feature-windows_vulkan_sdk.patch)

      It seems I'm not the only one who has encountered that issue yet: https://github.com/msys2/MSYS2-packages/issues/1681

      I suggest adding the change for mkspecs/common/windows-vulkan.conf from my patch and assign the include directory directly:

      QMAKE_INCDIR_VULKAN = $$(VULKAN_INCLUDE_DIR)

      Attachments

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

        Activity

          People

            jbornema Joerg Bornemann
            martchus martchus
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes