Compiling Lemma is fairly straightforward. The biggest hurdle is possibly installing the prerequisites, but on many platforms this is easy.

Table of contents

Optional Prerequisites

  • VTK - The Visualization ToolKit is a powerful data visualization framework. This is an optional dependency, but some functionality will be missing without it. Any version after 6.0 is fine. VTK is available under a BSD license from Again–on Linux– most package managers offer VTK. Compiling from source is not terribly difficult, but requires installing CMake as well.
Some Lemma modules may impose additional (optional or mandatory) prerequisites, see the module documentation.


Lemma uses CMake to manage the build process ( CMake is free software that is easy to install on about any operating system.


Hard dependencies are

The only dependencies are the Eigen linear algebra Library v3, a C++ compiler and scons.

The following compilers are fully supported and tested: gnu, mingw, and intelc. Several routines are parallelised for shared memory platforms using OpenMP. Any of the above compilers is able to be used with OpenMP. Microsoft's Visual C++ compiler will likely be supported for stable releases, but is not actively tested. Eigen extensively uses template meta programming, the Borland compiler has been shown to be subpar at optimizing this type of code and will likely never be supported actively. A new compiler clang, is being developed and may prove to be promising as well, but current C++ support is lacking. If you are using a different compiler, please share your experiences with us.

The Visualization ToolKit (VTK) is used for visualisation throughout Lemma. It is not an explicit dependency, but without it, you will not be able to get any graphical output.

Eigen is freely available under the LGPL at The necessary components of Eigen will be included in stable releases of Lemma. Scons is a make replacement built on top of Python, and is also free.

  • Eigen3 - Eigen is a header-only linear algebra template library. It is made available under the Gnu Lesser Public License. It is available at Please note that Lemma uses Version 3 of the Library.

Acquiring the source

Lemma is currently available from svn checkout only. Note that while Lemma is still in Beta only developers have access to the source code. Contact us if you would like to contribute.

svn co Lemma


There is very little configuring to do. In the main Lemma directory you will find a file called ' listed below'

Configure this to your machine, and copy to a file named

If you have more questions about a parameter you can type

scons -h

For more information. After configuring, copy to a file called


To build the libraries simply type:

scons -j2

To build the libraries and unit tests. The -j2 arguments tell scons how many threads compilation should occur on (parallel build). We recommend one per processor. Note, this only affects the speed of the build, not whether or not Lemma will have OpenMP support.


To install the library simply type:

scons install

To install to INSTALLDIR. Note depending on your machine, you may need sudo privileges to do this. Also, if you let INSTALLDIR=./lib this step will fail as those libraries are already located in Lemma/lib.

Note that on a Mac, this step is crucial.