-
Notifications
You must be signed in to change notification settings - Fork 448
/
mapd-deps-ubuntu1604.sh
160 lines (129 loc) · 3.42 KB
/
mapd-deps-ubuntu1604.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
#!/usr/bin/env bash
set -e
set -x
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
source /etc/os-release
sudo mkdir -p $PREFIX
sudo chown -R $(id -u) $PREFIX
sudo apt update
sudo apt install -y \
software-properties-common \
build-essential \
libtool \
ccache \
git \
wget \
curl \
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 \
libedit-dev \
uuid-dev \
libsnappy-dev \
zlib1g-dev \
autoconf \
autoconf-archive \
automake \
bison \
flex \
libpng-dev \
rsync \
unzip \
jq \
python-dev \
python-yaml \
pkg-config \
swig \
patchelf
# Install gcc 8
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt update
sudo apt install -y g++-8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 80 \
--slave /usr/bin/g++ g++ /usr/bin/g++-8
sudo update-alternatives --config gcc
# Needed to find sqlite3, xmltooling, and xml_security_c
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PREFIX/lib64/pkgconfig:$PKG_CONFIG_PATH
export PATH=$PREFIX/bin:$PATH
install_ninja
install_cmake
# c-blosc
install_blosc
# Geo Support
install_gdal
VERS=1_72_0
# http://downloads.sourceforge.net/project/boost/boost/${VERS//_/.}/boost_$VERS.tar.bz2
download ${HTTP_DEPS}/boost_$VERS.tar.bz2
extract boost_$VERS.tar.bz2
pushd boost_$VERS
./bootstrap.sh --prefix=$PREFIX
./b2 cxxflags=-fPIC install --prefix=$PREFIX || true
popd
# Needed for folly to find boost
export LIBRARY_PATH=$PREFIX/lib:$LIBRARY_PATH
# llvm
# (see common-functions.sh)
install_llvm
# install AWS core and s3 sdk
install_awscpp -j $(nproc)
# thrift
install_thrift
install_folly
install_iwyu
download_make_install ${HTTP_DEPS}/bisonpp-1.21-45.tar.gz bison++-1.21
# TBB
install_tbb
# Apache Arrow (see common-functions.sh)
ARROW_BOOST_USE_SHARED="ON"
install_arrow
# Go
install_go
# librdkafka
install_rdkafka
# OpenSAML
VERS=3.2.2
download_make_install ${HTTP_DEPS}/xerces-c-3.2.2.tar.gz
download_make_install ${HTTP_DEPS}/xml-security-c-2.0.2.tar.gz "" "--without-xalan"
download_make_install ${HTTP_DEPS}/xmltooling-3.0.4-nolog4shib.tar.gz "" "--with-boost=$PREFIX"
download_make_install ${HTTP_DEPS}/opensaml-3.0.1-nolog4shib.tar.gz "" "--with-boost=$PREFIX"
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/go/bin:\$PATH
PATH=\$PREFIX/bin:\$PATH
CMAKE_PREFIX_PATH=\$PREFIX:\$CMAKE_PREFIX_PATH
GOROOT=\$PREFIX/go
export LD_LIBRARY_PATH PATH CMAKE_PREFIX_PATH GOROOT
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-$VERSION_ID-$SUFFIX.tar.xz -C $PREFIX .
fi