FS3D
Building fs3d from sources

The build process is divided into three steps:

This page uses the following convention: all libraries are installed in %ROOT_DIR%, under their own folder. They are built in a dedicated directory named "build"

Prerequisites

In order to build fs3d from sources, a few tools are required:

in order to build the documentation (both user and developper):

in order to build the python selection plugin:

Additionaly, on linux, graphic card with proprietary drivers are strongly recommanded.

Dependencies

At the moment, no package is provided. Thus, compiling/running FS3D_cpp require the following packages:

Some provides auto-extracting archive, in which case, the process is quite straightforward. Others have to be build from sources (all have cmake support) in which case the process is as follow:

Installing Qt5

The installer is a self executable archive.

Installing dtk

dtk has itself a dependency on Qt, so it has to be built after Qt was installed. Hereinafter, %QT_DIR% is the folder in which Qt is installed (for example /opt/Qt/5.6/gcc_64/lib/cmake

this may be achieved by the following script:

1 mkdir dtk
2 cd dtk
3 git clone git@github.com:d-tk/dtk.git .
4 mkdir build
5 cd build
6 cmake -DCMAKE_PREFIX_PATH=%QT_DIR% -DDTK_BUILD_SCRIPT=ON -DDTK_BUILD_SUPPORT_GUI=ON -DDTK_BUILD_SUPPORT_CORE=ON -DDTK_BUILD_MATH_SUPPORT=ON ..
7 make

Installing VTK

VTK has itself a dependency on Qt, so it has to be built after Qt was installed. Hereinafter, %QT_DIR% is the folder in which Qt is installed (for example /opt/Qt/5.6/gcc_64/lib/cmake

this may be achieved by the following script:

1 mkdir VTK
2 cd VTK
3 git clone https://github.com/Kitware/VTK.git .
4 git checkout v7.0.0
5 mkdir build
6 cd build
7 cmake -DCMAKE_BUILD_TYPE="Release" -DCMAKE_PREFIX_PATH=%QT_DIR% -DBUILD_TESTING="OFF" -DVTK_Group_Qt="ON" -DVTK_QT_VERSION="5" -DModule_vtkGUISupportQtOpenGL="ON"
8 make

Installing FLENS

FLENS is header-only, hence it does not need to be built.

this may be achieved by the following script:

1 mkdir FLENS
2 cd FLENS
3 git clone https://github.com/d-tk/FLENS.git .

Installing dtkLinearDenseAlgebra

dtkLinearDenseAlgebra has itself a dependency on Qt and on dtk, so it has to be built after Qt and dtk were installed. Hereinafter, %QT_DIR% is the folder in which Qt is installed (for example /opt/Qt/5.6/gcc_64/lib/cmake) and %dtk_DIR% is the folder in which dtk is installed (for example /opt/dtk/build)

this may be achieved by the following script:

1 mkdir dtkLinearDenseAlgebra
2 cd dtkLinearDenseAlgebra
3 git clone https://github.com/d-tk/dtk-linear-algebra-dense.git .
4 mkdir build
5 cd build
6 cmake -DCMAKE_PREFIX_PATH=%QT_DIR% -Ddtk_DIR=%dtk_DIR% ..

Installing Matlab Compiler Runtime v2012b

The installer is a self executable archive.

Installing fs3d

With the correct permissions and the environment described above, installing fs3d comes down to one more cmake-based build.

this may be achieved by the following script:

1 git clone git@is-dev.inria.fr:fs3d/fs3d_cpp.git .
2 mkdir build
3 cd build
4 cmake -DCMAKE_PREFIX_PATH=%QT_DIR% -DMCR_PATH=%MCR_PATH% -DVTK_DIR=%VTK_DIR% -DdtkLinearAlgebraDense_DIR=%dtkLinearAlgebraDense_DIR% -Ddtk_DIR=%dtk_DIR% ..

First run:

In order to make Fs3d find its libraries, the MCR must be added to the library path:

export LD_LIBRARY_PATH="%MCR_PATH%/v80/bin/glnxa64"

The recommended way is to use a launcher script like the one below:

cd build/bin
export LD_LIBRARY_PATH="/user/nschnitz/home/dev/bolis/fs3dCpp/build/MCR/v80/bin/glnxa64"
./fs3dapp
echo 'press enter to close'
read

Known issues

**black (or transparent) windows are displayed where the view should be**

update VTK to 6.3, and activate OpenGl2 rendering, and vtkQtGuiSupport in the advanced options

**fs3d_cpp does not display the EEG when a batchFile is loaded**

or

**there is an error message "no reader plugin found"**

edit the file dtk.conf in ~/.config/inria and add a section:

[plugins]
path=/path/to/plugins

**When compiling, there is an error ".o: fichier non reconnu: Fichier tronqué" **

This is caused by a corrupted file remaining from an older failed build. Clean the build directory and restarting a clean build usually solve the issue:

make clean
make