forked from heavyai/heavydb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mapd-deps-ubuntu.sh
executable file
·238 lines (211 loc) · 5.56 KB
/
mapd-deps-ubuntu.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
230
231
232
233
234
235
236
237
238
#!/usr/bin/env bash
set -e
set -x
HTTP_DEPS="https://dependencies.mapd.com/thirdparty"
SUFFIX=${SUFFIX:=$(date +%Y%m%d)}
PREFIX=/usr/local/mapd-deps
SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $SCRIPTS_DIR/common-functions.sh
sudo mkdir -p $PREFIX
sudo chown -R $(id -u) $PREFIX
sudo apt update
sudo apt install -y \
build-essential \
ccache \
cmake \
cmake-curses-gui \
git \
wget \
curl \
clang \
libclang-dev \
llvm \
llvm-dev \
clang-format \
gcc \
g++ \
libboost-all-dev \
libgoogle-glog-dev \
golang \
libssl-dev \
libevent-dev \
default-jre \
default-jre-headless \
default-jdk \
default-jdk-headless \
maven \
libncurses5-dev \
libldap2-dev \
binutils-dev \
google-perftools \
libdouble-conversion-dev \
libevent-dev \
libgflags-dev \
libgoogle-perftools-dev \
libiberty-dev \
libjemalloc-dev \
libglu1-mesa-dev \
liblz4-dev \
liblzma-dev \
libbz2-dev \
libarchive-dev \
libcurl4-openssl-dev \
uuid-dev \
libsnappy-dev \
zlib1g-dev \
autoconf \
autoconf-archive \
automake \
bison \
flex-old \
libpng-dev \
rsync \
unzip \
jq \
python-yaml \
libxerces-c-dev \
libxmlsec1-dev
# Needed to find xmltooling and xml_security_c
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PREFIX/lib64/pkgconfig:$PKG_CONFIG_PATH
# GEO STUFF
# expat
download_make_install https://github.com/libexpat/libexpat/releases/download/R_2_2_5/expat-2.2.5.tar.bz2
# kml
download ${HTTP_DEPS}/libkml-master.zip
unzip -u libkml-master.zip
pushd libkml-master
./autogen.sh || true
CXXFLAGS="-std=c++03" ./configure --with-expat-include-dir=$PREFIX/include/ --with-expat-lib-dir=$PREFIX/lib --prefix=$PREFIX --enable-static --disable-java --disable-python --disable-swig
makej
make install
popd
# proj.4
download_make_install ${HTTP_DEPS}/proj-5.2.0.tar.gz
# gdal
download_make_install ${HTTP_DEPS}/gdal-2.3.2.tar.xz "" "--without-geos --with-libkml=$PREFIX --with-proj=$PREFIX"
# install AWS core and s3 sdk
install_awscpp -j $(nproc)
VERS=0.11.0
wget --continue http://apache.claz.org/thrift/$VERS/thrift-$VERS.tar.gz
tar xvf thrift-$VERS.tar.gz
pushd thrift-$VERS
CFLAGS="-fPIC" CXXFLAGS="-fPIC" JAVA_PREFIX=$PREFIX/lib ./configure \
--with-lua=no \
--with-python=no \
--with-php=no \
--with-ruby=no \
--with-qt4=no \
--with-qt5=no \
--prefix=$PREFIX
make -j $(nproc)
make install
popd
#c-blosc
VERS=1.14.4
wget --continue https://github.com/Blosc/c-blosc/archive/v$VERS.tar.gz
tar xvf v$VERS.tar.gz
BDIR="c-blosc-$VERS/build"
rm -rf "$BDIR"
mkdir -p "$BDIR"
pushd "$BDIR"
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DBUILD_BENCHMARKS=off \
-DBUILD_TESTS=off \
-DPREFER_EXTERNAL_SNAPPY=off \
-DPREFER_EXTERNAL_ZLIB=off \
-DPREFER_EXTERNAL_ZSTD=off \
..
make -j $(nproc)
make install
popd
VERS=2018.05.07.00
wget --continue https://github.com/facebook/folly/archive/v$VERS.tar.gz
tar xvf v$VERS.tar.gz
pushd folly-$VERS/folly
/usr/bin/autoreconf -ivf
./configure --prefix=$PREFIX
make -j $(nproc)
make install
popd
VERS=1.21-45
wget --continue https://github.com/jarro2783/bisonpp/archive/$VERS.tar.gz
tar xvf $VERS.tar.gz
pushd bisonpp-$VERS
./configure --prefix=$PREFIX
make -j $(nproc)
make install
popd
# Apache Arrow (see common-functions.sh)
ARROW_BOOST_USE_SHARED="ON"
install_arrow
VERS=3.0.2
wget --continue https://github.com/cginternals/glbinding/archive/v$VERS.tar.gz
tar xvf v$VERS.tar.gz
mkdir -p glbinding-$VERS/build
pushd glbinding-$VERS/build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DOPTION_BUILD_DOCS=OFF \
-DOPTION_BUILD_EXAMPLES=OFF \
-DOPTION_BUILD_GPU_TESTS=OFF \
-DOPTION_BUILD_TESTS=OFF \
-DOPTION_BUILD_TOOLS=OFF \
-DOPTION_BUILD_WITH_BOOST_THREAD=OFF \
..
make -j $(nproc)
make install
popd
# glslang (with spirv-tools)
VERS=7.9.2888 # 8/13/18
rm -rf glslang
mkdir -p glslang
pushd glslang
wget --continue https://github.com/KhronosGroup/glslang/archive/$VERS.tar.gz
tar xvf $VERS.tar.gz
pushd glslang-$VERS
./update_glslang_sources.py
mkdir build
pushd build
cmake \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
..
make -j $(nproc)
make install
popd # build
popd # glslang-$VERS
popd # glslang
# Vulkan
VERS=1.1.82.1 # 8/20/18
rm -rf vulkan
mkdir -p vulkan
pushd vulkan
wget --continue https://vulkan.lunarg.com/sdk/download/$VERS/linux/vulkansdk-linux-x86_64-$VERS.tar.gz?Human=true -O vulkansdk-linux-x86_64-$VERS.tar.gz
tar xvf vulkansdk-linux-x86_64-$VERS.tar.gz
rsync -av $VERS/x86_64/* $PREFIX
popd # vulkan
# OpenSAML
download_make_install ${HTTP_DEPS}/xml-security-c-2.0.0.tar.gz "" "--without-xalan"
download_make_install ${HTTP_DEPS}/xmltooling-3.0.2-nolog4shib.tar.gz
download_make_install ${HTTP_DEPS}/opensaml-3.0.0-nolog4shib.tar.gz
cat > $PREFIX/mapd-deps.sh <<EOF
PREFIX=$PREFIX
LD_LIBRARY_PATH=/usr/local/cuda/lib64:\$LD_LIBRARY_PATH
LD_LIBRARY_PATH=\$PREFIX/lib:\$LD_LIBRARY_PATH
LD_LIBRARY_PATH=\$PREFIX/lib64:\$LD_LIBRARY_PATH
PATH=/usr/local/cuda/bin:\$PATH
PATH=\$PREFIX/bin:\$PATH
VULKAN_SDK=\$PREFIX
VK_LAYER_PATH=\$PREFIX/etc/explicit_layer.d
CMAKE_PREFIX_PATH=\$PREFIX:\$CMAKE_PREFIX_PATH
export LD_LIBRARY_PATH PATH VULKAN_SDK VK_LAYER_PATH CMAKE_PREFIX_PATH
EOF
echo
echo "Done. Be sure to source the 'mapd-deps.sh' file to pick up the required environment variables:"
echo " source $PREFIX/mapd-deps.sh"
if [ "$1" = "--compress" ] ; then
tar acf mapd-deps-ubuntu-$SUFFIX.tar.xz -C $PREFIX .
fi