Build FAST on Ubuntu Linux

These instructions are for building FAST on Ubuntu 18.04 or newer (previous versions, such as 16.04, are no longer supported). If you only want to test and use FAST, please download a release instead.

Install requirements

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

    sudo snap install cmake --classic # Use snap to get more recent version of cmake on Ubuntu 18.04
    sudo apt install g++ git patchelf
    sudo apt install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
    sudo apt install libopenslide-dev # Needed for WSI module
    sudo apt install pkgconf libusb-1.0-0-dev # Needed for realsense
  2. Install OpenCL and OpenGL.
    • OpenGL: Usually installed along with your graphics driver.
    • OpenCL: To install OpenCL on Linux, download an implementation depending on the CPU/GPU you have:
  3. FAST will download all other dependencies (Qt5, eigen, zlib, DCMTK, OpenVINO, tensorflow, +++) automatically. Note that some optional requirements are needed for video streaming and GPU neural network inference, this can be installed later.

Clone and Configure

Clone the code using Git and configure the project using CMake:

git clone
mkdir build
cd build
# Default cmake configuration. Options may be added like so: 
cmake ..

FAST has several optional modules and build options. These are enabled using cmake options named FAST_MODULE_<Name> and FAST_BUILD_<Name>. Here is a list of some options which might be useful:

  • FAST_MODULE_TensorFlow
  • FAST_MODULE_WholeSlideImaging
  • FAST_MODULE_Clarius
  • FAST_MODULE_Python
  • FAST_MODULE_Plotting
  • FAST_MODULE_RealSense


This will build all configured targets:

make -j8 # Use 8 parallel jobs for compiling


To test that your build was successful, run the systemCheck application:


This should display the FAST logo and some FAST+OpenCL information.


When you run cmake, the system may not find the OpenCL library, and you have to set it manually using cmake (e.g. cmake .. -DOpenCL_LIBRARY=/path/to/ The library is usually located in /usr/local/cuda/lib64/ for NVIDIA and /opt/amd-gpupro/lib/x864-linux-gnu/ if you use the AMD GPUPRO driver.

If you get the error saying something like "qfontengine_ft_p.h:56:22: fatal error: ft2build.h: No such file or directory" you have to install the fontconfig library "libfontconfig1-dev".

If you get an error like "ERROR: Feature 'xcb' was enabled, but the pre-condition 'features.thread && features.xkbcommon && libs.xcb' failed." This means you forgot to install the xcb an xkb libraries needed: sudo apt install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev

Still stuck? Get help at Image


Set CMAKE_INSTALL_PREFIX to where you want to install FAST on your drive. Then run:

make -j8 install

Build Debian package

To build a Debian package run:

make -j8 package

Build the documentation

Build the Python bindings (pyFAST)