Install

Overview

ztsdb uses system calls that are specific to Linux and will not run on non-Linux platforms. It also requires a 64-bit OS.

In order to compile, ztsdb relies on a set of tools and libraries. We give below in the prerequisites section the step-by-step instructions for the installation of these tools and libraries for CentOS 7, Ubuntu 14.04 and Ubuntu 16.04. We expect it to compile and run on other flavours of Linux too and the installation should be similar.

Prerequisites

Installation of tools and libraries needed by ztsdb.

CentOS 7

boost

sudo yum install boost-filesystem-dev

flex

sudo yum install flex

C++ compiler

gcc 4.9 or higher is needed; for this we can choose from the following alternatives.

devtoolset-3: gcc 4.9.2

devtoolset-4: gcc 5.3.1

cmake

cmake >= 3.1 is needed.

    sudo yum install cmake3
    sudo ln -s /usr/bin/cmake3 /usr/local/bin/cmake 

bison

We need version >= 3.0.2, so it needs to be installed manually.

gengetopt

GNU command line option parsing tool.

sudo yum -y install epel-release
sudo yum repolist
sudo yum install gengetopt

double-conversion

Efficient conversion routines binary-decimal and decimal-binary for IEEE doubles.

sudo yum install double-conversion-devel

crpcut (optional)

crpcut is optional as it's used only for some of the unit tests; install it if you are a developer who intends to contribute to the project.

Ubuntu 14.04

boost

sudo apt-get install libboost-filesystem-dev

flex

sudo apt-get install flex

bison

sudo apt-get install bison

compiler

ztsdb is tested with both gcc and Clang. gcc version must be >= 4.9, while clang version must be >= 3.6. We show here how to install gcc:

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update

sudo apt-get install gcc-4.9 g++-4.9 cpp-4.9

To get cmake to pick up the correct compiler version (wheter gcc or clang), one can use one of the following methods:

cmake

cmake >= 3.1 is needed.

double-conversion

Efficient binary-decimal and decimal-binary conversion routines for IEEE doubles.

sudo apt-get install libdouble-conversion-dev

getgetopt

GNU command line option parsing tool.

sudo apt-get install gengetopt

crpcut (optional)

crptcut is optional as it's used only for some of the unit tests; install it if you are a developer who intends to contribute to the project.

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:edd/misc
sudo apt-get update
sudo apt-get install crpcut

Ubuntu 16.04

The main difference with 14.04 is that the default gcc or clang have by default a high enough version to compile ztsdb.

boost

sudo apt install libboost-filesystem-dev

cmake

sudo apt install cmake

flex

sudo apt install flex

bison

sudo apt install bison

compiler

For gcc:

sudo apt install gcc g++

For clang:

sudo apt install clang

double-conversion

Efficient binary-decimal and decimal-binary conversion routines for IEEE doubles.

sudo apt install libdouble-conversion-dev

gengetopt

GNU command line option parsing tool.

sudo apt install gengetopt

crpcut (optional)

crptcut is optional as it's used only for some of the unit tests; install it if you are a developer who intends to contribute to the project.

sudo apt install python-software-properties
sudo add-apt-repository ppa:edd/misc
sudo apt update
sudo apt install crpcut

Compiling ztsdb

Get the ztsdb code from GitLab:

git clone https://gitlab.com/lsilvest/ztsdb.git

ztsdb uses cmake. It is recommended to not build inside the source directories. For example make a build directory in the root ztsdb directory and compile like this:

cmake ..
make ztsdb

Running the C++ unit tests (if crpcut was installed)

From the same build directory run:

make all
make test

Note that it is not recommended to run the unit tests with make's -j (multicore) option because of potential timeout issues.

or

make all
ctest

Running the R unit tests

From the same build directory run:

make rtest

Installing

To install the ztsdb executable, the library and the header files on a system:

sudo make install

Make sure the libraries are picked up by running:

sudo ldconfig

By default the root installation directory is /user/local; one can specify an alternate path like this:

sudo make DESTDIR=/some/alternate/directory install