<!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->
<!-- Describe the issue -->
Rebuild of Bitcoin core fails after system upgrade - specifically after boost library upgrade to version 1.72.0 on ArchLinux.
Expected behavior
<!--- What behavior did you expect? -->
Actual behavior
CXX wallet/libbitcoin_wallet_a-walletutil.o
wallet/walletutil.cpp: In function ‘std::vector<boost::filesystem::path> ListWalletDir()’:
wallet/walletutil.cpp:77:23: error: ‘class boost::filesystem::recursive_directory_iterator’ has no member named ‘level’
77 | } else if (it.level() == 0 && it->symlink_status().type() == fs::regular_file && IsBerkeleyBtree(it->path())) {
| ^~~~~
make[2]: *** [Makefile:9093: wallet/libbitcoin_wallet_a-walletutil.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/kuba/Apps/bitcoin/src'
make[1]: *** [Makefile:13764: all-recursive] Error 1
make[1]: Leaving directory '/home/kuba/Apps/bitcoin/src'
make: *** [Makefile:773: all-recursive] Error 1
<!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->
To reproduce
./autogeh.sh
contrib/install_db4.sh `pwd`
export BDB_PREFIX='/home/kuba/Apps/bitcoin/db4'
./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include"
make -j6
<!--- How reliably can you reproduce the issue, what are the steps to do so? -->
System information Arch linux, system update on Feb 1 (boost lib upgraded from 1.71 to 1.72) Bitcoin Core v0.19.0.1
Patch that fixes this
diff --git a/src/wallet/walletutil.cpp b/src/wallet/walletutil.cpp
index 04c2407a8..ead24cd7c 100644
--- a/src/wallet/walletutil.cpp
+++ b/src/wallet/walletutil.cpp
@@ -74,7 +74,7 @@ std::vector<fs::path> ListWalletDir()
if (it->status().type() == fs::directory_file && IsBerkeleyBtree(it->path() / "wallet.dat")) {
// Found a directory which contains wallet.dat btree file, add it as a wallet.
paths.emplace_back(path);
- } else if (it.level() == 0 && it->symlink_status().type() == fs::regular_file && IsBerkeleyBtree(it->path())) {
+ } else if (it.depth() == 0 && it->symlink_status().type() == fs::regular_file && IsBerkeleyBtree(it->path())) {
if (it->path().filename() == "wallet.dat") {
// Found top-level wallet.dat btree file, add top level directory ""
// as a wallet.