Skip to content

BUILD_CENTOS7

albert edited this page Mar 19, 2019 · 7 revisions

CentOS7 Build and Install Instructions

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

Download gxb-core SourceCode

git clone https://github.com/gxchain/gxb-core ;
cd gxb-core && git checkout master ;
git submodule update --init --recursive ;

Setup Develop ENV

cd gxb-core ;
export LANG=en_US.UTF-8 ;
bash ./script/gxchain_setup_dev_env_centos.sh ;

Start Compile gxb-core

CentOS7下编译非常吃内存,请保证至少8G内存并且最多不能超过2个编译进程(make -j2),内存16G可以 make -j4
export LLVM_DIR=${HOME}/opt/wasm/lib/cmake/llvm ;
export BOOST_ROOT=${HOME}/opt/boost ;
mkdir build && cd build ;
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-7/root/bin/g++ -DCMAKE_C_COMPILER=/opt/rh/devtoolset-7/root/bin/gcc -DWASM_ROOT=${HOME}/opt/wasm  -DOPENSSL_ROOT_DIR=/usr/include/openssl .. ;
make -j1 ;