Bitcoin Blockchain Query Protocol Library
A build requires boost, zeromq, protobuf, bitprim-libsecp256k1 and bitprim-core. The bitprim/secp256k1 repository is forked from bitcoin-core/secp256k1 in order to control for changes and to incorporate the necessary Visual Studio build. The original repository can be used directly but recent changes to the public interface may cause build breaks. The --enable-module-recovery switch is required.
Detailed instructions are provided below.
Bitprim requires a C++11 compiler, currently minimum GCC 4.8.0 or Clang based on LLVM 3.5.
To see your GCC version:
$ g++ --versiong++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If necessary, upgrade your compiler as follows:
$ sudo apt-get install g++-4.8
$ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
$ sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-4.8 50Next install the build system (Automake minimum 1.14) and git:
$ sudo apt-get install build-essential autoconf automake libtool pkg-config gitNext install the Boost (minimum 1.56.0) development package:
$ sudo apt-get install libboost-all-devNext install the ZeroMQ (minimum 4.2.0) development package:
$ git clone https://github.com/zeromq/libzmq
$ cd libzmq
$ ./autogen.sh && ./configure && make -j 4
$ make check
$ sudo make install
$ sudo ldconfigNext install the Protobuf (minimum 3.0.0) development package:
$ sudo apt-get install autoconf automake libtool curl make g++ unzip
$ git clone https://github.com/google/protobuf
$ cd protobuf
$ ./autogen.sh
$ ./configure
$ make
$ make check
$ sudo make install
$ sudo ldconfigNext install the CMake (minimum 3.7.0-rc1) development package:
$ wget https://cmake.org/files/v3.7/cmake-3.7.0-rc1.tar.gz
$ tar -xvzf cmake-3.7.0-rc1.tar.gz
$ cd cmake-3.7.0-rc1
$ ./bootstrap
$ make
$ sudo make install
$ sudo ln -s /usr/local/bin/cmake /usr/bin/cmakeNext install bitprim/bitprim-core
Finally, install bitprim-protocol:
$ git clone https://github.com/bitprim/bitprim-protocol
$ cd bitprim-protocol
$ mkdir build
$ cd build
$ cmake .. -G "Unix Makefiles" -DWITH_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-std=c++11"
$ make
$ sudo make install
$ sudo ldconfigBitprim-protocol is now installed in /usr/local/.
Bitprim compiles with Clang on OSX and requires C++11 support. Installation has been verified using Clang based on LLVM 3.5. This version or newer should be installed as part of the Xcode command line tools.
To see your Clang/LLVM version:
$ clang++ --versionApple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix
If required update your version of the command line tools as follows:
$ xcode-select --installInstall the build system (Automake minimum 1.14) and wget:
$ brew install autoconf automake libtool pkgconfig wgetNext install the Boost (1.56.0 or newer) development package:
$ brew install boostNext install the ZeroMQ (minimum 4.2.0) development package:
$ git clone https://github.com/zeromq/libzmq
$ cd libzmq
$ ./autogen.sh && ./configure && make -j 4
$ make check
$ sudo make installNext install the Protobuf (minimum 3.0.0) development package:
$ brew install protobufNext install bitprim/bitprim-core
Finally, install bitprim-protocol:
$ git clone https://github.com/bitprim/bitprim-protocol
$ cd bitprim-protocol
$ mkdir build
$ cd build
$ cmake .. -DWITH_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-std=c++11"
$ make
$ sudo make installBitprim-protocol is now installed in /usr/local/.
TODO:Windows Install