bitcoin: bitcoind fails to compile with boost 1.72.0

Expected behavior

make succeeds

Actual behavior

$ make
Making all in src
  …
  CXX      wallet/libbitcoin_wallet_a-walletutil.o
wallet/walletutil.cpp:77:23: error: no member named 'level' in 'boost::filesystem::recursive_directory_iterator'
        } else if (it.level() == 0 && it->symlink_status().type() == fs::regular_file && IsBerkeleyBtree(it->path())) {
                   ~~ ^
1 error generated.
make[2]: *** [wallet/libbitcoin_wallet_a-walletutil.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

To reproduce

For MacOS:

brew update
brew install boost
cd bitcoin
./contrib/install_db4.sh $(pwd)
export BDB_PREFIX=$(pwd)/db4
./autogen.sh
./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" --enable-cxx --without-gui --disable-tests --disable-bench
make

For Alpine see: Dockerfile, build log.

System information

Tested for v0.19.0.1 & e6f167bfd .

Reproducible on MacOS/amd64 as well as debian/arm, and ubuntu/amd64.

Speculation

It seems to be caused by a change in boost described as (src):

  • Deprecated: The following members of recursive_directory_iterator are now marked as deprecated: level(), no_push_pending(), no_push_request(), no_push(). Users are advised to replace their use with the standard counterparts: depth(), recursion_pending(), disable_recursion_pending(). Note that recursion_pending() has the opposite meaning compared to no_push_pending() and no_push_request(). Deprecated methods will be removed in a future release.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 21 (9 by maintainers)

Commits related to this issue

Most upvoted comments

This is fixed with #17654. I’ll backport that change and some other commits to the 0.19 branch shortly.