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

Fix CMake's platform detection for integrity

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 6.2
    • Fix Version/s: None
    • Component/s: Build System: CMake
    • Labels:
      None
    • Platform/s:
      Integrity

      Description

      See the following log for example
      https://testresults.qt.io/coin/logview/qt/qtbase/a4a18449082c02f0803fd51addd2e0763c7590de/LinuxUbuntu_20_04x86_64LinuxUbuntu_20_04x86_64GCCqtci-linux-Ubuntu-20.04-x86_64-50-ccc297DisableTests_Sccache/a34b3d580fd5daab8f247be1745ea7ce50570855/build_1626208784

      agent:2021/07/13 20:40:27 build.go:706: Executing instruction 29 of 47 - ExecuteCommand
      agent:2021/07/13 20:40:27 build.go:414: [cmake -DQT_HOST_PATH=/home/qt/work/install -DQT_BUILD_EXAMPLES=OFF -DCMAKE_TOOLCHAIN_FILE=/home/qt/integrity_toolchain/toolchain.cmake -DQT_QMAKE_TARGET_MKSPEC=devices/integrity-armv8-SA8155P -DINPUT_harfbuzz=no -DFEATURE_library=OFF -DBUILD_qtdoc=OFF -DBUILD_qttranslations=OFF -DFEATURE_printdialog=OFF --debug-trycompile -DFEATURE_quick3d_assimp=OFF -DFEATURE_dbus=OFF -GNinja -DUNIX=ON -DFEATURE_gtk3=OFF -DFEATURE_glib=OFF -DFEATURE_libudev=OFF -DFEATURE_system_pcre2=OFF -DFEATURE_sql_mysql=OFF -DCMAKE_C_COMPILER=cxintarm64 -DCMAKE_CXX_COMPILER=cxintarm64 -DCMAKE_INSTALL_PREFIX:PATH=/home/qt/work/install -DQT_BUILD_TESTS=OFF /home/qt/work/qt/qtbase] 1h40m0s 20m0s false false
      agent:2021/07/13 20:40:27 build.go:391: debug trycompile on
      agent:2021/07/13 20:40:35 build.go:391: -- The CXX compiler identification is GHS 2020.1.4
      agent:2021/07/13 20:40:35 build.go:391: -- The C compiler identification is GHS 2020.1.4
      agent:2021/07/13 20:40:35 build.go:391: -- The ASM compiler identification is unknown
      agent:2021/07/13 20:40:35 build.go:391: -- Found assembler: /home/qt/integrity_toolchain/hlos_dev_boot/apps/ghs_apps_proc/comp/cxintarm64
      agent:2021/07/13 20:40:35 build.go:391: System is unknown to cmake, create:
      agent:2021/07/13 20:40:35 build.go:391: Platform/Integrity to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
      agent:2021/07/13 20:40:35 build.go:391: -- Detecting CXX compiler ABI info
      agent:2021/07/13 20:40:35 build.go:391: System is unknown to cmake, create:
      agent:2021/07/13 20:40:35 build.go:391: Platform/Integrity to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
      agent:2021/07/13 20:40:36 build.go:391: -- Detecting CXX compiler ABI info - done
      agent:2021/07/13 20:40:36 build.go:391: -- Check for working CXX compiler: /home/qt/integrity_toolchain/hlos_dev_boot/apps/ghs_apps_proc/comp/cxintarm64 - skipped
      agent:2021/07/13 20:40:36 build.go:391: -- Detecting C compiler ABI info
      agent:2021/07/13 20:40:36 build.go:391: System is unknown to cmake, create:
      agent:2021/07/13 20:40:36 build.go:391: Platform/Integrity to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
      agent:2021/07/13 20:40:38 build.go:391: -- Detecting C compiler ABI info - done
      agent:2021/07/13 20:40:38 build.go:391: -- Check for working C compiler: /home/qt/integrity_toolchain/hlos_dev_boot/apps/ghs_apps_proc/comp/cxintarm64 - skipped
      agent:2021/07/13 20:40:38 build.go:391: -- Warning: Did not find file Compiler/-ASM
      agent:2021/07/13 20:40:38 build.go:391: -- Check for feature set changes
      agent:2021/07/13 20:40:38 build.go:391: -- Building architecture extraction project with the following CMake arguments:
      agent:2021/07/13 20:40:38 build.go:391:     -DCMAKE_TOOLCHAIN_FILE=/home/qt/integrity_toolchain/toolchain.cmake
      agent:2021/07/13 20:40:38 build.go:391:     -DCMAKE_C_STANDARD=99
      agent:2021/07/13 20:40:38 build.go:391:     -DCMAKE_CXX_STANDARD=17
      agent:2021/07/13 20:40:38 build.go:391: System is unknown to cmake, create:
      agent:2021/07/13 20:40:38 build.go:391: Platform/Integrity to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
      agent:2021/07/13 20:40:39 build.go:391: -- Extracting architecture info from /home/qt/work/qt/qtbase/config.tests/arch/architecture_test.
      agent:2021/07/13 20:40:39 build.go:391: -- Performing Test HAVE_LD_VERSION_SCRIPT
      agent:2021/07/13 20:40:39 build.go:391: System is unknown to cmake, create:
      agent:2021/07/13 20:40:39 build.go:391: Platform/Integrity to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
      agent:2021/07/13 20:40:40 build.go:391: -- Performing Test HAVE_LD_VERSION_SCRIPT - Success
      agent:2021/07/13 20:40:40 build.go:391: -- CMAKE_VERSION: "3.20.5"
      agent:2021/07/13 20:40:40 build.go:391: -- CMAKE_HOST_SYSTEM: "Linux-5.4.0-42-generic"
      agent:2021/07/13 20:40:40 build.go:391: -- CMAKE_HOST_SYSTEM_NAME: "Linux"
      agent:2021/07/13 20:40:40 build.go:391: -- CMAKE_HOST_SYSTEM_VERSION: "5.4.0-42-generic"
      agent:2021/07/13 20:40:40 build.go:391: -- CMAKE_HOST_SYSTEM_PROCESSOR: "x86_64"
      agent:2021/07/13 20:40:40 build.go:391: -- CMAKE_SYSTEM: "Integrity"
      agent:2021/07/13 20:40:40 build.go:391: -- CMAKE_SYSTEM_NAME: "Integrity"
      agent:2021/07/13 20:40:40 build.go:391: -- CMAKE_SYSTEM_VERSION: ""
      agent:2021/07/13 20:40:40 build.go:391: -- CMAKE_SYSTEM_PROCESSOR: "arm"
      agent:2021/07/13 20:40:40 build.go:391: -- CMAKE_CROSSCOMPILING: "True"
      agent:2021/07/13 20:40:40 build.go:391: -- CMAKE_C_COMPILER: "/home/qt/integrity_toolchain/hlos_dev_boot/apps/ghs_apps_proc/comp/cxintarm64" (2020.1.4)
      agent:2021/07/13 20:40:40 build.go:391: -- CMAKE_CXX_COMPILER: "/home/qt/integrity_toolchain/hlos_dev_boot/apps/ghs_apps_proc/comp/cxintarm64" (2020.1.4)
      

      Note the multiple warnings of

      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
      

      The custom cmake toolchain file that's provisioned by Qt and used in the CI has

      set(CMAKE_SYSTEM_NAME Integrity)
      

      I don't know whether the warnings affect much, but it definitely looks wrong.

      I found https://gitlab.kitware.com/cmake/cmake/-/issues/19743 and
      https://gitlab.kitware.com/sebastianlipponer/cmake/-/commits/help_cc_integrity
      which has a WIP branch adding a platform called 'GHS-MULTI-CXX, not 'Integrity'.

      I suppose this needs to be fixed in upstream cmake and can't be worked around in Qt itself, but that's just a guess.

      Note our provisioned cmake toolchain file does a lot of things to work around the missing platform, e.g. setting known c++ features, setting up include / lib / sysroot paths to pass to the compiler and linker, various flags, etc.

      Some of the things done are fishy, like setting BUILD_SHARED_LIBS.

        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:
            alexandru.croitor Alexandru Croitor
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes