Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
This guide will show you how to set up a machine and user environment to build RTBkit and run a demo program.
There are three levels of setup:
- you need to have a machine with all the right packages installed
- you need to install some packages within a user's home directory
- you need to build RTBkit.
We tested this release on:
- Ubuntu 12.04.2 LTS (Precise Pangolin) 64-bit and compiled with gcc 4.6.
- [Ubuntu 14.04.1 LTS (Trusty Tahr)] (http://releases.ubuntu.com/trusty/) 64-bit and compiled with gcc 4.8.
An Ubuntu 14.04 AMI (ami-c6d485ae) is available in US East(N. Virginia).
1) Machine-level Setup
Important note: if you are using Amazon instances for this, please do not use a Micro instance, as it will have insufficient RAM to compile. Amazon Small instances should be sufficient to build RTBKit. To run RTBKit or its tests, you'll need at least a xlarge instance.
Make sure you have at least 16GB of disk for building from the source. Also, your CPU should have support for SSE4.2 as it greatly improves performance.
You should run the following command to ensure you have all of the required dependencies which can be installed via apt:
$ sudo apt-get install linux-tools-generic libbz2-dev python-dev scons\ libtool liblzma-dev libblas-dev make automake \ ccache ant openjdk-7-jdk libcppunit-dev doxygen \ libcrypto++-dev libACE-dev gfortran liblapack-dev \ libevent-dev libssh2-1-dev libicu-dev libv8-dev \ g++ google-perftools libgoogle-perftools-dev \ zlib1g-dev git pkg-config valgrind autoconf \ libcurl4-openssl-dev cmake libsigc++-2.0-dev
2) User-level Setup
Add the following to your ~/.profile and/or whatever your shell requires for the equivalent effect:
# Add local directory for libraries, etc mkdir -p $HOME/local/bin PATH="$HOME/local/bin:$PATH" mkdir -p $HOME/local/lib export LD_LIBRARY_PATH="$HOME/local/lib:$LD_LIBRARY_PATH" export PKG_CONFIG_PATH="$HOME/local/lib/pkgconfig/:$HOME/local/lib/pkg-config/"
Then run this command to apply changes:
$ source ~/.profile
To see if your environment is properly setup run:
$ env | grep PATH
Make sure you get an output similar to this:
LD_LIBRARY_PATH=/home/rtbkit/local/lib: PATH=/home/rtbkit/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games PKG_CONFIG_PATH=/home/rtbkit/local/lib/pkgconfig/:/home/rtbkit/local/lib/pkg-config/
You should now be ready to install the rtbkit-deps:
$ git clone https://github.com/rtbkit/rtbkit-deps.git $ cd rtbkit-deps $ git submodule update --init
Ubuntu 12 You may choose if you want nodejs enabled
NODEJS_ENABLED=1 or disabled
Ubuntu 14 You will have to disable nodejs
$ make all NODEJS_ENABLED=0
To speed up compilation times you should not use the
-jX argument on make, but instead give it
3) Building RTBkit
Now you're ready to build RTBkit.
$ sudo su - rtbkit $ git clone https://github.com/rtbkit/rtbkit.git $ cd rtbkit $ cp jml-build/sample.local.mk local.mk
Again here you will have to use the NODEJS_ENABLED flag depending on which OS you're building.
Ubuntu 12 you may choose either
$ make dependencies NODEJS_ENABLED=1 $ make compile NODEJS_ENABLED=1 $ make test
Ubuntu 14 you will have to use
$ make compile NODEJS_ENABLED=0 $ make test NODEJS_ENABLED=0
For the test suite to pass it is currently required that you do not have a
bootstrap.json in your project root and that you do not try to run
make test in parallel mode (
Note that make should be invoked from the root directory of RTBKit.
The best entry-points into the RTBkit source are in the /examples directory, especially the rtbkit_integration_test, which can be run with
Also, some of those example components are used by the Demo Stack that provides a simple runnable RTB stack using a synthetic exchange.