Install

From Source

The code is freely available. You can clone the latest version of the source code:

Dependencies

Shorter: on Ubuntu

sudo apt-get install libmpfr-dev libgmp3-dev libboost-all-dev cmake cmake-gui curl

PAGAI needs:

Default Build

After cloning the repository, run default_build.sh to install all PAGAI dependencies and then PAGAI itself. Installation may take a while, since there are several external dependencies to compile (LLVM, Cudd, Apron, …). Please report if the installation fails.

If you want to change one of those options, use a custom build.

To clean up the directory built by default_build.sh, run default_clean.sh.

Custom Build

  1. Create and initialize a build directory

     mkdir build && cd build
     cmake <Path to CMakeLists.txt> # e.g. "cmake .."
    

    CMake will ask you to choose a configuration (it is the only mandatory option). If you don’t know which one to use, go for the one with the most recent version of LLVM. Also, specify now the other build options you want. For example:

     cmake -DCONFIG=llvm3.6 [OTHER_OPTIONS] ..
    
  2. Local install of dependencies

    Most dependencies can be installed locally, which we recommend so that the supported versions are used. To install PAGAI’s dependencies locally (the destination is the external/install directory in PAGAI’s root dir) run this command from the build directory:

     make -j4 dep_install
    

    This can take some time (dozens of minutes to hours) especially the installation of LLVM.

  3. Refresh cmake

    When this is done, refresh one last time the cmake configuration:

     cmake ..
    

    There is no need to specify the options to cmake again, since they are recorded from the first time you run the cmake command.

  4. Build PAGAI executable

    Finally, you can build the PAGAI executable using make.

    After this, you won’t have to run cmake again, even if you modify PAGAI’s source files. Just run make. The only reason you would want to run cmake again would be if you want to change one of the options you gave to cmake.

CMake Options

The CMake script can take various options in the form -DOPTION_NAME=VALUE.

The list of available options is visible in the top of the main CMakeLists.txt file, as well as their action on the build system and their default values.

Compiler Choice

CMake chooses the compiler based on CC and CXX environment variables. If you want to force the use of a specific compiler, other than the default one, use something like:

export CC=clang
export CXX=clang++
cmake [OPTIONS] ..

On MacOS, please compile with clang and not g++: there are strange template instantiations errors with g++, leading to duplicate symbols when linking.