Skip to content

source installation

Hantao Sun edited this page Jan 10, 2019 · 34 revisions

Get source code

Build

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

Ubuntu16.04/18.04

Required tools and libraries

sudo apt install -y g++ libboost-all-dev cmake openssl libreadline-dev pkg-config libsodium-dev mysql-server libmysqld-dev

# ubuntu16.04
sudo apt install -y libssl-dev
# ubuntu18.04
sudo apt install -y libssl1.0-dev

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

Ubuntu Build

cd FnFnCoreWallet
./INSTALL.sh
./multiverse -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 libsodium-devel gcc gcc-c++ mysql-community-server mysql-community-devel
sudo ln -s /usr/bin/cmake3 /usr/bin/cmake 

# download protobuf 3.3.0 and build it
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.3.0/protobuf-cpp-3.3.0.tar.gz
tar -xzvf protobuf-cpp-3.3.0.tar.gz
cd protobuf-3.3.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

MySQL (version >= 5.7.20). If there is no mysql or older version

CentOS Build

cd FnFnCoreWallet
./INSTALL.sh
./multiverse -help

CentOS 6.5

Required tools and libraries

protobuf (version >= 3.3.0)

libsodium-devel (version >= 1.0.8)

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

MySQL (version >= 5.7.20). If there is no mysql or older version

  • sudo yum remove mysql*
  • wget dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
  • sudo yum install mysql-community-release-el6-5.noarch.rpm
  • sudo vim /etc/yum.repos.d/mysql-community.repo
[mysql...]
enabled=0
[mysql57-community-dmr]
enabled=1
  • sudo yum install -y mysql-community-server mysql-community-devel
  • sudo rm -rf /var/lib/mysql
  • mysqld --initialize --user=mysql
  • service mysqld start

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 FnFnCoreWallet
./INSTALL.sh
./multiverse -help

MacOSX

Required libraries

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

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

MySQL (version >= 5.7.20)

  • Test mysql version :
mysql --version

sodium (version >= 1.0.8)

  • Test sodium version :
pkg-config --exists libsodium && pkg-config --version 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.3.0)

  • Test protobuf version :
protoc --version

MacOSX Build

cd FnFnCoreWallet
./INSTALL.sh
./multiverse -help

Windows 10 (mingw-w64)(Not support now)

Required tools and libraries

cmake (version >= 3.5.1)

mingw-w64

  • Download the newest version
  • If mingw-w64 is extracted to c:\mingw64
  • Set c:\mingw64\bin, C:\mingw64\opt\bin to system environment Path

openssl (contained in mingw-w64)

readline (contained in mingw-w64)

boost (version >= 1.58.0)

  • Download source code
  • For example, boost is extracted to c:\boost, compile script:
 cd c:\boost
 bootstrap gcc
 b2 -j8 --build-dir=.\tmp --build-type=complete --layout=tagged address-model=64 threading=multi toolset=gcc stage --stagedir=.\
  • Set C:\boost to system environment BOOST_ROOT

mysql (version >= 5.7.20)

  • Download the installer.
  • Set C:\Progra~1\MySQL\MySQLS~1.0\lib to system environment Path by default.

sodium (version >= 1.0.8)

  • Download the installer.
  • If sodium is extracted to C:\libsodium
  • Set C:\libsodium\bin to system environment Path

Windows Build

command-line

cd FnFnCoreWallet
INSTALL.bat
multiverse.exe -help

Visual Studio 2017 (cmake tools installed)

  • Set C:\boost, C:\Progra~1\MySQL\MySQLS~1.0, C:\libsodium to system environment Path
  • Add c:\mingw64 to new system environment MINGW64_ROOT
  • In vs2017, File->Open->Folder, choose FnFnCoreWallet
  • CMake->Change CMake Setting, select Mingw64-Release/Mingw64-Debug, change CMakeSettings.json:
"MINGW64_ROOT": "C:\\mingw64",
"generator": "MinGW Makefiles",
"buildRoot": "${workspaceRoot}\\build",
"installRoot": "${workspaceRoot}",
"buildCommandArgs": "",
build\src\multiverse.exe -help
Clone this wiki locally