Compile Node through Github
Dependencies
- Boost 1.70 or newer
- Compiler supporting C++17
- Cmake 3.11 or newer
- Apache Thrift
Berkeley DB uses Free Software Foundation's autoconf and libtool tools for compilation on UNIX-like platforms.
Windows Compilation Instruction
git clone
https://github.com/CREDITSCOM/node.git
cd node
git submodule update --init --recursive
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -A x64 ..
cmake --build . --target ALL_BUILD --config Release
Linux Compilation Instruction
Update repos and install required package
$ sudo apt
update
$ apt upgrade
-y
$ sudo apt install
build-essential libssl-dev autoconf -y
$ sudo apt install
flex bison libtool -y
Create build directory
$ mkdir
csbuild
$ cd
csbuild
Update gcc g++
$ sudo apt install
gcc-8 g++-8 -y
$ sudo update-alternatives
--install /usr/bin/gcc gcc /usr/bin/gcc-8 80 --slave /usr/bin/g++ g++ /usr/bin/g++-8 --slave /usr/bin/gcov gcov /usr/bin/gcov-8
$ gcc --version
gcc (Ubuntu 8.4.0-1ubuntu1~18.04) 8.4.0
Update cmake to latest version
$ wget
-c https://github.com/Kitware/CMake/releases/download/v3.17.0/cmake-3.17.0.tar.gz
$ tar
zxfv cmake-3.17.0.tar.gz
$ cd
cmake-3.17.0
$./bootstrap
$ make
$ sudo make install
$ cd
Install boost
wget -c $https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_
72_0.tar.gztar zxfv boost_1_
72_0.tar.gz$cd boost_1_
72_0$./bootstrap.sh
$./b2 --build-type=complete link=static threading=multi $runtime-link=static --layout=tagged install --prefix=../boost
$export PATH=~/csbuild/boost:$PATH
$export BOOST_ROOT=~/csbuild/boost
$cd ..
Build node
git clone
https://github.com/CREDITSCOM/node.git
cd node
git submodule update --init --recursive
mkdir build
cd build
cmake
-DCMAKE_CXX_ FLAGS=-DMONITOR_NODE -DCMAKE_ BUILD_TYPE=Release ..
make
-j2