Skip to content

Linux instructions

Erik Smistad edited this page Nov 30, 2016 · 38 revisions

Install dependencies

First, make sure you have all the tools necessary to download and compile the code:

sudo apt-get install cmake g++ git

Install OpenCL. This is done by downloading the latest display drivers and AMD APP SDK (if you have a AMD GPU) or CUDA Toolkit (if you have an NVIDIA GPU).

Next, install the other dependencies (these instructions are for Ubuntu 14.04):

# Install boost, note that the version number in the package names may be different on your system
sudo apt-get install libboost-system1.55-dev libboost-thread1.55-dev libboost-iostreams1.55-dev libboost-chrono1.55-dev libboost-filesystem1.55-dev libboost-signals1.55-dev

# Install Qt 5
sudo apt-get install libqt5widgets5 libqt5opengl5-dev

# Install GLEW
sudo apt-get install libglew-dev

# Install Eigen 3
sudo apt-get install libeigen3-dev

# Install zlib for decompressing raw files (zraw) (Optional)
sudo apt-get install zlib1g-dev

# Install ITK (Optional)
sudo apt-get install libinsighttoolkit4-dev

# Install VTK (Optional)
sudo apt-get install libvtk5-dev

Compile

git clone https://github.com/smistad/FAST.git
cd FAST
git submodule init
git submodule update
mkdir build
cd build
cmake ../
make -j8

NOTE IMPORTANT: NVIDIA's latest drivers (nvidia-36x and nvidia-37x series) have a serious bug in the CL-GL interopability which will cause a fatal error with the message "Xlib: extension “NV-GLX” missing on display". To avoid this compile with the cmake flag FAST_DISABLE_GL_INTEROP:

cmake ../ -DFAST_DISABLE_GL_INTEROP=ON

Running the tests

Next, you should run the tests to make sure the framework is working properly on your system. Instructions on how to do this can be found here.

Troubleshoot

Manually installing Qt 5

If you have an older linux distro that doesn't have Qt 5 packages download Qt manually from http://qt-project.org/downloads, install it and when you run cmake set CMAKE_PREFIX_PATH to where you installed Qt. For instance on my system it was like this:

mkdir build
cd build
cmake ../source/ -DCMAKE_PREFIX_PATH=/home/smistad/Qt/5.3/gcc_64/

You might get an error containing something like this: Qt5Gui_EGL_LIBRARY-NOTFOUND To fix this error, install EGL and try again:

sudo apt-get install libegl1-mesa-dev
Clone this wiki locally