From Source
The code is freely available. You can clone the latest version of the source code:
-
Via HTTPS:
git clone https://gricad-gitlab.univ-grenoble-alpes.fr/pagai/pagai.git
-
Via SSH:
git clone git@gricad-gitlab.univ-grenoble-alpes.fr:pagai/pagai.git
Dependencies
Shorter: on Ubuntu
sudo apt-get install libmpfr-dev libgmp3-dev libboost-all-dev cmake cmake-gui curl
PAGAI needs:
- GMP and MPFR. On Debian systems, install packages
libmpfr-dev
andlibgmp3-dev
- Boost. On Debian systems, install package
libboost-all-dev
- CMake, for the compilation. On Debian systems, install package
cmake
(you may want to installcmake-gui
too for a graphical configuration tool) - Yices, Z3, CUDD, LLVM, Apron and the PPL (can be automatically installed for you).
See the file
CMakeLists.txt
to see the exact versions supported for each configuration. The easiest way is probably to go for a local install of all dependencies for the configuration you want.
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
-
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] ..
-
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.
-
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.
-
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 runmake
. The only reason you would want to runcmake
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.