Skip to content

Source Installation

shang edited this page Aug 21, 2020 · 25 revisions

Get source code

git clone https://github.com/bigbangcore/BigBang.git

Build

==========================================================

Ubuntu16.04/18.04

Required tools and libraries

sudo apt install -y g++ libboost-all-dev cmake openssl libreadline-dev pkg-config libncurses5-dev autoconf

# ubuntu16.04
sudo apt install -y libssl-dev
sudo apt cmake
wget https://github.com/Kitware/CMake/releases/download/v3.18.0/cmake-3.18.0-Linux-x86_64.sh
sh cmake-3.18.0-Linux-x86_64.sh

# ubuntu18.04
sudo apt install -y cmake libssl1.0-dev libprotobuf-dev protobuf-compiler

# Compile libsodium (version >= 1.0.18)
  wget https://github.com/jedisct1/libsodium/releases/download/1.0.18-RELEASE/libsodium-1.0.18.tar.gz --no-check-certificate
  tar -zxvf libsodium-1.0.18.tar.gz
  cd libsodium-1.0.18
  ./configure
  make -j8 && make check
  sudo make install


# Compile protobuf
  wget https://github.com/protocolbuffers/protobuf/releases/download/v3.11.3/protobuf-cpp-3.11.3.tar.gz
  tar -xzvf protobuf-cpp-3.11.3.tar.gz
  cd protobuf-3.11.3
  ./configure --prefix=/usr
  make -j8
  sudo make install

Ubuntu Build

cd BigBang
./INSTALL.sh
bigbang -help

CentOS 7

Required tools and libraries

sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install -y git cmake3 openssl-devel readline-devel gcc gcc-c++ ncurses-devel autoconf
sudo ln -s /usr/bin/cmake3 /usr/bin/cmake 

# download protobuf 3.0.0 and build it
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.0.0/protobuf-cpp-3.0.0.tar.gz
tar -xzvf protobuf-cpp-3.0.0.tar.gz
cd protobuf-3.0.0
./configure --prefix=/usr --libdir=/usr/lib64
make -j8
sudo make install

boost (version >= 1.58.0). If there is no boost or older version, you must download and compile from source ---> Download

# compile
cd boost
./bootstrap.sh
sudo ./b2 install

libsodium (version >= 1.0.18)

CentOS Build

cd BigBang
./INSTALL.sh
bigbang -help

CentOS 6.5

Required tools and libraries

protobuf (version >= 3.0.0)

libsodium (version >= 1.0.18)

boost (version >= 1.58.0). If there is no boost or older version, you must download and compile from source ---> Download

GCC

  • sudo yum install centos-release-scl-rh
  • sudo yum install -y devtoolset-7-gcc devtoolset-7-gcc-c++
  • echo "source /opt/rh/devtoolset-7/enable" >> /etc/bashrc
  • source /etc/bashrc

python2.7

  • yum install centos-release-scl-rh
  • yum install python27-python
  • echo "source /opt/rh/python27/enable" >> /etc/bashrc

CentOS Build

cd BigBang
./INSTALL.sh
bigbang -help

MacOSX

Required libraries

brew install cmake pkg-config openssl boost libsodium readline protobuf ncurses

cmake (version >= 3.5.1)

  • Test cmake version :
cmake --version

openssl (version >= 1.0)

  • Test openssl version :
`brew --prefix openssl`/bin/openssl version
  • If "no OPENSSL_ROOT_DIR" error occured, set enviroment variable :
echo "export OPENSSL_ROOT_DIR=`brew --prefix openssl`" >> ~/.bash_profile && . ~/.bash_profile

boost (version >= 1.58.0)

  • Test boost version :
grep "#define BOOST_VERSION" ${BOOST_ROOT}/include/boost/version.hpp
  • If "no BOOST_ROOT" error occured, set enviroment variable :
echo "export BOOST_ROOT=`brew --prefix boost`" >> ~/.bash_profile && . ~/.bash_profile

sodium (version >= 1.0.18)

  • Test sodium version :
pkg-config --exists libsodium && pkg-config --modversion libsodium
  • If no sodium error occured, set enviroment variable :
echo "export PKG_CONFIG_PATH=`brew --prefix libsodium`/lib/pkgconfig:\${PKG_CONFIG_PATH}" >> ~/.bash_profile && . ~/.bash_profile

readline (version >= 6.0)

  • Test readline version :
grep "#define RL_READLINE_VERSION" `brew --prefix readline`/include/readline/readline.h
  • If occured error "rl_xxxx", try :
brew link --force readline

protobuf (version >= 3.0.0)

  • Test protobuf version :
protoc --version

MacOSX Build

cd BigBang
./INSTALL.sh
bigbang -help

Windows 10

There two manners to install BigBang source code on Windows 10.

Cygwin

Required tools and libraries

cygwin install

package choose as follows(click to choose the default version): 
  • cmake 3.14.5-1
  • gcc-g++ 7.4.0-1
  • libboost-devel 1.66.0-1
  • libprotobuf-devel 3.7.1-1
  • libreadline-devel 7.0.3-3
  • libsodium-devel 1.0.18-1
  • libssl-devel 1.1.1c-1
  • make 4.2.1-2
  • python2 2.7.16-1
  • git 2.21.0-1

Windows Build

git clone https://github.com/bigbangcore/BigBang.git

cd BigBang
mkdir build
cd build
cmake ..
make bigbang
cd src/bigbang
./bigbang help

Visual Studio 2019

Install Visual Studio 2019

Download from the official website of VS2019

Install vcpkg

This is a VC++ package manager tool. Other tools and libraries support installed by vcpkg or natived Installation of vcpkg see vcpkg

Set system environment variables(If the installation path is "D:\vchpkg"):

[Environment]::SetEnvironmentVariable("vcpkg_ROOT", "D:\vcpkg", "User")

Install boost

vcpkg.exe install boost:x64-windows

Install libsodium

vcpkg.exe install libsodium:x64-windows

Install openssl

vcpkg.exe install openssl:x64-windows

Install protobuf

vcpkg.exe install protobuf:x64-windows

Install readline

vcpkg.exe install readline-win32:x64-windows

Install python

If no python.exe in $PATH, type python.exe in PowerShell to install python from Microsoft Store.

Clone source code of BigBang

In vs2019, clone BigBang source code https://github.com/bigbangcore/BigBang.git

Install BigBang

There are two ways to install BigBang.

  • Install by command-line
  • Install in Visual Studio
Install by command-line
  • Open x64 Native Tools Command Prompt for VS 2019
  • Go to the BigBang folder.
  • Run INSTALL.bat
  • If no error, run build\bin\bigbang.exe -help
Install in Visual Studio
  • Open BigBang folder in Visual Studio
  • Project - Generate Cache for Bigbang
  • Build - Build all
  • If no error, run out\build\x64-Debug\src\bigbang\bigbang.exe -help
  • If generate with release mode, Project - Cmake Setting for Bigbang - Add a x64-Release mode
Clone this wiki locally