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

CMake infinite loop when configuring with Vulkan support in Conan

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 6.1.0, 6.1.1, 6.1.2, 6.2.0 FF, 6.2.0 Alpha, 6.2.0 Beta1, 6.2.0 Beta2
    • Fix Version/s: None
    • Component/s: Build System: CMake
    • Labels:
      None
    • Environment:
      Conan package manager.
    • Platform/s:
      Linux/X11

      Description

      Qt helper function 'qt_generate_qmake_libraries_pri_content' in 'qtbase/cmake/QtPriHelpers.cmake' iterates over targets that Qt links against. For each target it also obtains 'INTERFACE_LINK_LIBRARIES' and adds them to the list of targets to process.

      In Conan the 'Vulkan::Vulkan' target 'INTERFACE_LINK_LIBRARIES' property contains 'Vulkan::Vulkan'. This leads to an infinite loop where 'Vulkan::Vulkan' is popped from 'lib_targets' list on line 27 and 'Vulkan::Vulkan' gets prepended back to 'lib_targets' on line 33.

      Partially this is a problem with Conan which produces the 'FindVulkan.cmake' file with dubious 'INTERFACE_LINK_LIBRARIES' property value. On the other hand Qt should in my opinion at the very least detect this case and throw an error. This situation can arise on other platforms/dependencies as well and is somewhat difficult to diagnose.

      A simple patch for avoiding duplicate targets in 'lib_targets' is attached. Please note that more complicated circular dependencies between multiple targets can still lead to an infinite loop.

      For reference: Conan issue #6076

        Attachments

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

          Activity

            People

            Assignee:
            qtbuildsystem Qt Build System Team
            Reporter:
            sh0 Siim Meerits
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes