This repository has been archived by the owner on Jan 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 181
/
install_all.sh
executable file
·154 lines (134 loc) · 2.96 KB
/
install_all.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
#!/bin/bash -e
#
# Copyright (c) 2014, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
#
echo
echo This script will install fblualib and all its dependencies.
echo It has been tested on Ubuntu 13.10 and Ubuntu 14.04, Linux x86_64.
echo
set -e
set -x
if [[ $(arch) != 'x86_64' ]]; then
echo "x86_64 required" >&2
exit 1
fi
issue=$(cat /etc/issue)
extra_packages=
current=0
if [[ $issue =~ ^Ubuntu\ 13\.10 ]]; then
:
elif [[ $issue =~ ^Ubuntu\ 14 ]]; then
extra_packages=libiberty-dev
elif [[ $issue =~ ^Ubuntu\ 15\.04 ]]; then
extra_packages=libiberty-dev
elif [[ $issue =~ ^Ubuntu\ 16\.04 ]]; then
extra_packages=libiberty-dev
current=1
else
echo "Ubuntu 13.10, 14.*, 15.04 or 16.04 required" >&2
exit 1
fi
dir=$(mktemp --tmpdir -d fblualib-build.XXXXXX)
echo Working in $dir
echo
cd $dir
echo Installing required packages
echo
sudo apt-get install -y \
git \
curl \
wget \
g++ \
automake \
autoconf \
autoconf-archive \
libtool \
libboost-all-dev \
libevent-dev \
libdouble-conversion-dev \
libgoogle-glog-dev \
libgflags-dev \
liblz4-dev \
liblzma-dev \
libsnappy-dev \
make \
zlib1g-dev \
binutils-dev \
libjemalloc-dev \
$extra_packages \
flex \
bison \
libkrb5-dev \
libsasl2-dev \
libnuma-dev \
pkg-config \
libssl-dev \
libedit-dev \
libmatio-dev \
libpython-dev \
libpython3-dev \
python-numpy
echo
echo Cloning repositories
echo
if [ $current -eq 1 ]; then
git clone --depth 1 https://github.com/facebook/folly
git clone --depth 1 https://github.com/facebook/fbthrift
git clone https://github.com/facebook/thpp
git clone https://github.com/facebook/fblualib
git clone https://github.com/facebook/wangle
else
git clone -b v0.35.0 --depth 1 https://github.com/facebook/folly
git clone -b v0.24.0 --depth 1 https://github.com/facebook/fbthrift
git clone -b v1.0 https://github.com/facebook/thpp
git clone -b v1.0 https://github.com/facebook/fblualib
fi
echo
echo Building folly
echo
cd $dir/folly/folly
autoreconf -ivf
./configure
make
sudo make install
sudo ldconfig # reload the lib paths after freshly installed folly. fbthrift needs it.
if [ $current -eq 1 ]; then
echo
echo Wangle
echo
cd $dir/wangle/wangle
cmake .
make
sudo make install
fi
echo
echo Building fbthrift
echo
cd $dir/fbthrift/thrift
autoreconf -ivf
./configure
if [ $current -eq 1 ]; then
pushd lib/cpp2/fatal/internal
ln -s folly_dynamic-inl-pre.h folly_dynamic-inl.h
popd
fi
make
sudo make install
echo
echo 'Installing TH++'
echo
cd $dir/thpp/thpp
./build.sh
echo
echo 'Installing FBLuaLib'
echo
cd $dir/fblualib/fblualib
./build.sh
echo
echo 'All done!'
echo