Giter Club home page Giter Club logo

libbyz-go's Introduction

libbyz-go

封装libbyz库,暴露出几个go接口以供调用。bft下是原libbyz库,client下是封装好的client端的接口,replica下是封装好的replica端的接口。

libbyz编译安装

在Ubuntu 16.04, gcc-5.4.0的环境下测试通过。

具体配置过程如下。

sudo apt-get install -y automake autoconf
sudo apt-get install -y gcc g++
sudo apt-get install -y libgmp-dev
sudo apt-get install -y libtool
sudo apt-get install -y flex bison
sudo apt-get install -y make

cd bft/sfslite-1.2
autoreconf -i
sh -x setup.gnu -f -i -s
mkdir install
SFSHOME=./bft/sfslite-1.2
./configure --prefix=$SFSHOME/install
make CFLAGS="-Werror=strict-aliasing" CXXFLAGS="-fpermissive -DHAVE_GMP_CXX_OPS"
make install

cd bft
ln -s sfslite-1.2/install sfs
ln -s /usr/lib gmp

cd bft/libbyz
sed -i '418s/^.*$/  th_assert(sizeof(t.tv_sec) <= sizeof(long), "tv_sec is too big");/' Node.cc
sed -i '420s/^.*$/  long int_bits = sizeof(long)*8;/' Node.cc
make CPPFLAGS="-I../gmp -I../sfs/include/sfslite -g -Wall -DRECOVERY -fpermissive -DHAVE_GMP_CXX_OPS"

(go demo: 运行replica,需要配置好config里的IP地址)
go build test.go
./test

libbyz-go's People

Contributors

33cn avatar chasingegg avatar

Stargazers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.