Libraries for LooPo

Some care has to be taken when installing the libraries for LooPo, for HsLooPo in particular. Since the Barvinok library comes bundled with Polylib, Piplib and Omega, we must be careful not to link with two different installations of the same library. Unfortunately, we cannot use Polylib and Omega as provided by Barvinok. LooPo needs a 64-bit version of Polylib (in addition to the MP version Barvinok would build) and the Omega bundled with Barvinok has an incompatible interface (i.e., LooPo uses the old Omega 1.2 interface).

Installing the Libraries


Compile Polylib with

--enable-longlongint-lib --with-libgmp --enable-int-lib

to get a 64-bit version (for LooPo), a GMP version (for Barvinok and HsLooPo) and a 32-bit version (for the version of CLooG distributed with LooPo).


Obtain the latest git-version of Barvinok using the following git commands:

git clone git://
git submodule init
git submodule update

(Note: if you use the .tar.gz snapshot, Piplib is not included!)

Use to prepare barvinok for configuration.

Configure Barvinok with


such that Barvinok uses the Polylib installed for LooPo. We do not want Barvinok's version of Omega, because LooPo requires an older version of Omega with a different interface (maybe LooPo should be updated to use the newer Omega). --enable-shared-barvinok is required for HsLooPo and GHCi.

If there are errors related to scanner/parser in Omega, remove the target "petit" from the Omega Makefile, since it is not needed anyway.

(Hint: use make CXXFLAGS=-g CFLAGS=-g && make install for easy debugging of segmentation faults in barvinok.)


Barvinok comes with a bundled Piplib, so if you compile Barvinok, you can use it as the Piplib required by LooPo. If you do not install Barvinok, install a separate Piplib.


Install Omega from LooPo's required software page:

Configuring LooPo and HsLooPo

For LooPo, use --with-polylib=POLYLIB to give the path to the installed Polylib. Use --with-piplib=PATH to give the path to Barvinok or the stand-alone Piplib.

HsLooPo detects the Polylib and Piplib paths from the LooPo installation (therefore, it has no configure options to set these paths). Use --with-barvinok to specify the Barvinok installation. Note that Barvinok and LooPo should be built against the same Piplib installation (for example, the Piplib bundled with Barvinok). Make sure to have the Parsec (the monadic parser combinators) installed in your GHC as this dependency isn't covered within the configure script yet.

Last modified 8 years ago Last modified on Apr 12, 2010 5:31:59 PM