wiki:InstallingFACT++

Version 5 (modified by tbretz, 6 years ago) ( diff )

--

Compiling FACT++

First you need to get FACT++ from the svn-repository. The default command will checkout it into a sub-directory called "directory" at the current directory. It will be created if not existing. If the argument is omitted, the default directory is FACT++.

[0] svn checkout https://www.fact-project.org/svn/trunk/FACT++ [directory]
[1] cd FACT++

Now create a new sub-directory in your main source directory (here assuming the default name was used)

[2] mkdir build
[3] cd build

And call cmake from there (the ".." is intentional!)

[4] cmake ..

to compile with clang, you might want to change the compilers by calling

[4] cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ..

instead. Note that not all versions of clang are compatible with all version of the boost-libraries on Ubuntu. You might have to try different versions. (However, it is worth it, because clang is much faster).

If you only want to compile the basic tools (rootifysql, root2sql, fits2sql, fitsdump and zfits) you can add -DTOOLS_ONLY=1 when calling cmake. This simplifies compilation because less packages are required (for example the whole QT stuff is not needed).

If a package is missing, you will see an error which looks like this

Line 
1CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
2 Could NOT find Nova (missing: NOVA_LIBRARY NOVA_INCLUDE_DIR)
3Call Stack (most recent call first):
4 /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
5 cmake/FindNova.cmake:11 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
6 CMakeLists.txt:131 (FIND_PACKAGE)

It is a bit tricky to find out which package is missing at the moment. The important line is line #2

Could NOT find Nova (missing: NOVA_LIBRARY NOVA_INCLUDE_DIR)

In this case, it is the development package of the nova library (libnova-dev).

Then call make or make -jN where N is the numbers of threads you want to utilize (check the number of CPU cores you can keep busy).

Packaging FACT++

Once successfully compiled, you can package the tool-set and build a tar-archive and a Debian package by

[5] make package

The Debian package can then be installed system wide with

[6] dpkg -i fact++-YYWWDDHH.deb

where YYWWDDHH is the version number compiled from the time when cmake was called.

Note: See TracWiki for help on using the wiki.