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

qtbase fails to configure on Linux with CMake 3.21.1 and policy CMP00126 enabled

    XMLWordPrintable

    Details

    • Commits:
      72a1e55472d0780996cc3843039b00427b5a420b (qt/qtbase/dev) 331b8dbb5961fb258596b34053402c14f2f81537 (qt/qtbase/6.2)

      Description

      See comment at https://codereview.qt-project.org/c/qt/qtbase/+/363411/3/.cmake.conf#24

      When configuring qtbase from a scratch with CMake 3.21.1 with the linked change

      I get

       CMake Error at cmake/QtPublicTargetHelpers.cmake:259 (set_property):
        Attempt to promote imported target "PkgConfig::XRender" to global scope (by
        setting IMPORTED_GLOBAL) which is not built in this directory.
      Call Stack (most recent call first):
        cmake/QtFindPackageHelpers.cmake:174 (__qt_internal_promote_target_to_global)
        src/gui/configure.cmake:129 (qt_find_package)
        cmake/QtModuleHelpers.cmake:516 (include)
        src/gui/CMakeLists.txt:53 (qt_internal_add_module)
      

      this is related to XRender_FOUND suddenly not being set.

      With a previously configured (with 3.16) build without the linked change, if i apply the linked change and configure with 3.21.1, i also get

      ERROR: Feature "libudev": Forcing to "ON" breaks its condition:
          Libudev_FOUND AND NOT INTEGRITY
      Condition values dump:
          Libudev_FOUND = "0"
          INTEGRITY = "0"
      ERROR: Feature "xkbcommon_x11": Forcing to "ON" breaks its condition:
          QT_FEATURE_xkbcommon AND XKB_COMMON_X11_FOUND
      Condition values dump:
          QT_FEATURE_xkbcommon = "ON"
          XKB_COMMON_X11_FOUND = "0"
      ERROR: Feature "accessibility_atspi_bridge": Forcing to "ON" breaks its condition:
          QT_FEATURE_accessibility AND QT_FEATURE_xcb AND QT_FEATURE_dbus AND ATSPI2_FOUND
      Condition values dump:
          QT_FEATURE_accessibility = "ON"
          QT_FEATURE_xcb = "ON"
          QT_FEATURE_dbus = "ON"
          ATSPI2_FOUND = "0"
      ERROR: Feature "mtdev": Forcing to "ON" breaks its condition:
          Mtdev_FOUND
      Condition values dump:
          Mtdev_FOUND = "0"
      

      This seems to be related to the way our Find scripts set the FOUND variables, how pkgconfig module sets them, the fact that we call find_package twice in different scopes, and the new cmake policy https://cmake.org/cmake/help/latest/policy/CMP0126.html

        Attachments

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

          Activity

            People

            Assignee:
            alexandru.croitor Alexandru Croitor
            Reporter:
            alexandru.croitor Alexandru Croitor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes