I'm trying to compile v0.8.6 of the core client from source, in order to compare IDB (Initial Blockchain Download) performance between versions.

I created a fresh Ubuntu Xenial 16.04 machine on Amazon EC2. I then ran the following commands (which were sufficient for version 0.9.3 and up):

sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install build-essential autoconf libboost-all-dev \
                     libssl-dev libtool pkg-config libevent-dev

In addition for this specific version I ran:

sudo apt-get install libdb++-dev libminiupnpc-dev

I then checked out the source and started the compilation:

git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin
git checkout v0.8.6
cd src/
make -f makefile.unix

I'm only interested in running headless bitcoind, but I'm not sure if it was already separated form the UI at that release.

I get the following error:

rpcrawtransaction.cpp:241:77:   required from here
/usr/include/boost/variant/get.hpp:178:5: error: invalid application of ‘sizeof’ to incomplete type ‘boost::STATIC_ASSERTION_FAILURE<false>’
makefile.unix:172: recipe for target 'obj/rpcrawtransaction.o' failed
make: *** [obj/rpcrawtransaction.o] Error 1

Interestingly 0.7, 0.6 and 0.5 do compile successfully, although they get stuck during IDB, so perhaps compilation just failed silently. I'll make a separate post for those later.

I suspect that I need to install some very specific versions of dependencies, but I'm not sure which and how to go about that. I haven't used Linux in years.

I still have the VM, so I can provide more details if needed.

I'm open to alternative approaches, even using a Windows VM :-)

  • 1
    1) This thread suggests unsetting BOOST_VARIANT_USE_RELAXED_GET_BY_DEFAULT, or applying this change. 2) What's your boost version? PS: Neat project!
    – Nick ODell
    Commented Jul 5, 2017 at 17:24
  • 1
    @NickODell libboost-all-dev version 1.58.0. I might try the gitian approach first though. Commented Jul 5, 2017 at 18:13
  • 1
    As for pre-0.8 versions getting stuck in IBD, you'll need to increase the number of BDB locks as described here: bitcoin.org/en/alert/2013-03-15-upgrade-deadline. Commented Jul 5, 2017 at 18:27
  • @PieterWuille thanks, I actually already did that. They get stuck at different blocks: gist.github.com/Sjors/70f14baf1f834f3547bf35553faff610#v072 I might try gitian for those too, because I'm pretty sure the dependencies are a mess on default modern Ubuntu. Commented Jul 5, 2017 at 18:32
  • 1
    You're using a too recent OpenSSL version which requires strict DER signatures, which only became mandatory in Bitcoin after BIP66. You'll need the patch here: github.com/bitcoin/bitcoin/pull/5634/files in order to use the pre-BIP66 chain with new OpenSSL. Commented Jul 5, 2017 at 21:21

2 Answers 2


You can use the gitian build system. Instructions for building 0.8.x with gitian are available here: https://github.com/bitcoin/bitcoin/tree/0.8/contrib/gitian-descriptors and here: https://github.com/bitcoin/bitcoin/blob/0.8/doc/release-process.md. Using gitian should get you exactly the same binaries as those that were released.

  • Thanks, that's a great opportunity to learn about Gitian. I'll mark your answer as Accepted if that works out. Commented Jul 5, 2017 at 18:06
  • Unfortunately this won't work out of the box on EC2 (T2): sudo /usr/sbin/kvm-ok INFO: Your CPU does not support KVM extensions KVM acceleration can NOT be used It looks like I would have to use something fancy like Ravello, or am I missing something? Commented Jul 6, 2017 at 9:22
  • 1
    IIRC EC2 itself is a VM, so you can't use KVM in it. However, you should be able to use LXC and there are instructions for that at the bottom of the first link I posted (ignore the virtualbox stuff). You will need to do the make-base-vm commands with the --lxc option too.
    – Ava Chow
    Commented Jul 6, 2017 at 16:33

Nick ODell pointed me to the solution:

Edit rpcrawtransaction.cpp and change:

const CScriptID& hash = boost::get<const CScriptID&>(address);


const CScriptID& hash = boost::get<CScriptID>(address);

This was sufficient to get it to compile.

In addition I applied the OpenSSL patch Pieter Wuille pointed out.

You have to do this manually because depends/packages/openssl.mk no longer exists, and the function name and signature has changed. Simply open src/key.cpp and replace everything inside the CKey::Verify function brackets with this new version.

More than 210,000 blocks synced so far, so I'm assuming this worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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