-
Notifications
You must be signed in to change notification settings - Fork 0
/
3rdparty_install.sh
executable file
·232 lines (200 loc) · 6.13 KB
/
3rdparty_install.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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
set -ef
export CPP_STANDARD="17"
export AVRO_VER="release-1.10.0"
export AWS_SDK_VER="1.7.220"
export GRPC_VER="v1.32.0"
#export NLOHMANN_JSON_VER="3.7.1"
#deps for arrow
export DOUBLE_CONVERSION_VER="v3.1.5"
export BROTLI_VER="v1.0.7"
export FLATBUFFERS_VER="v1.11.0"
export THRIFT_VER="0.12.0"
export RAPIDJSON_VER="v1.1.0"
export ARROW_VER="apache-arrow-1.0.1"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
rm -rf tmp
mkdir tmp
cd tmp
#export BOOST_B2_LIBS="--with-program_options --with-thread --with-iostreams --with-filesystem --with-regex --with-system --with-date_time --with-chrono --with-test"
#wget -O boost.tar.gz "https://dl.bintray.com/boostorg/release/1.70.0/source/boost_1_70_0.tar.gz" && \
#mkdir -p boost && \
#tar \
# --extract \
# --file boost.tar.gz \
# --directory boost \
# --strip-components 1
#cd boost
#./bootstrap.sh
#./b2 cxxstd=$CPP_STANDARD $BOOST_B2_LIBS -j "$(getconf _NPROCESSORS_ONLN)" stage
#sudo ./b2 cxxstd=$CPP_STANDARD $BOOST_B2_LIBS install
#cd ..
wget -O avro.tar.gz "https://github.com/apache/avro/archive/$AVRO_VER.tar.gz"
mkdir -p avro
tar \
--extract \
--file avro.tar.gz \
--directory avro \
--strip-components 1
sed -i.bak1 's/-std=c++11/-std=c++17/g' avro/lang/c++/CMakeLists.txt
sed -i.bak2 '/regex system)/a SET(Boost_LIBRARIES boost_program_options boost_iostreams boost_filesystem boost_regex boost_system z bz2)' avro/lang/c++/CMakeLists.txt
cat avro/lang/c++/CMakeLists.txt
cd avro/lang/c++/
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_STANDARD=$CPP_STANDARD ..
make -j "$(getconf _NPROCESSORS_ONLN)"
sudo make install
cd ../../../..
git clone --recursiv --depth 1 --branch $GRPC_VER https://github.com/grpc/grpc.git
cd grpc
mkdir build && cd build
cmake ..
make -j "$(getconf _NPROCESSORS_ONLN)" && \
sudo make install && \
cd ../..
wget -O aws-sdk.tar.gz "https://github.com/aws/aws-sdk-cpp/archive/$AWS_SDK_VER.tar.gz" && \
mkdir -p aws-sdk && \
tar \
--extract \
--file aws-sdk.tar.gz \
--directory aws-sdk \
--strip-components 1
cd aws-sdk
mkdir build-shared
cd build-shared
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBUILD_ONLY="config;s3;transfer" -DENABLE_TESTING=OFF -DCPP_STANDARD=$CPP_STANDARD ..
make -j "$(getconf _NPROCESSORS_ONLN)"
sudo make install
cd ..
mkdir build-static
cd build-static
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DBUILD_ONLY="config;s3;transfer" -DENABLE_TESTING=OFF -DCPP_STANDARD=$CPP_STANDARD ..
make -j "$(getconf _NPROCESSORS_ONLN)"
sudo make install
cd ..
cd ..
wget -O double-conversion.tar.gz "https://github.com/google/double-conversion/archive/$DOUBLE_CONVERSION_VER.tar.gz" && \
mkdir -p double-conversion && \
tar \
--extract \
--file double-conversion.tar.gz \
--directory double-conversion \
--strip-components 1
cd double-conversion
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_STANDARD=$CPP_STANDARD ..
make -j "$(getconf _NPROCESSORS_ONLN)"
sudo make install
cd ../..
wget -O brotli.tar.gz "https://github.com/google/brotli/archive/$BROTLI_VER.tar.gz" && \
mkdir -p brotli && \
tar \
--extract \
--file brotli.tar.gz \
--directory brotli \
--strip-components 1
cd brotli
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_STANDARD=$CPP_STANDARD ..
make -j "$(getconf _NPROCESSORS_ONLN)"
sudo make install
cd ../..
wget -O flatbuffers.tar.gz "https://github.com/google/flatbuffers/archive/$FLATBUFFERS_VER.tar.gz" && \
mkdir -p flatbuffers && \
tar \
--extract \
--file flatbuffers.tar.gz \
--directory flatbuffers \
--strip-components 1
cd flatbuffers
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DFLATBUFFERS_BUILD_TESTS=OFF -DCMAKE_CXX_STANDARD=$CPP_STANDARD ..
make -j "$(getconf _NPROCESSORS_ONLN)"
sudo make install
cd ../..
wget -O thrift.tar.gz "https://github.com/apache/thrift/archive/$THRIFT_VER.tar.gz" && \
mkdir -p thrift && \
tar \
--extract \
--file thrift.tar.gz \
--directory thrift \
--strip-components 1 && \
cd thrift && \
mkdir -p build && cd build && \
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_STANDARD=$CPP_STANDARD -DBUILD_JAVA=OFF -DBUILD_PYTHON=OFF -DBUILD_TESTING=OFF -DBUILD_TUTORIALS=OFF .. && \
make -j "$(getconf _NPROCESSORS_ONLN)" && \
sudo make install && \
cd ../..
#wget -O nlomann.tar.gz "https://github.com/nlohmann/json/archive/v$NLOHMANN_JSON_VER.tar.gz" && \
#mkdir -p nlomann && \
#tar \
# --extract \
# --file nlomann.tar.gz \
# --directory nlomann \
# --strip-components 1 && \
#cd nlomann && \
#mkdir build && cd build
#cmake ..
#make -j "$(getconf _NPROCESSORS_ONLN)" && \
#sudo make install && \
#cd ../..
wget -O rapidjson.tar.gz "https://github.com/miloyip/rapidjson/archive/$RAPIDJSON_VER.tar.gz" && \
mkdir -p rapidjson && \
tar \
--extract \
--file rapidjson.tar.gz \
--directory rapidjson \
--strip-components 1 && \
cd rapidjson && \
mkdir build && \
cd build && \
cmake -DRAPIDJSON_BUILD_EXAMPLES=OFF -DRAPIDJSON_BUILD_DOC=OFF -DRAPIDJSON_BUILD_TESTS=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_STANDARD=$CPP_STANDARD .. && \
sudo make install && \
sudo rm -rf /usr/local/share/doc/RapidJSON && \
cd ../..
wget -O arrow.tar.gz "https://github.com/apache/arrow/archive/$ARROW_VER.tar.gz" && \
mkdir -p arrow && \
tar \
--extract \
--file arrow.tar.gz \
--directory arrow \
--strip-components 1
cd arrow/cpp
mkdir build
cd build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DARROW_DEPENDENCY_SOURCE=SYSTEM \
-DCMAKE_CXX_STANDARD=$CPP_STANDARD \
-DARROW_BUILD_UTILITIES=ON \
-DARROW_CUDA=OFF \
-DARROW_GANDIVA=ON \
-DARROW_WITH_BZ2=ON \
-DARROW_WITH_ZLIB=ON \
-DARROW_WITH_ZSTD=ON \
-DARROW_WITH_LZ4=ON \
-DARROW_WITH_SNAPPY=ON \
-DARROW_WITH_BROTLI=ON \
-DARROW_COMPUTE=ON \
-DARROW_JEMALLOC=ON \
-DARROW_CSV=ON \
-DARROW_DATASET=ON \
-DARROW_FILESYSTEM=ON \
-DARROW_JSON=ON \
-DARROW_PARQUET=ON \
-DARROW_PLASMA=ON \
-DARROW_PYTHON=OFF \
-DARROW_S3=ON \
-DARROW_USE_GLOG=ON \
-DPARQUET_BUILD_EXECUTABLES=ON \
-DPARQUET_BUILD_EXAMPLES=ON \
..
make -j "$(getconf _NPROCESSORS_ONLN)"
sudo make install
cd ../..
#out of tmp
cd ..
rm -rf tmp