fbthrift

If on Linux you can install system dependencies to save building them:

fbthrift

1
2
3
4
5
6
7
8
9
10
11
# Clone the repo
wget https://apache.cs.utah.edu/thrift/0.12.0/thrift-0.12.0.tar.gz
tar -xvf thrift-0.12.0.tar.gz
# 进入thrift目录
./configure
make -j8
sudo make install
# 测试
thrift -version
# code generate
thrift -r --gen <language> <Thrift filename>

boost

https://kezunlin.me/post/d5d4a460/

1
2
3
4
5
6
7
wget https://boostorg.jfrog.io/artifactory/main/release/1.67.0/source/boost_1_67_0.tar.gz
tar -xvf boost_1_67_0.tar.gz
cd boost_1_67_0
./bootstrap.sh
./b2 -j16 variant=release link=shared threading=multi runtime-link=shared define=_GLIBCXX_USE_CXX11_ABI=0# build
./b2 -j16 variant=release define=_GLIBCXX_USE_CXX11_ABI=0 install
/root/tf_serving/

libevent

1
2
3
4
5
6
wget https://github.com/libevent/libevent/archive/refs/tags/release-2.1.12-stable.zip
unzip release-2.1.12-stable.zip
cd libevent-release-2.1.12-stable
./configure
make -j16
make install

Apache Thrift

1
2
3
4
5
6
7
8
9
10
11
12
apt-get install libboost-all-dev libevent-dev libtool automake

wget https://github.com/apache/thrift/archive/refs/tags/v0.12.0.zip
unzip v0.12.0.zip

sh bootstrap.sh
export CXXFLAGS="-g -O2 -D_GLIBCXX_USE_CXX11_ABI=0"
./configure
make -j`nproc'
make install
# 测试
thrift -version