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

[REG 6.6.0 -> 6.6.1] Incorrect compiler detection breaks building with fuzzer-no-link

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P2: Important
    • None
    • dev
    • Build System: CMake
    • None
    • Ubuntu 22.04
      clang 14.0.0
      gcc 11.4.0

    Description

      1. Built Qt with:
        -platform linux-clang -sanitize fuzzer-no-link
        

        See attached config.opt and config.summary.

      2. Tried building a project with that.
        ~/dev/clang-14.0.0/qt-dev_12.15-base_imageformats_svg-fasan-qt-tiff/qtbase/bin/qt-cmake ~/dev/src/qtbase/tests/libfuzzer/gui/image/qimage/loadfromdata/
        

        This fails with an error message:

        CMake Error at /home/qtrob/dev/clang-14.0.0/qt-dev_12.15-base_imageformats_svg-fasan-qt-tiff/qtbase/lib/cmake/Qt6/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake:101 (message):
          You ask to enable the sanitizer fuzzer-no-link,
        
                  but your compiler GNU version 11.4.0
                  does not support it !
                  You should use at least GCC 99.99, Clang 6.0
                  or MSVC 99.99
                  (99.99 means not implemented yet)
        Call Stack (most recent call first):
          /home/qtrob/dev/clang-14.0.0/qt-dev_12.15-base_imageformats_svg-fasan-qt-tiff/qtbase/lib/cmake/Qt6/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake:136 (check_compiler_version)
          /home/qtrob/dev/clang-14.0.0/qt-dev_12.15-base_imageformats_svg-fasan-qt-tiff/qtbase/lib/cmake/Qt6/3rdparty/extra-cmake-modules/modules/ECMEnableSanitizers.cmake:154 (enable_sanitizer_flags)
          /home/qtrob/dev/clang-14.0.0/qt-dev_12.15-base_imageformats_svg-fasan-qt-tiff/qtbase/lib/cmake/Qt6/Qt6Config.cmake:110 (include)
          CMakeLists.txt:13 (find_package)
        

        It's correct that gcc 11.4.0 does not support fuzzer-no-link but that's irrelevant. Qt is configured with clang 14 and should use that.

      The command should just configure the project so it can be built. This used to work with earlier versions of Qt.

      Attachments

        1. config.opt
          0.2 kB
        2. config.summary
          8 kB

        Issue Links

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

          Activity

            People

              qtbuildsystem Qt Build System Team
              rlohning Robert Löhning
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes