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_iteratorare 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 thatrecursion_pending()has the opposite meaning compared tono_push_pending()andno_push_request(). Deprecated methods will be removed in a future release.