Lab 2 - Thrift Installation

For this lab, we will use Apache Thrift, which is a cross-platfrom, cross-language RPC library. For the homework task, you will use 2 different programming language to implement a client-server application. One of them will be C++ and you can choose the other one. The chosen language must support Binary and Multiplex protocols (see table

To use Thrift, we will need:

You may choose to install Thrift by:

Installing from repositories

Packages for the compiler and the C++ library may be available in your system repository. Packages for Java, Node.js, Python, and possible for other languages, are available in their respective package managers.

Builing from source

If building from source, you can choose which languages will be supported. Disable languages that you will not use to speed up the build and avoid build errors. Support for some languages may require installing additional packages on the system.


Download the source code from .

Unzip the source code:

tar -xf thrift-0.18.1.tar.gz
cd thrift-0.18.1

Run a bootstrap script:


You may need to install additional packages on your system before building thrift, such as libtool, flex, bison, automake, libboost-all-dev, libssl-dev, libcrypto++-dev, python3-dev.


Configure the build, including selection of supported languages.

See the help for available options.

./configure --help

Finally, build and install the library.

sudo make install

Computers in Rotunda

On the computers in rotunda, thrift packages are not installed, so I recommend building from source for the compiler and for C++ support. Use a --prefix option of configure to specify your directory where thrift will be installed, then run make install without sudo. This configuration has been tested (all languages except C++ are disabled).

 ./configure --disable-tests --without-qt5 --without-c_glib --without-java --without-erlang --without-nodejs --without-nodets \
   --without-lua --without-python --without-py3 --without-perl --without-php --without-php_extension --without-dart \
   --without-ruby --without-haskell --without-go --without-swift --without-rs --without-cl --without-haxe --without-netstd \
   --without-d --prefix=$HOME/thrift

Then, build and install the library:

make install

For Java, Node.js or Python, use the respective pacakge managers.

It is possible to enable more languages, but for some of them, make or make install may fail.