I'm trying to build Bitcoin core client on an LinuxMint. I'm having the following error(which have not encountered before, while making it on MSWindows or another Linux machine) in make process, right after

CXX      wallet/libbitcoin_wallet_a-walletutil.o

& I can't figure out why:

wallet/walletutil.cpp: In function ‘std::vector<boost::filesystem::path> ListWalletDir()’:
wallet/walletutil.cpp:60:32: error: ‘relative’ is not a member of ‘fs’
         paths.emplace_back(fs::relative(it->path(), wallet_dir));
wallet/walletutil.cpp:71:36: error: ‘relative’ is not a member of ‘fs’
             paths.emplace_back(fs::relative(it->path(), wallet_dir));
Makefile:6894: recipe for target 'wallet/libbitcoin_wallet_a-walletutil.o' failed
make[2]: *** [wallet/libbitcoin_wallet_a-walletutil.o] Error 1
make[2]: Leaving directory '/home/behrad/cprj/bitcoin/src'
Makefile:10232: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/behrad/cprj/bitcoin/src'
Makefile:774: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

My machine version is uname -a output:

Linux anonymous 4.10.0-38-generic #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

One thing comes to my mind is the initial advice on build-unix.md doc, which was warning against relative paths:

Always use absolute paths to configure and compile Bitcoin Core and the dependencies, for example, when specifying the path of the dependency:

    ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX

Here BDB_PREFIX must be an absolute path - it is defined using $(pwd) which ensures the usage of the absolute path.

But as I stated, I've passed configuration & this occurred while it was about finishing. I can installing w/o wallet, but I need it in this installation. Thank you for taking time reading so far, Any help appreciated in advance.

  • 1
    Looks like your version of Boost Filesystem is too old. Read doc/build-unix.md in the repository for instructions on what packages to use. Did that help? – Pieter Wuille Oct 22 '18 at 12:50
  • Thank you Mr Wuille (@PieterWuille) for following up! Yeah, I've closely followed the steps (As I do always w/ bitcoincore installation), But this is weired! Unfortunately I'm not sure enough if its a public issue so I can post it as an issue w/ steps for recreation to help you find out more about my env. – behradkhodayar Oct 22 '18 at 18:04

It appears that the walletutil.cpp utility is trying to look for wallet files that are outside of the standard location and create a list of them that is called later in the make process. This seems plausible since Bitcoin Core 0.17 is supporting wallets differently.

I fiddled around trying to actually fix the code but don't know anything about C++, and once I got it so that those lines didn't cause an error, the function's output still wasn't correct. But if you don't have wallets in non-standard locations, you can edit walletutil.cpp and comment out the two lines that are incorrectly calling relative as a member of fs.

// paths.emplace_back(fs::relative(it->path(), wallet_dir));

When I did this, Make completed.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.