Installing RST

See also

C++ Tutorial
Using installed RST in a C++ project
Java Tutorial
Using installed RST in a Java project
Python Tutorial
Using installed RST in a Python project

There are currently two ways to install the 0.19 version of RST:

From Source

Preconditions

In order to build RST, the following tools and libraries are required:

  • Google protocol buffers protoc compiler executable starting with version 2.4 (Ubuntu package protobuf-compiler)
  • C++ binding:
    • libprotobuf library in the same version as protoc (Ubuntu package libprotobuf-dev)
    • RSC library (Installation is explained as part of installing RSB).
  • Python binding:
    • Python in version 2.x
    • Pypi package protobuf in the same version as protoc (Ubuntu package python-protobuf)
    • Setuptools (Ubuntu package python-setuptools)
  • Java binding:
    • Any JDK starting with version 1.5 (must include javac executable, Ubuntu package: openjdk-7-jdk)
    • Apache ant (Ubuntu package ant)
    • Google protocol buffers library for java (Ubuntu package libprotobuf-java)

Build Instructions

  1. The whole source tree of RST, including all sub-projects, can be obtained by executing the command:

    $ git clone -b master --recursive https://code.cor-lab.org/git/rst.git
    $ git submodule foreach git checkout master
    $ git submodule foreach git pull
    
  2. After that, RST can be built and installed like this:

    $ cd rst/rst-proto # after "git clone" command
    $ mkdir -p build && cd build
    $ cmake -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=PREFIX ..
    $ make
    $ make install
    

    where PREFIX is the directory into which RST should be installed (which is sometimes called “install prefix”).

    Note

    During the cmake call a list of enabled language bindings will be printed. Please verify that the language you want to work with is included. If this is not the case, a warning should have been printed to the console before that indicates which dependency could not be found.

    Example output:

    -- Matlab not supported by protoc. Not generating matlab bindings.
    -- Enabled features:
     * cpp binding
     * java binding
     * python binding
    

    Note

    In case you decided to install RST into a different prefix than RSC, you need to inform cmake where RSC can be found. This can be achieved by adding the following argument to the cmake call:

    -DRSC_DIR=RSC_PREFIX/share/rsc
    

    Note

    You can control which language bindings are built using these cmake variables: BUILD_CPP, BUILD_JAVA, BUILD_PYTHON.

  3. Optional: Install converters bundled with RST

    $ cd rst-converters/cpp # in cloned "rst" directory
    $ mkdir -p build && cd build
    $ cmake -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=PREFIX ..
    $ make
    $ make install
    

    where PREFIX is the directory into which the RST converters should be installed.

Debian Packages

Debian packages for several versions of Ubuntu GNU/Linux are available from the CoR-Lab package repository.

  1. Configure your computer to use the “testing” component of the repository as described here: http://packages.cor-lab.de

  2. After that, packages can be installed via

    $ sudo apt-get install rst0.19 librstconverters0.19
    

    This will install all language bindings of RST as well as the converters for C++.

    Of course, it also possible to only install a subset of the above packages.