BitcoinCore Ubuntu buiild error: ‘relative’ is not a member of ‘fs’

0

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.

Behrad Khodayar

Posted 2018-10-22T09:39:20.797

Reputation: 213

1Looks 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 2018-10-22T12:50:18.397

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.Behrad Khodayar 2018-10-22T18:04:59.507

Answers

0

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.

cpit

Posted 2018-10-22T09:39:20.797

Reputation: 1