Skip to content

build: Qt depends build broken with GCC 16 #34569

Closed

Description

@fanquake

GCC 16 is in it's "stabilization" phase, and 16.1 should be released ~soon. Doing a depends build / compile currently works, other than building Qt in depends:

gcc (GCC) 16.0.1 20260209 (Red Hat 16.0.1-0)
make -C depends/ -j15
<snip>
Building qt...
[3/1319] Building CXX object qtbase/src/corelib/CMakeFiles/Core.dir/global/qcompare.cpp.o
FAILED: [code=1] qtbase/src/corelib/CMakeFiles/Core.dir/global/qcompare.cpp.o 
/usr/lib64/ccache/g++ -DPCRE2_CODE_UNIT_WIDTH=16 -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_UP_TO=0x050000 -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_LEAN_HEADERS=1 -DQT_MOC_COMPAT -DQT_NO_AS_CONST -DQT_NO_CAST_TO_ASCII -DQT_NO_CONTEXTLESS_CONNECT -DQT_NO_DEBUG -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QEXCHANGE -DQT_NO_QPAIR -DQT_NO_USING_NAMESPACE -DQT_TYPESAFE_FLAGS -DQT_USE_QSTRINGBUILDER -DQT_WARN_DEPRECATED_UP_TO=0x070000 -DQT_ZLIB_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257/qtbase/src/corelib/Core_autogen/include -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257/qtbase/include -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257/qtbase/include/QtCore -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257/qtbase/src/corelib -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257/qtbase/src/corelib/global -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257/qtbase/src/corelib/kernel -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257/qtbase/src/corelib/../3rdparty/tinycbor/src -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257/qtbase/include/QtCore/6.7.3 -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257/qtbase/include/QtCore/6.7.3/QtCore -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257/qtbase/src/corelib/../3rdparty/double-conversion/double-conversion -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257/qtbase/src/corelib/../3rdparty/double-conversion -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257/qtbase/src/corelib/.rcc -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257/qtbase/mkspecs/linux-g++ -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257/qtbase/include/QtZlib -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257/qtbase/src/3rdparty/zlib -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257/qtbase/src/3rdparty/pcre2/src -I/root/bitcoin/depends/aarch64-unknown-linux-gnu/include  -ffile-prefix-map=/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257=/usr -O2 -std=c++20 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fexceptions -ffunction-sections -fdata-sections -Wsuggest-override -Winvalid-pch -include /root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257/qtbase/src/corelib/CMakeFiles/Core.dir/cmake_pch.hxx -MD -MT qtbase/src/corelib/CMakeFiles/Core.dir/global/qcompare.cpp.o -MF qtbase/src/corelib/CMakeFiles/Core.dir/global/qcompare.cpp.o.d -o qtbase/src/corelib/CMakeFiles/Core.dir/global/qcompare.cpp.o -c /root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257/qtbase/src/corelib/global/qcompare.cpp
/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257/qtbase/src/corelib/global/qcompare.cpp:17:19: error: static assertion failed
   17 |                   == Qt:: type ## _ordering :: flag); \
      |                   ^
/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257/qtbase/src/corelib/global/qcompare.cpp:21:1: note: in expansion of macro ‘CHECK’
   21 | CHECK(partial, unordered);
      | ^~~~~
/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257/qtbase/src/corelib/global/qcompare.cpp:19:19: error: static assertion failed
   19 |                   == std:: type ## _ordering :: flag) \
      |                   ^
/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257/qtbase/src/corelib/global/qcompare.cpp:21:1: note: in expansion of macro ‘CHECK’
   21 | CHECK(partial, unordered);
      | ^~~~~
[17/1319] Building CXX object qtbase/src/corelib/CMakeFiles/Core.dir/global/qlogging.cpp.o
ninja: build stopped: subcommand failed.
make: *** [funcs.mk:343: /root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257/./.stamp_built] Error 1

Activity

  1. fanquake commented on Feb 12, 2026

    @fanquake
    MemberAuthor

    The same happens with Clang (clang version 21.1.8 (Fedora 21.1.8-6.fc44)):

    FAILED: [code=1] qtbase/src/corelib/CMakeFiles/Core.dir/global/qcompare.cpp.o 
    /usr/lib64/ccache/clang++ -DPCRE2_CODE_UNIT_WIDTH=16 -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_UP_TO=0x050000 -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_LEAN_HEADERS=1 -DQT_MOC_COMPAT -DQT_NO_AS_CONST -DQT_NO_CAST_TO_ASCII -DQT_NO_CONTEXTLESS_CONNECT -DQT_NO_DEBUG -DQT_NO_FOREACH -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QEXCHANGE -DQT_NO_QPAIR -DQT_NO_USING_NAMESPACE -DQT_TYPESAFE_FLAGS -DQT_USE_QSTRINGBUILDER -DQT_WARN_DEPRECATED_UP_TO=0x070000 -DQT_ZLIB_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-e3d4d1dbdba/qtbase/src/corelib/Core_autogen/include -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-e3d4d1dbdba/qtbase/include -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-e3d4d1dbdba/qtbase/include/QtCore -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-e3d4d1dbdba/qtbase/src/corelib -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-e3d4d1dbdba/qtbase/src/corelib/global -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-e3d4d1dbdba/qtbase/src/corelib/kernel -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-e3d4d1dbdba/qtbase/src/corelib/../3rdparty/tinycbor/src -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-e3d4d1dbdba/qtbase/include/QtCore/6.7.3 -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-e3d4d1dbdba/qtbase/include/QtCore/6.7.3/QtCore -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-e3d4d1dbdba/qtbase/src/corelib/../3rdparty/double-conversion/double-conversion -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-e3d4d1dbdba/qtbase/src/corelib/../3rdparty/double-conversion -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-e3d4d1dbdba/qtbase/src/corelib/.rcc -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-e3d4d1dbdba/qtbase/mkspecs/linux-clang -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-e3d4d1dbdba/qtbase/include/QtZlib -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-e3d4d1dbdba/qtbase/src/3rdparty/zlib -I/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-e3d4d1dbdba/qtbase/src/3rdparty/pcre2/src -I/root/bitcoin/depends/aarch64-unknown-linux-gnu/include  -ffile-prefix-map=/root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-e3d4d1dbdba=/usr -O2 -std=c++20 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fexceptions -ffunction-sections -fdata-sections -Winvalid-pch -Xclang -include-pch -Xclang /root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-e3d4d1dbdba/qtbase/src/corelib/CMakeFiles/Core.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-e3d4d1dbdba/qtbase/src/corelib/CMakeFiles/Core.dir/cmake_pch.hxx -MD -MT qtbase/src/corelib/CMakeFiles/Core.dir/global/qcompare.cpp.o -MF qtbase/src/corelib/CMakeFiles/Core.dir/global/qcompare.cpp.o.d -o qtbase/src/corelib/CMakeFiles/Core.dir/global/qcompare.cpp.o -c /root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-e3d4d1dbdba/qtbase/src/corelib/global/qcompare.cpp
    /root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-e3d4d1dbdba/qtbase/src/corelib/global/qcompare.cpp:21:1: error: static assertion failed due to requirement 'std::bit_cast(std::partial_ordering::unordered) == Qt::partial_ordering::unordered'
       21 | CHECK(partial, unordered);
          | ^~~~~~~~~~~~~~~~~~~~~~~~~
    /root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-e3d4d1dbdba/qtbase/src/corelib/global/qcompare.cpp:16:19: note: expanded from macro 'CHECK'
       16 |     static_assert(std::bit_cast<Qt:: type ## _ordering>(std:: type ## _ordering:: flag) \
          |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       17 |                   == Qt:: type ## _ordering :: flag); \
          |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-e3d4d1dbdba/qtbase/src/corelib/global/qcompare.cpp:21:1: error: static assertion failed due to requirement 'std::bit_cast(Qt::partial_ordering::unordered) == std::partial_ordering::unordered'
       21 | CHECK(partial, unordered);
          | ^~~~~~~~~~~~~~~~~~~~~~~~~
    /root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-e3d4d1dbdba/qtbase/src/corelib/global/qcompare.cpp:18:19: note: expanded from macro 'CHECK'
       18 |     static_assert(std::bit_cast<std:: type ## _ordering>(Qt:: type ## _ordering:: flag) \
          |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       19 |                   == std:: type ## _ordering :: flag) \
          |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    2 errors generated.

    -stdlib=libc++ can be used as a workaround.

  2. theuni commented on Feb 12, 2026

    @theuni
    Member

    Qt has the gcc16 fixes in their main dev branch. Backporting all necessary fixes to 6.8 is non-trivial though.

    @hebasto has a WIP branch for a bump to 6.10. I managed to cleanly port all necessary patches to 6.10, so I think it's reasonable to consider bumping in order to fix builds with bleeding-edge gcc/clang.

    Here's my branch build on top of @hebasto's WIP: https://github.com/theuni/bitcoin/commits/qt6.10/

    As a quick summary, to fix build (errors as well as annoying warnings), we need:

    QCompare fix:
    qt/qtbase@7fccc79

    SFINAE fixes:
    qt/qtbase@679e8bd
    qt/qtbase@3312e89
    qt/qtbase@05f201a
    qt/qtbase@d68fc6e

  3. fanquake commented on Feb 12, 2026

    @fanquake
    MemberAuthor

    so I think it's reasonable to consider bumping in order to fix builds with bleeding-edge gcc/clang.

    Bumping for 31.x seems ok, but something will need backporting, as the build is still going to be broken on the current release branch (30.x). I don't know if 29.x and 28.x are also broken, but if so, we might need to do something for 29.x at least.

  4. theuni commented on Feb 12, 2026

    @theuni
    Member

    Makes sense. There's probably a subset of those changes that could be backported more easily, as some just fix annoying warnings.

  5. hebasto commented on Feb 12, 2026

    @hebasto
    Member

    Qt has the gcc16 fixes in their main dev branch. Backporting all necessary fixes to 6.8 is non-trivial though.

    @hebasto has a WIP branch for a bump to 6.10. I managed to cleanly port all necessary patches to 6.10, so I think it's reasonable to consider bumping in order to fix builds with bleeding-edge gcc/clang.

    Here's my branch build on top of @hebasto's WIP: https://github.com/theuni/bitcoin/commits/qt6.10/

    As a quick summary, to fix build (errors as well as annoying warnings), we need:

    QCompare fix: qt/qtbase@7fccc79

    SFINAE fixes: qt/qtbase@679e8bd qt/qtbase@3312e89 qt/qtbase@05f201a qt/qtbase@d68fc6e

    Picked to #34578 #34650.

  6. added a commit that references this issue on Mar 6, 2026
  7. added a commit that references this issue on Jun 28, 2026
  8. added a commit that references this issue on Jun 30, 2026
  9. added a commit that references this issue on Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions