fixing build errors (#150)

* fixing build errors

vest type correction

* fixing build errors

vest type correction

* fixes 

new Dockerfile

* vesting_balance_type correction

vesting_balance_type changed to normal

* gcc5 support to Dockerfile

gcc5 support to Dockerfile
This commit is contained in:
Bobinson K B 2019-09-26 11:41:28 -04:00 committed by GitHub
parent db01f313e5
commit 7fae375e0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 51 additions and 29 deletions

View file

@ -1,44 +1,66 @@
FROM phusion/baseimage:0.9.19
FROM ubuntu:18.04
MAINTAINER PeerPlays Blockchain Standards Association
ENV LANG=en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV LC_ALL en_US.UTF-8
RUN \
apt-get update -y && \
apt-get install -y \
g++ \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
autoconf \
cmake \
git \
libbz2-dev \
libreadline-dev \
libboost-all-dev \
libcurl4-openssl-dev \
libssl-dev \
libncurses-dev \
doxygen \
gcc-5 \
g++-5 \
bash \
build-essential \
ca-certificates \
cmake \
doxygen \
git \
graphviz \
libbz2-dev \
libcurl4-openssl-dev \
libncurses-dev \
libreadline-dev \
libssl-dev \
libtool \
locales \
ntp \
pkg-config \
wget \
&& \
apt-get update -y && \
apt-get install -y fish && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN \
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen
# Compile Boost
RUN \
BOOST_ROOT=$HOME/boost_1_67_0 && \
wget -c 'http://sourceforge.net/projects/boost/files/boost/1.67.0/boost_1_67_0.tar.gz/download' -O boost_1_67_0.tar.gz &&\
tar -zxvf boost_1_67_0.tar.gz && \
cd boost_1_67_0/ && \
./bootstrap.sh "--prefix=$BOOST_ROOT" && \
./b2 install && \
cd ..
ADD . /peerplays-core
WORKDIR /peerplays-core
# Compile
# Compile Peerplays
RUN \
( git submodule sync --recursive || \
find `pwd` -type f -name .git | \
while read f; do \
rel="$(echo "${f#$PWD/}" | sed 's=[^/]*/=../=g')"; \
sed -i "s=: .*/.git/=: $rel/=" "$f"; \
done && \
git submodule sync --recursive ) && \
BOOST_ROOT=$HOME/boost_1_67_0 && \
export CC=gcc-5 ; export CXX=g++-5\
git submodule update --init --recursive && \
mkdir build && \
mkdir build/release && \
cd build/release && \
cmake \
-DBOOST_ROOT="$BOOST_ROOT" \
-DCMAKE_BUILD_TYPE=Release \
. && \
../.. && \
make witness_node cli_wallet && \
install -s programs/witness_node/witness_node programs/cli_wallet/cli_wallet /usr/local/bin && \
#

View file

@ -1560,7 +1560,7 @@ BOOST_AUTO_TEST_CASE( vesting_balance_create_test )
op.amount = test_asset.amount( 100 );
//op.vesting_seconds = 60*60*24;
op.policy = cdd_vesting_policy_initializer{ 60*60*24 };
op.balance_type == vesting_balance_type::unspecified;
op.balance_type == vesting_balance_type::normal;
// Fee must be non-negative
REQUIRE_OP_VALIDATION_SUCCESS( op, fee, core.amount(1) );
@ -1580,7 +1580,7 @@ BOOST_AUTO_TEST_CASE( vesting_balance_create_test )
op.creator = alice_account.get_id();
op.owner = alice_account.get_id();
op.balance_type = vesting_balance_type::unspecified;
op.balance_type = vesting_balance_type::normal;
account_id_type nobody = account_id_type(1234);
@ -1651,7 +1651,7 @@ BOOST_AUTO_TEST_CASE( vesting_balance_withdraw_test )
create_op.owner = owner;
create_op.amount = amount;
create_op.policy = cdd_vesting_policy_initializer(vesting_seconds);
create_op.balance_type = vesting_balance_type::unspecified;
create_op.balance_type = vesting_balance_type::normal;
tx.operations.push_back( create_op );
set_expiration( db, tx );

View file

@ -1312,7 +1312,7 @@ BOOST_AUTO_TEST_CASE(zero_second_vbo)
create_op.owner = alice_id;
create_op.amount = asset(500);
create_op.policy = pinit;
create_op.balance_type = vesting_balance_type::unspecified;
create_op.balance_type = vesting_balance_type::normal;
signed_transaction create_tx;
create_tx.operations.push_back( create_op );
@ -1396,7 +1396,7 @@ BOOST_AUTO_TEST_CASE( vbo_withdraw_different )
create_op.owner = alice_id;
create_op.amount = asset(100, stuff_id);
create_op.policy = pinit;
create_op.balance_type = vesting_balance_type::unspecified;
create_op.balance_type = vesting_balance_type::normal;
signed_transaction create_tx;
create_tx.operations.push_back( create_op );