Is there an existing issue for this?
- I have searched the existing issues
Current behaviour
I fail to build Core from source on archlinux. The error presents itself across all files declaring multi indexed containers, in similar fashion:
bitcoin/src/node/txorphanage.cpp:94:54: error: invalid use of incomplete type ‘struct boost::multi_index::indexed_by<boost::multi_index::ordered_unique<boost::multi_index::tag<node::TxOrphanageImpl::ByWtxid>, node::TxOrphanageImpl::WtxidExtractor>, boost::multi_index::ordered_unique<boost::multi_index::tag<node::TxOrphanageImpl::ByPeer>, node::TxOrphanageImpl::ByPeerViewExtractor, void> >’
I've reproduced this across tags 0.29.x, 0.30.x and 0.31.0. I did not check with tags. In 0.31.0, it happens in:
- txmempool.h:214
- txrequest.cpp:211
- txorphanage.cpp:94
It seems the compiler refuses to expand the template on the indexer struct declaration. For example, in txorphanage.cpp, the struct is:
struct OrphanIndices final : boost::multi_index::indexed_by<
boost::multi_index::ordered_unique<boost::multi_index::tag<ByWtxid>, WtxidExtractor>,
boost::multi_index::ordered_unique<boost::multi_index::tag<ByPeer>, ByPeerViewExtractor>
>{};
Replacing the struct by a using statement fixes the issue in all instances, as such:
using OrphanIndices = boost::multi_index::indexed_by<
boost::multi_index::ordered_unique<boost::multi_index::tag<ByWtxid>, WtxidExtractor>,
boost::multi_index::ordered_unique<boost::multi_index::tag<ByPeer>, ByPeerViewExtractor>
>;
I've searched issues and PRs a little and failed to find notable mentions of this build error. There is a secondary mention of CI failing to run a test in PR #35147, where the issue appears to be a compilation failure like I have experienced. This is blamed on an out of date boost version, but mine is up to date. This is on a brand new arch install (changed the SSD to get a local copy of the blockchain).
Expected behaviour
I do not expect anything, I don't know how else to report this possibly benign build error (I'm likely alone in experiencing it).
Steps to reproduce
These are what I believe to be relevant system components to reproduce this issue:
uname -srm
Linux 7.0.10-arch1-1 x86_64
gcc --version
gcc (GCC) 16.1.1 20260430
pacman -Q boost
boost 1.91.0-1
pacman -Q cmake
cmake 4.3.3-1
Relevant log output
No response
How did you obtain Bitcoin Core
Compiled from source
What version of Bitcoin Core are you using?
v0.31.0
Operating system and version
Linux 7.0.10-arch1-1 x86_64
Machine specifications
uname -srm
Linux 7.0.10-arch1-1 x86_64
gcc --version
gcc (GCC) 16.1.1 20260430
pacman -Q boost
boost 1.91.0-1
pacman -Q cmake
cmake 4.3.3-1
Acer laptop with a AMD 5700U, 16GB RAM and 2TB Samsung SSD.