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

CMake infinite loop when configuring with Vulkan support in Conan

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.5.3, 6.6.0 Beta2, 6.7.0 FF
    • 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
    • Build System: CMake
    • None
    • Conan package manager.
    • Linux/X11
    • f7b7262f1 (dev), 2c0e78e7b (6.6), 4b227477f (6.5)

    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

            jbornema Joerg Bornemann
            sh0 Siim Meerits
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes