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

Qt FTBFS with GCC < 15 + TSAN + PCH + developer-build

    XMLWordPrintable

Details

    • a72077a88 (dev), 8181c4868 (6.9), 73a74d440 (6.8), e9e8364be (tqtc/lts-6.5)

    Description

      A specific build combination causes a build error:

      • GCC < 15
      • TSAN enabled (-DFEATURE_sanitize_thread=ON)
      • developer build (-DFEATURE_developer_build=ON – which in turn enables -Werror)
      • PCH enabled (on by default)

      The error is:

      In function ‘void std::atomic_thread_fence(memory_order)’,
          inlined from ‘TestNamespace::QtGlobalStatic::Holder<QGS>::~Holder() [with QGS = TestNamespace::{anonymous}::Q_QGS_sharedData]’ at qtbase/src/corelib/global/qglobalstatic.h:51:33:
      /g/gcc-14/include/c++/14.2.0/bits/atomic_base.h:146:26: error: ‘atomic_thread_fence’ is not supported with ‘-fsanitize=thread’ [-Werror=tsan]
        146 |   { __atomic_thread_fence(int(__m)); }
            |     ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
      cc1plus: all warnings being treated as errors
      

      That code is actually protected by a pragma, disabling the warning; but pragmas are not fully honored in PCHs due to this GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64117

      Disabling PCH fixes the issue in such a config.

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            peppe Giuseppe D'Angelo
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes