Build Instructions - bitcoin-black-bcb/btcb GitHub Wiki

Notes

  • This documentation is intended only for developers of the Btcb Node software, and will not result in a supported configuration. End-users are advised to use releases.
  • Using docker has been recommended as a faster method of installation: https://github.com/btcbcurrency/btcb-node/wiki/Docker-node

Required source

  • Boost 1.67 extracted to [boost.src] (OR sh btcb-node/util/build_prep/bootstrap_boost.sh -m)
  • (wallet) Qt 5.x open source edition extracted to [qt.src]
  • Btcb node source in [btcb-node.src]

Required build tools

  • (macOS) XCode >= 7.3
  • (Windows) Visual Studio 2015
  • (Windows) NSIS package builder
  • (*nix) Clang >= 3.5 or GCC >= 5
  • CMake

Build Boost

Option 1

  • Inside btcb-node directory
  • Run sh util/build_prep/bootstrap_boost.sh -m
  • This will build the required Boost libraries at /usr/local/boost/
  • That's it!

Option 2

  • Inside [boost.src]
  • Run ./bootstrap.sh --with-libraries=filesystem,log,program_options,thread
  • Run ./b2 --prefix=[boost] --build-dir=[boost.build] link=static install
  • (Windows) An additional b2 option address-model=64 for x64 builds

Building Qt

  • In [qt.build] execute [qt.src]/configure -shared -opensource -nomake examples -nomake tests -confirm-license -prefix [qt]
  • make
  • make install
  • (Windows) Use nmake instead of make.

CMake variables (cmake -DVARNAME=VARVALUE).

  • BOOST_ROOT [boost] (/usr/local/boost/ if bootstrapped)
  • CMAKE_BUILD_TYPE Release (default)
  • ACTIVE_NETWORK btcb_live_network (default)
  • Qt5_DIR [qt]lib/cmake/Qt5 (to build GUI wallet)
  • BTCB_GUI ON (to build GUI wallet)
  • ENABLE_AVX2 ON, optional PERMUTE_WITH_GATHER ON, optional PERMUTE_WITH_SHUFFLES ON (for CPU with AXV2 support, choose fastest method for your CPU with https://github.com/sneves/blake2-avx2/)
  • CRYPTOPP_CUSTOM ON (more conservative building of Crypto++ for wider range of systems)
  • BTCB_SIMD_OPTIMIZATIONS OFF (Enable CPU-specific SIMD optimization: SSE/AVX or NEON, e.g.)
  • BTCB_SECURE_RPC ON (to build node with TLS)

Build Btcb

  • git submodule update --init --recursive
  • Generate with cmake then build with your compiler
  • (*nix) to build node without GUI execute: make btcb_node
  • (*nix) to build wallet with GUI execute: make btcb_wallet

Building a package

  • (macOS) cpack -G "DragNDrop"
  • (Windows) cpack -G "NSIS"
  • (*nix) cpack -G "TBZ2"

Testing Btcb

  • In order to run the tests, the corresponding CMake variable must be set: -D BTCB_TEST=ON.
  • With this variable set, make will also build test files, and will produce core_test and slow_test binaries, which can be executed like ./core_test.
  • To run a node on the test network, set CMake variable: -DACTIVE_NETWORK=btcb_test_network

Beta Network Participation

  • More information can be found Here
  • To run a node on the beta network, set CMake variable: -DACTIVE_NETWORK=btcb_beta_network