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

CMake: UNIX is not set for INTEGRITY builds

    XMLWordPrintable

Details

    • Integrity
    • 165e01d5d51d16377542c1b3ffbc22f03fb75e97 (qt/qtbase/dev) 2bb41394e0b910bb7c1b1b40ff9944f179ba7be2 (qt/qtbase/6.2)

    Description

      When building Qt for INTEGRITY in the CI, the CMake variable UNIX not set.
      This leads to undefined symbols when building applications against that Qt.

      See integration errors of https://codereview.qt-project.org/c/qt/qtdeclarative/+/372168 for details.

      If we look at the attached trace file, the toolchain file sets UNIX:
      /home/qt/integrity_toolchain/toolchain.cmake(14): set(UNIX True )

      But later we have
      /opt/cmake-3.21.1/share/cmake-3.21/Modules/CMakeSystemSpecificInformation.cmake(15): set(UNIX )

      and just a few lines below we have
      /opt/cmake-3.21.1/share/cmake-3.21/Modules/CMakeSystemSpecificInformation.cmake(30): message(System is unknown to cmake, create:
      Platform/Integrity to use this system, please post your config file on discourse.cmake.org so it can be added to cmake )

      And we should take this warning seriously.

      That means that setting UNIX in a toolchain file doesn't have the desired effect.
      This variable must be set in a Modules/Platform/Integrity.cmake include file.

      Until such a file is available upstream, we could work around this issue by

      • setting UNIX as cache variable on the command line for non-qtbase repos too
      • setting UNIX in QtPlatformSupport.cmake

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes