build: build broken with older supported Boost #34101

issue fanquake openend this issue on December 18, 2025
  1. fanquake commented at 1:21 pm on December 18, 2025: member

    Broken by #33192.

    Debian Bookworm GCC 12.2.0 Boost 1.74.0 (our minimum supported is currently 1.73.0)

     0cmake -B build -DCMAKE_BUILD_TYPE=Debug
     1<snip>
     2/bitcoin/src/txrequest.cpp: In member function 'void TxRequestTracker::Impl::ReceivedInv(NodeId, const GenTxid&, bool, std::chrono::microseconds)':
     3/bitcoin/src/txrequest.cpp:583:35: error: 'boost::multi_index::multi_index_container<{anonymous}::Announcement, {anonymous}::Announcement_Indices>::index<{anonymous}::ByPeer>::type' {aka 'class boost::multi_index::detail::ordered_index<{anonymous}::ByPeerViewExtractor, std::less<std::tuple<long int, bool, const uint256&> >, boost::multi_index::detail::nth_layer<1, {anonymous}::Announcement, {anonymous}::Announcement_Indices, std::allocator<{anonymous}::Announcement> >, boost::mpl::v_item<{anonymous}::ByPeer, boost::mpl::vector0<mpl_::na>, 0>, boost::multi_index::detail::ordered_unique_tag, boost::multi_index::detail::null_augment_policy>'} has no member named 'contains'
     4  583 |         if (m_index.get<ByPeer>().contains(ByPeerView{peer, true, gtxid.ToUint256()})) return;
     5      |                                   ^~~~~~~~
     6gmake[2]: *** [src/CMakeFiles/bitcoin_node.dir/build.make:1308: src/CMakeFiles/bitcoin_node.dir/txrequest.cpp.o] Error 1
     7gmake[2]: *** Waiting for unfinished jobs....
     8In file included from /bitcoin/src/support/allocators/pool.h:17,
     9                 from /bitcoin/src/memusage.h:10,
    10                 from /bitcoin/src/core_memusage.h:10,
    11                 from /bitcoin/src/coins.h:10,
    12                 from /bitcoin/src/txmempool.h:9,
    13                 from /bitcoin/src/txmempool.cpp:6:
    14/bitcoin/src/txmempool.cpp: In member function 'CTxMemPool::ChangeSet::TxHandle CTxMemPool::ChangeSet::StageAddition(const CTransactionRef&, CAmount, int64_t, unsigned int, uint64_t, bool, int64_t, LockPoints)':
    15/bitcoin/src/txmempool.cpp:991:22: error: 'CTxMemPool::indexed_transaction_set' {aka 'class boost::multi_index::multi_index_container<CTxMemPoolEntry, CTxMemPool::CTxMemPoolEntry_Indices>'} has no member named 'contains'
    16  991 |     Assume(!m_to_add.contains(tx->GetHash()));
    17      |                      ^~~~~~~~
    18/bitcoin/src/util/check.h:125:51: note: in definition of macro 'Assume'
    19  125 | #define Assume(val) inline_assertion_check<false>(val, std::source_location::current(), #val)
    20      |                                                   ^~~
    21gmake[2]: *** [src/CMakeFiles/bitcoin_node.dir/build.make:1294: src/CMakeFiles/bitcoin_node.dir/txmempool.cpp.o] Error 1
    

    Reported by @marcofleon.

  2. fanquake added the label Build system on Dec 18, 2025
  3. hebasto commented at 1:28 pm on December 18, 2025: member
    Is it a good time to consider bumping of the Boost minimum supported version?
  4. fanquake commented at 1:37 pm on December 18, 2025: member
    Looks like it might have been added in Boost 1.78.0: https://github.com/boostorg/multi_index/issues/35.
  5. maflcko commented at 1:48 pm on December 18, 2025: member

    Is it a good time to consider bumping of the Boost minimum supported version?

    I think there are users out there on Ubuntu:22.04 and Debian Bookworm, so breaking them seems a bit too early?

  6. l0rinc commented at 2:01 pm on December 18, 2025: contributor
    We could revert these instances, but in that case we have to make sure the CI catches these next time. Let me know if there’s anything you’d like me to do here.
  7. marcofleon commented at 2:02 pm on December 18, 2025: contributor

    Looks like it might have been added in Boost 1.78.0

    Just confirmed that 1.78.0 does build without errors.

  8. maflcko commented at 2:07 pm on December 18, 2025: member

    We could revert these instances, but in that case we have to make sure the CI catches these next time.

    I don’t think it will be possible that CI catches “everything”. In theory, the ci/test/00_setup_env_native_previous_releases.sh could be modified to run without depends to catch this, but then we wouldn’t be checking depends. So a new ci config would have to be added. But that again will only check either gcc, or clang. So a new ci config will have to be added for both….

  9. hebasto commented at 2:45 pm on December 18, 2025: member

    Is it a good time to consider bumping of the Boost minimum supported version?

    I think there are users out there on Ubuntu:22.04 and Debian Bookworm, so breaking them seems a bit too early?

    FWIW, they could workaround using depends. For example, see #34103.

  10. l0rinc referenced this in commit a8a0a0ff77 on Dec 18, 2025
  11. l0rinc commented at 2:51 pm on December 18, 2025: contributor
    regardless of the workaround, I don’t mind reverting to make it work with old boost again - we can enable the new clang-tidy rule without them as well. I have reverted the above changes in #34095 - can someone please validate that it fixed the build with older boost?
  12. maflcko commented at 6:58 pm on December 18, 2025: member

    Is it a good time to consider bumping of the Boost minimum supported version?

    I think there are users out there on Ubuntu:22.04 and Debian Bookworm, so breaking them seems a bit too early?

    FWIW, they could workaround using depends. For example, see #34103.

    Asking for a depends workaround when the only benefit is a count() vs contains() in two lines of code, seems a bit too much.

  13. hebasto commented at 7:44 pm on December 18, 2025: member

    Is it a good time to consider bumping of the Boost minimum supported version?

    I think there are users out there on Ubuntu:22.04 and Debian Bookworm, so breaking them seems a bit too early?

    FWIW, they could workaround using depends. For example, see #34103.

    Asking for a depends workaround when the only benefit is a count() vs contains() in two lines of code, seems a bit too much.

    It seems there’s nobody to ask :)

    (see #34095#pullrequestreview-3594758109)

  14. maflcko commented at 7:52 pm on December 18, 2025: member

    It seems there’s nobody to ask :)

    Oh, I see you are referring to bumping from 1.73 to 1.74? That seems fine, if there is no distro that ships with it.

  15. hebasto commented at 8:45 pm on December 18, 2025: member

    It seems there’s nobody to ask :)

    Oh, I see you are referring to bumping from 1.73 to 1.74? That seems fine, if there is no distro that ships with it.

    Done in #34107.

  16. l0rinc referenced this in commit fd9f1accbd on Dec 18, 2025
  17. fanquake closed this on Dec 19, 2025

  18. fanquake referenced this in commit 5e7931af35 on Dec 19, 2025

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-01-01 15:13 UTC

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