美文网首页区块链学习笔记
How to build bitshares on Ubuntu

How to build bitshares on Ubuntu

作者: 杨小伟的世界 | 来源:发表于2018-05-22 11:23 被阅读0次

    Source

    build ubuntu

    Prerequisite

    sudo apt-get install cmake make libbz2-dev libdb++-dev libdb-dev libssl-dev openssl libreadline-dev autoconf libtool git automake libcurl4-openssl-dev
    

    Install gcc-4.9

    apt-get install software-properties-common
    sudo add-apt-repository ppa:ubuntu-toolchain-r/test
    sudo apt-get update
    sudo apt-get install gcc-4.9 g++-4.9
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9
    

    Install boost

    Failed to build it on a 1G ram machine.
    Switch to 4G and success.

    BOOST_ROOT=$HOME/opt/boost_1_57_0
    sudo apt-get update
    sudo apt-get install autotools-dev build-essential libbz2-dev libicu-dev python-dev
    wget -c 'http://sourceforge.net/projects/boost/files/boost/1.57.0/boost_1_57_0.tar.bz2/download' -O boost_1_57_0.tar.bz2
    [ $( sha256sum boost_1_57_0.tar.bz2 | cut -d ' ' -f 1 ) == "910c8c022a33ccec7f088bd65d4f14b466588dda94ba2124e78b8c57db264967" ] || ( echo 'Corrupt download' ; exit 1 )
    tar xjf boost_1_57_0.tar.bz2
    cd boost_1_57_0/
    ./bootstrap.sh "--prefix=$BOOST_ROOT"
    ./b2 install
    

    Build bitshare

    git clone --recurse-submodules https://github.com/RichardWeiYang/bitshares-core.git
    cd bitshares-core/
    cmake -DBOOST_ROOT="$BOOST_ROOT" -DCMAKE_BUILD_TYPE=Debug .
    make
    

    Setup NTP

    sudo timedatectl set-ntp false
    sudo apt-get install ntp
    

    Build on 16.04

    It is so easy to build on 16.04 -_-

    sudo apt-get install cmake make libbz2-dev libdb++-dev libdb-dev libssl-dev openssl libreadline-dev autoconf libtool git automake libcurl4-openssl-dev autotools-dev build-essential libbz2-dev libicu-dev python-dev libboost-all-dev
    
    git clone https://github.com/RichardWeiYang/bitshares-core.git
    cd bitshares-core/
    git submodule update --init --recursive
    
    cmake  -DCMAKE_BUILD_TYPE=Debug .
    make
    

    相关文章

      网友评论

        本文标题:How to build bitshares on Ubuntu

        本文链接:https://www.haomeiwen.com/subject/jekhjftx.html