0

I am trying to build bitcoin core from source using

Ubuntu 17.04
with this guide: http://bitzuma.com/posts/compile-bitcoin-core-from-source-on-ubuntu/

The build fails when I use

sudo make
.

The Error is:

Making all in src
make[1]: Entering directory '/home/oscar/src/bitcoin/src'
make[2]: Entering directory '/home/oscar/src/bitcoin/src'
  CXX      crypto/libbitcoinconsensus_la-sha1.lo
  CXX      crypto/libbitcoinconsensus_la-sha256.lo
  CXX      crypto/libbitcoinconsensus_la-sha512.lo
  CXX      crypto/libbitcoinconsensus_la-ripemd160.lo
  CXX      script/libbitcoinconsensus_la-bitcoinconsensus.lo
  CXXLD    libbitcoinconsensus.la
/usr/bin/ar: `u' modifier ignored since `D' is the default (see `U')
  CXX      bitcoind-bitcoind.o
  CXX      libbitcoin_server_a-addrman.o
  CXX      libbitcoin_server_a-alert.o
  CXX      libbitcoin_server_a-checkpoints.o
  CXX      libbitcoin_server_a-init.o
  CXX      libbitcoin_server_a-leveldbwrapper.o
  CXX      libbitcoin_server_a-main.o
  CXX      libbitcoin_server_a-miner.o
miner.cpp: In function ‘CBlockTemplate* CreateNewBlock(const CScript&)’:
miner.cpp:94:5: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
     auto_ptr<CBlockTemplate> pblocktemplate(new CBlockTemplate());
     ^~~~~~~~
In file included from /usr/include/c++/6/memory:81:0,
                 from /usr/include/boost/unordered/unordered_map_fwd.hpp:14,
                 from /usr/include/boost/unordered/unordered_map.hpp:17,
                 from /usr/include/boost/unordered_map.hpp:17,
                 from coins.h:18,
                 from main.h:16,
                 from miner.cpp:12:
/usr/include/c++/6/bits/unique_ptr.h:49:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
miner.cpp: In function ‘void BitcoinMiner(CWallet*)’:
miner.cpp:469:13: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
             auto_ptr<CBlockTemplate> pblocktemplate(CreateNewBlockWithKey(reservekey));
             ^~~~~~~~
In file included from /usr/include/c++/6/memory:81:0,
                 from /usr/include/boost/unordered/unordered_map_fwd.hpp:14,
                 from /usr/include/boost/unordered/unordered_map.hpp:17,
                 from /usr/include/boost/unordered_map.hpp:17,
                 from coins.h:18,
                 from main.h:16,
                 from miner.cpp:12:
/usr/include/c++/6/bits/unique_ptr.h:49:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
  CXX      libbitcoin_server_a-net.o
  CXX      libbitcoin_server_a-noui.o
  CXX      libbitcoin_server_a-pow.o
  CXX      libbitcoin_server_a-rest.o
  CXX      libbitcoin_server_a-rpcblockchain.o
  CXX      libbitcoin_server_a-rpcmining.o
rpcmining.cpp: In function ‘json_spirit::Value setgenerate(const Array&, bool)’:
rpcmining.cpp:173:13: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
             auto_ptr<CBlockTemplate> pblocktemplate(CreateNewBlockWithKey(reservekey));
             ^~~~~~~~
In file included from /usr/include/c++/6/memory:81:0,
                 from /usr/include/boost/config/no_tr1/memory.hpp:21,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:23,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/date_time/time_clock.hpp:17,
                 from /usr/include/boost/thread/thread_time.hpp:9,
                 from /usr/include/boost/thread/lock_types.hpp:18,
                 from /usr/include/boost/thread/pthread/mutex.hpp:16,
                 from /usr/include/boost/thread/mutex.hpp:16,
                 from allocators.h:14,
                 from streams.h:9,
                 from net.h:17,
                 from rpcmining.cpp:10:
/usr/include/c++/6/bits/unique_ptr.h:49:28: note: declared here
   template<typename> class auto_ptr;
                            ^~~~~~~~
  CXX      libbitcoin_server_a-rpcmisc.o
  CXX      libbitcoin_server_a-rpcnet.o
  CXX      libbitcoin_server_a-rpcrawtransaction.o
  CXX      libbitcoin_server_a-rpcserver.o
  CXX      script/libbitcoin_server_a-sigcache.o
  CXX      libbitcoin_server_a-timedata.o
  CXX      libbitcoin_server_a-txdb.o
  CXX      libbitcoin_server_a-txmempool.o
  AR       libbitcoin_server.a
/usr/bin/ar: `u' modifier ignored since `D' is the default (see `U')
  CXX      libbitcoin_common_a-base58.o
  CXX      libbitcoin_common_a-chainparams.o
chainparams.cpp: In constructor ‘CMainParams::CMainParams()’:
chainparams.cpp:161:51: error: ambiguous overload for ‘operator=’ (operand types are ‘std::vector<unsigned char>’ and ‘boost::assign_detail::generic_list<int>’)
         base58Prefixes[PUBKEY_ADDRESS] = list_of(0);
                                                   ^
In file included from /usr/include/c++/6/vector:69:0,
                 from chainparamsbase.h:9,
                 from chainparams.h:9,
                 from chainparams.cpp:6:
/usr/include/c++/6/bits/vector.tcc:167:5: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
     vector<_Tp, _Alloc>::
     ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/6/vector:64:0,
                 from chainparamsbase.h:9,
                 from chainparams.h:9,
                 from chainparams.cpp:6:
/usr/include/c++/6/bits/stl_vector.h:450:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
       ^~~~~~~~
/usr/include/c++/6/bits/stl_vector.h:471:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
       operator=(initializer_list<value_type> __l)
       ^~~~~~~~
chainparams.cpp:162:51: error: ambiguous overload for ‘operator=’ (operand types are ‘std::vector<unsigned char>’ and ‘boost::assign_detail::generic_list<int>’)
         base58Prefixes[SCRIPT_ADDRESS] = list_of(5);
                                                   ^
In file included from /usr/include/c++/6/vector:69:0,
                 from chainparamsbase.h:9,
                 from chainparams.h:9,
                 from chainparams.cpp:6:
/usr/include/c++/6/bits/vector.tcc:167:5: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
     vector<_Tp, _Alloc>::
     ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/6/vector:64:0,
                 from chainparamsbase.h:9,
                 from chainparams.h:9,
                 from chainparams.cpp:6:
/usr/include/c++/6/bits/stl_vector.h:450:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
       ^~~~~~~~
/usr/include/c++/6/bits/stl_vector.h:471:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
       operator=(initializer_list<value_type> __l)
       ^~~~~~~~
chainparams.cpp:163:53: error: ambiguous overload for ‘operator=’ (operand types are ‘std::vector<unsigned char>’ and ‘boost::assign_detail::generic_list<int>’)
         base58Prefixes[SECRET_KEY] =     list_of(128);
                                                     ^
In file included from /usr/include/c++/6/vector:69:0,
                 from chainparamsbase.h:9,
                 from chainparams.h:9,
                 from chainparams.cpp:6:
/usr/include/c++/6/bits/vector.tcc:167:5: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
     vector<_Tp, _Alloc>::
     ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/6/vector:64:0,
                 from chainparamsbase.h:9,
                 from chainparams.h:9,
                 from chainparams.cpp:6:
/usr/include/c++/6/bits/stl_vector.h:450:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
       ^~~~~~~~
/usr/include/c++/6/bits/stl_vector.h:471:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
       operator=(initializer_list<value_type> __l)
       ^~~~~~~~
chainparams.cpp:164:72: error: ambiguous overload for ‘operator=’ (operand types are ‘std::vector<unsigned char>’ and ‘boost::assign_detail::generic_list<int>’)
      base58Prefixes[EXT_PUBLIC_KEY] = list_of(0x04)(0x88)(0xB2)(0x1E);
                                                                     ^
In file included from /usr/include/c++/6/vector:69:0,
                 from chainparamsbase.h:9,
                 from chainparams.h:9,
                 from chainparams.cpp:6:
/usr/include/c++/6/bits/vector.tcc:167:5: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
     vector<_Tp, _Alloc>::
     ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/6/vector:64:0,
                 from chainparamsbase.h:9,
                 from chainparams.h:9,
                 from chainparams.cpp:6:
/usr/include/c++/6/bits/stl_vector.h:450:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
       ^~~~~~~~
/usr/include/c++/6/bits/stl_vector.h:471:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
       operator=(initializer_list<value_type> __l)
       ^~~~~~~~
chainparams.cpp:165:72: error: ambiguous overload for ‘operator=’ (operand types are ‘std::vector<unsigned char>’ and ‘boost::assign_detail::generic_list<int>’)
      base58Prefixes[EXT_SECRET_KEY] = list_of(0x04)(0x88)(0xAD)(0xE4);
                                                                     ^
In file included from /usr/include/c++/6/vector:69:0,
                 from chainparamsbase.h:9,
                 from chainparams.h:9,
                 from chainparams.cpp:6:
/usr/include/c++/6/bits/vector.tcc:167:5: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
     vector<_Tp, _Alloc>::
     ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/6/vector:64:0,
                 from chainparamsbase.h:9,
                 from chainparams.h:9,
                 from chainparams.cpp:6:
/usr/include/c++/6/bits/stl_vector.h:450:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
       ^~~~~~~~
/usr/include/c++/6/bits/stl_vector.h:471:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
       operator=(initializer_list<value_type> __l)
       ^~~~~~~~
chainparams.cpp: In constructor ‘CTestNetParams::CTestNetParams()’:
chainparams.cpp:220:53: error: ambiguous overload for ‘operator=’ (operand types are ‘std::vector<unsigned char>’ and ‘boost::assign_detail::generic_list<int>’)
         base58Prefixes[PUBKEY_ADDRESS] = list_of(111);
                                                     ^
In file included from /usr/include/c++/6/vector:69:0,
                 from chainparamsbase.h:9,
                 from chainparams.h:9,
                 from chainparams.cpp:6:
/usr/include/c++/6/bits/vector.tcc:167:5: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
     vector<_Tp, _Alloc>::
     ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/6/vector:64:0,
                 from chainparamsbase.h:9,
                 from chainparams.h:9,
                 from chainparams.cpp:6:
/usr/include/c++/6/bits/stl_vector.h:450:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
       ^~~~~~~~
/usr/include/c++/6/bits/stl_vector.h:471:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
       operator=(initializer_list<value_type> __l)
       ^~~~~~~~
chainparams.cpp:221:53: error: ambiguous overload for ‘operator=’ (operand types are ‘std::vector<unsigned char>’ and ‘boost::assign_detail::generic_list<int>’)
         base58Prefixes[SCRIPT_ADDRESS] = list_of(196);
                                                     ^
In file included from /usr/include/c++/6/vector:69:0,
                 from chainparamsbase.h:9,
                 from chainparams.h:9,
                 from chainparams.cpp:6:
/usr/include/c++/6/bits/vector.tcc:167:5: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
     vector<_Tp, _Alloc>::
     ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/6/vector:64:0,
                 from chainparamsbase.h:9,
                 from chainparams.h:9,
                 from chainparams.cpp:6:
/usr/include/c++/6/bits/stl_vector.h:450:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
       ^~~~~~~~
/usr/include/c++/6/bits/stl_vector.h:471:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
       operator=(initializer_list<value_type> __l)
       ^~~~~~~~
chainparams.cpp:222:53: error: ambiguous overload for ‘operator=’ (operand types are ‘std::vector<unsigned char>’ and ‘boost::assign_detail::generic_list<int>’)
         base58Prefixes[SECRET_KEY]     = list_of(239);
                                                     ^
In file included from /usr/include/c++/6/vector:69:0,
                 from chainparamsbase.h:9,
                 from chainparams.h:9,
                 from chainparams.cpp:6:
/usr/include/c++/6/bits/vector.tcc:167:5: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
     vector<_Tp, _Alloc>::
     ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/6/vector:64:0,
                 from chainparamsbase.h:9,
                 from chainparams.h:9,
                 from chainparams.cpp:6:
/usr/include/c++/6/bits/stl_vector.h:450:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
       ^~~~~~~~
/usr/include/c++/6/bits/stl_vector.h:471:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
       operator=(initializer_list<value_type> __l)
       ^~~~~~~~
chainparams.cpp:223:72: error: ambiguous overload for ‘operator=’ (operand types are ‘std::vector<unsigned char>’ and ‘boost::assign_detail::generic_list<int>’)
      base58Prefixes[EXT_PUBLIC_KEY] = list_of(0x04)(0x35)(0x87)(0xCF);
                                                                     ^
In file included from /usr/include/c++/6/vector:69:0,
                 from chainparamsbase.h:9,
                 from chainparams.h:9,
                 from chainparams.cpp:6:
/usr/include/c++/6/bits/vector.tcc:167:5: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
     vector<_Tp, _Alloc>::
     ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/6/vector:64:0,
                 from chainparamsbase.h:9,
                 from chainparams.h:9,
                 from chainparams.cpp:6:
/usr/include/c++/6/bits/stl_vector.h:450:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
       ^~~~~~~~
/usr/include/c++/6/bits/stl_vector.h:471:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
       operator=(initializer_list<value_type> __l)
       ^~~~~~~~
chainparams.cpp:224:72: error: ambiguous overload for ‘operator=’ (operand types are ‘std::vector<unsigned char>’ and ‘boost::assign_detail::generic_list<int>’)
      base58Prefixes[EXT_SECRET_KEY] = list_of(0x04)(0x35)(0x83)(0x94);
                                                                     ^
In file included from /usr/include/c++/6/vector:69:0,
                 from chainparamsbase.h:9,
                 from chainparams.h:9,
                 from chainparams.cpp:6:
/usr/include/c++/6/bits/vector.tcc:167:5: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
     vector<_Tp, _Alloc>::
     ^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/6/vector:64:0,
                 from chainparamsbase.h:9,
                 from chainparams.h:9,
                 from chainparams.cpp:6:
/usr/include/c++/6/bits/stl_vector.h:450:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
       operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
       ^~~~~~~~
/usr/include/c++/6/bits/stl_vector.h:471:7: note: candidate: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
       operator=(initializer_list<value_type> __l)
       ^~~~~~~~
Makefile:3117: recipe for target 'libbitcoin_common_a-chainparams.o' failed
make[2]: *** [libbitcoin_common_a-chainparams.o] Error 1
make[2]: Leaving directory '/home/oscar/src/bitcoin/src'
Makefile:6228: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/oscar/src/bitcoin/src'
Makefile:569: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

I think the problem is in the configure step, but I could be wrong:

I have tried running the below command both with and without the

--disable-wallet
option. It seems to get further with this option, but still crashes with the same error:

./configure CPPFLAGS="-I{BDB_PREFIX}/include/ -O2" LDFLAGS="-L${BDB_PREFIX}/lib/" --with-gui

Why is it failing here? Is there any work around?

Asked question