build: Qt depends build broken with GCC 16 #34569

issue fanquake openend this issue on February 12, 2026
  1. fanquake commented at 10:12 am on February 12, 2026: member

    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:

     0gcc (GCC) 16.0.1 20260209 (Red Hat 16.0.1-0)
     1make -C depends/ -j15
     2<snip>
     3Building qt...
     4[3/1319] Building CXX object qtbase/src/corelib/CMakeFiles/Core.dir/global/qcompare.cpp.o
     5FAILED: [code=1] qtbase/src/corelib/CMakeFiles/Core.dir/global/qcompare.cpp.o 
     6/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
     7/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
     8   17 |                   == Qt:: type ## _ordering :: flag); \
     9      |                   ^
    10/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’
    11   21 | CHECK(partial, unordered);
    12      | ^~~~~
    13/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
    14   19 |                   == std:: type ## _ordering :: flag) \
    15      |                   ^
    16/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’
    17   21 | CHECK(partial, unordered);
    18      | ^~~~~
    19[17/1319] Building CXX object qtbase/src/corelib/CMakeFiles/Core.dir/global/qlogging.cpp.o
    20ninja: build stopped: subcommand failed.
    21make: *** [funcs.mk:343: /root/bitcoin/depends/work/build/aarch64-unknown-linux-gnu/qt/6.7.3-933b44e1257/./.stamp_built] Error 1
    
  2. fanquake added the label GUI on Feb 12, 2026
  3. fanquake added the label Build system on Feb 12, 2026
  4. fanquake commented at 12:00 pm on February 12, 2026: member

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

     0FAILED: [code=1] qtbase/src/corelib/CMakeFiles/Core.dir/global/qcompare.cpp.o 
     1/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
     2/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'
     3   21 | CHECK(partial, unordered);
     4      | ^~~~~~~~~~~~~~~~~~~~~~~~~
     5/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'
     6   16 |     static_assert(std::bit_cast<Qt:: type ## _ordering>(std:: type ## _ordering:: flag) \
     7      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     8   17 |                   == Qt:: type ## _ordering :: flag); \
     9      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    10/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'
    11   21 | CHECK(partial, unordered);
    12      | ^~~~~~~~~~~~~~~~~~~~~~~~~
    13/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'
    14   18 |     static_assert(std::bit_cast<std:: type ## _ordering>(Qt:: type ## _ordering:: flag) \
    15      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    16   19 |                   == std:: type ## _ordering :: flag) \
    17      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    182 errors generated.
    

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

  5. theuni commented at 6:52 pm on February 12, 2026: 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: https://github.com/qt/qtbase/commit/7fccc79dd5744ea837ffe200bbfc9f2756870220

    SFINAE fixes: https://github.com/qt/qtbase/commit/679e8bda1eb0cc98acb981e9a10204bed1c179f2 https://github.com/qt/qtbase/commit/3312e89b47f8c2ea0b4263b39841c25b83a37332 https://github.com/qt/qtbase/commit/05f201a3d559452287b20becb960de3a50249540 https://github.com/qt/qtbase/commit/d68fc6ecc88a0e4532754b1a9f209881a248f4ee

  6. fanquake commented at 6:56 pm on February 12, 2026: member

    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.

  7. theuni commented at 7:03 pm on February 12, 2026: member
    Makes sense. There’s probably a subset of those changes that could be backported more easily, as some just fix annoying warnings.
  8. hebasto commented at 10:42 pm on February 12, 2026: 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.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-02-17 06:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me