forked from vmware/concord-bft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_deps.sh
executable file
·172 lines (157 loc) · 4.91 KB
/
install_deps.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
#!/bin/bash
# This script installs and builds all the tools needed for building and running Concord-BFT
# It is used for building a docker image that is used by CI/CD and may be used in the
# development environment.
# If you prefer working w/o docker at your dev station just run the script with sudo.
# If you need to add any tool or dependency this is the right place to do it.
# Please bear in mind that we want to keep our list of dependencies as small as possible.
set -e
APT_GET_FLAGS="-y --no-install-recommends"
WGET_FLAGS="--no-check-certificate -q"
# Install tools
apt-get update && apt-get ${APT_GET_FLAGS} install \
autoconf \
automake \
build-essential \
ccache \
clang \
clang-format-9 \
clang-tidy-10 \
cmake \
gdb \
gdbserver \
git \
iptables \
openssl \
parallel \
pkg-config \
python3-pip \
python3-setuptools \
sudo \
vim \
wget
ln -fs /usr/bin/clang-format-9 /usr/bin/clang-format
ln -fs /usr/bin/clang-format-diff-9 /usr/bin/clang-format-diff
# Install 3rd parties
apt-get ${APT_GET_FLAGS} install \
libboost-filesystem1.65-dev \
libboost-system1.65-dev \
libboost1.65-dev \
libbz2-dev \
libgmp3-dev \
liblz4-dev \
libs3-dev \
libsnappy-dev \
libssl-dev \
libtool \
libz-dev \
libzstd-dev
pip3 install --upgrade wheel && pip3 install --upgrade trio
pip3 install \
eliot eliot-tree \
tatsu==4.4.0 \
pytest
# Build 3rd parties
cd ${HOME}
wget ${WGET_FLAGS} \
https://github.com/HdrHistogram/HdrHistogram_c/archive/0.9.12.tar.gz && \
tar -xzf 0.9.12.tar.gz && \
rm 0.9.12.tar.gz && \
cd HdrHistogram_c-0.9.12 && \
mkdir build && cd build && \
cmake .. && \
make -j$(nproc) && \
make install && \
cd ${HOME} && \
rm -r HdrHistogram_c-0.9.12
cd ${HOME}
wget ${WGET_FLAGS} \
https://github.com/log4cplus/log4cplus/releases/download/REL_2_0_4/log4cplus-2.0.4.tar.gz && \
tar -xzf log4cplus-2.0.4.tar.gz && \
rm log4cplus-2.0.4.tar.gz && \
cd log4cplus-2.0.4 && \
autoreconf -f -i && \
./configure CXXFLAGS="--std=c++11 -march=x86-64 -mtune=generic" \
--enable-static && \
make -j$(nproc) && \
make install && \
cd ${HOME} && \
rm -r log4cplus-2.0.4
cd ${HOME}
git clone https://github.com/google/googletest.git && \
cd googletest && \
git checkout e93da23920e5b6887d6a6a291c3a59f83f5b579e && \
mkdir _build && cd _build && \
cmake -DCMAKE_CXX_FLAGS="-std=c++11 -march=x86-64 -mtune=generic" .. && \
make -j$(nproc) && \
make install && \
cd ${HOME} && \
rm -r googletest
cd ${HOME}
wget ${WGET_FLAGS} \
https://github.com/weidai11/cryptopp/archive/CRYPTOPP_8_2_0.tar.gz && \
tar -xzf CRYPTOPP_8_2_0.tar.gz && \
rm CRYPTOPP_8_2_0.tar.gz && \
cd cryptopp-CRYPTOPP_8_2_0 && \
CXX_FLAGS="-march=x86-64 -mtune=generic" make -j$(nproc) && \
make install && \
cd ${HOME} && \
rm -r cryptopp-CRYPTOPP_8_2_0
cd ${HOME}
git clone https://github.com/relic-toolkit/relic && \
cd relic && \
git checkout 0998bfcb6b00aec85cf8d755d2a70d19ea3051fd && \
mkdir build && \
cd build && \
cmake -DALLOC=AUTO -DWSIZE=64 \
-DWORD=64 -DRAND=UDEV \
-DSHLIB=ON -DSTLIB=ON \
-DSTBIN=OFF -DTIMER=HREAL \
-DCHECK=on -DVERBS=on \
-DARITH=x64-asm-254 -DFP_PRIME=254 \
-DFP_METHD="INTEG;INTEG;INTEG;MONTY;LOWER;SLIDE" \
-DCOMP="-O3 -funroll-loops -fomit-frame-pointer -finline-small-functions -march=x86-64 -mtune=generic" \
-DFP_PMERS=off -DFP_QNRES=on \
-DFPX_METHD="INTEG;INTEG;LAZYR" -DPP_METHD="LAZYR;OATEP" .. && \
make -j$(nproc) && \
make install && \
cd ${HOME} && \
rm -r relic
cd ${HOME}
wget ${WGET_FLAGS} \
https://github.com/facebook/rocksdb/archive/v6.8.1.tar.gz && \
tar -xzf v6.8.1.tar.gz && \
rm v6.8.1.tar.gz && \
cd rocksdb-6.8.1 && \
PORTABLE=1 make -j$(nproc) USE_RTTI=1 shared_lib && \
PORTABLE=1 make install-shared && \
cd ${HOME} && \
rm -r rocksdb-6.8.1
cd ${HOME}
git clone https://github.com/emil-e/rapidcheck.git && \
cd rapidcheck && \
git checkout 258d907da00a0855f92c963d8f76eef115531716 && \
mkdir build && cd build && \
cmake -DRC_ENABLE_GTEST=ON -DRC_ENABLE_GMOCK=ON .. && \
make -j$(nproc) && \
make install && \
cd ${HOME} && \
rm -r rapidcheck
# In order to be compatible with the native build
cd ${HOME}
wget ${WGET_FLAGS} \
https://dl.min.io/server/minio/release/linux-amd64/minio && \
chmod 755 ${HOME}/minio
cd ${HOME}
wget ${WGET_FLAGS} \
https://github.com/opentracing/opentracing-cpp/archive/v1.5.0.tar.gz && \
tar -xzf v1.5.0.tar.gz && \
rm v1.5.0.tar.gz && \
cd opentracing-cpp-1.5.0 && \
mkdir build && \
cd build && \
cmake .. && \
make -j$(nproc) && \
make install && \
cd ../.. && \
rm -r opentracing-cpp-1.5.0