Building Regina on Different Systems

Cluster environments
Back to main page ...

This page offers tips and tricks for building Regina successfully on various operating systems.

As always, it is much simpler to download and install a ready-made package if you can. Check out the Regina download tables and see if your distribution is supported.

Please also see the page on building from sources, which lists the system requirements and gives a general overview of the build process.

If these tips do not work for you, please mail the authors (including your CMakeCache.txt if possible) so that we can update the build scripts (and this page) to reflect systems like yours.


Since version 4.92, Regina can be installed anywhere (it does not need to live directly beneath /usr as in the past). The default is to install in /usr/local, though you can change this if you like by passing the argument CMAKE_INSTALL_PREFIX to cmake:

example$ cmake -DCMAKE_INSTALL_PREFIX=/home/bab/software ..

If you run a 64-bit version of linux (the x86_64 or amd64 architectures) and you use an RPM-based distribution (such as Fedora, Mandriva or SuSE), you may wish to set LIB_SUFFIX:

example$ cmake -DLIB_SUFFIX=64 ..

This ensures that Regina's libraries are installed in a 64-bit directory such as /usr/local/lib64/.

Debian-based distributions (such as Debian or Ubuntu) do not use special directory names for 64-bit systems, and you should not set LIB_SUFFIX on such machines.


The macOS build has evolved to remove the need for software environments such as Fink or MacPorts (and indeed, the macOS binaries here on the Regina website were built on a system without any such environment installed at all). The current situation is as follows:

For a full unix-like installation, assuming you already have an environment like Fink or MacPorts installed, you may need to pass additional arguments to cmake:

A complete example of a cmake line using Fink:

example$ cmake -DPython_EXECUTABLE=/usr/bin/python -DCMAKE_INSTALL_PREFIX=/Users/bab/software -DCMAKE_PREFIX_PATH=/Users/bab/Qt5/5.7/clang_64 -DBOOST_ROOT=/opt/sw/opt/boost-1_58 ..


Building Regina under Windows is possible but extremely messy. If you are working with Regina's sources, we highly recommend that you do this under GNU/Linux or macOS.

If you really need to get a Windows build running, please mail the authors for assistance. Alternatively, you can look in Regina's packaging repository to get some idea of what the Regina developer has been doing to build the Windows binaries that you see here on the Regina website.

Cluster environments

If you plan to use Regina in a high-performance computing environment such as a university cluster, there are several complications.

Disabling the graphical user interface

You will probably not want to build the graphical user interface (in fact the cluster may well not have the Qt development libraries installed, which would cause cmake to fail). To fix this, set the argument DISABLE_GUI:

example$ cmake -DDISABLE_GUI=1 ..

Installing beneath your home directory

You will almost certainly not have root access to the cluster, which means you will need to install Regina beneath your home directory. You do this by creating a top-level install directory (say /home/bab/software) and then passing it as the install prefix to cmake:

example$ cmake -DDISABLE_GUI=1 -DCMAKE_INSTALL_PREFIX=/home/bab/software ..

Regina will now install its various components in the subdirectories /home/bab/software/bin, /home/bab/software/lib, /home/bab/software/share and so on.

You should pass an absolute path as your install prefix (not ~/software or ../software, for instance). It is best if this is not the directory in which you unpacked Regina's sources, since otherwise you may find it hard to untangle sources from binaries later on.

Compiling your own software against Regina

Once Regina is built and installed, you may wish to compile it into your own C++ programs. The helper script regina-engine-config gives you all of the necessary compiler and linker options for doing this. You can find this script with the other programs in prefix/bin, where prefix is your installation prefix.

To obtain a full set of compiler options:

example$ regina-engine-config --cflags

To obtain a full set of linker options:

example$ regina-engine-config --libs

You can use this script directly on the command-line (or in your Makefile). So, for instance, to compile the program myprog.cpp against Regina:

example$ g++ `regina-engine-config --cflags --libs` myprog.cpp -o myprog

Back to main page ... Back to main page ...