CoxIter  1.3
CoxIter - Computing invariants of hyperbolic Coxeter groups
Building CoxIter

The development and testing of CoxIter were carried out on Linux and I strongly recommend this system to use the program (also, the OSX version and the Windows version built with Visual Studio are slower than the one built on Linux).

This page is divided into the following sections:

Compilation with GNU/Linux

The following steps were tested on Ubuntu, Linux Mint and Fedora. With other distributions the commands may vary slightly.

Preliminaries

First, install everything you will need to compile the program.

On Ubuntu, Linux Mint or any Debian-based distribution, type the following commands in a Shell:

sudo apt-get install g++ cmake graphviz libpcre3-dev libpari-dev libgmp-dev git

On Fedora, type the following commands in a Shell:

sudo dnf install g++ cmake graphviz pcre-devel pari-devel git

Compilation

With a shell, go to the directory where you want to install CoxIter and type the following:

git clone https://github.com/rgugliel/CoxIter
cd CoxIter/build
cmake ..
cmake --build .
Main class for the work.
Definition: coxiter.h:74

The compilation should be done withour error or warning. Now, CoxIter is usable.

Remark: If you don't have Git, you can simply download CoxIter here: https://github.com/rgugliel/CoxIter/archive/master.zip

Troubleshooting

If one of the libraries (PCRE, PARI/GP) is installed but not found, try to run the following command:

sudo ldconfig

Advanced information

If you want to manually install PCRE, you can do as follows: Get the latest 8.x version on the officiel website or use version 8.39 (do not use PCRE2). To do that, type the following commands in a shell:

wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.tar.gz
tar -xvzf pcre-8.39.tar.gz
cd pcre-8.39/
./configure
make
sudo make install

Then, you can delete the temporary files:

cd ..
rm -rf pcre-8.39
rm pcre-8.39.tar.gz

Compilation on Mac

To install dependencies using brew: First, open a terminal and enter the following command to install the prerequisites:

xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install cmake graphviz pcre++ pari gmp
brew install Caskroom/cask/xquartz
brew install libomp

If you prefer to use MacPorts, then you can do

sudo port install cmake gmp pcre pari graphviz

Please note that it is optional to install libomp on Mac. If it is installed, the potential of a multi-core processor can be used. CoxIter will compile either way.

Once this is done, we will be able to download and install CoxIter. Open a terminal in the folder where you want to install CoxIter and type the following commands:

git clone https://github.com/rgugliel/CoxIter
cd CoxIter/build
cmake ../
make

That's it. CoxIter should be ready to use.

Compilation on Windows with CygWin

First, we need to download CygWin: https://cygwin.com/install.html

Then, we need to install CygWin together with the following packages:

  • Devel > cmake
  • Devel > gcc-g++
  • Devel > git
  • Devel > make
  • Graphics > graphviz
  • Libs > libpcre-devel
  • Libs > libgmp-devel

We will suppose that CygWin was installed in "c:/cygwin/". You can choose any path you want but be sure not to include any space.

Once this is done, download PARI (http://pari.math.u-bordeaux.fr/) into your CygWin folder (c:/cygwin/home/YOURNAME/) and extract it. Then, to install PARI, open the CygWin terminal, and type the following:

cd pari
./configure
make install

Copy the file "c:/cygwin/usr/local/lib/libpari-gmp.dll" to "c:/cygwin/bin/libpari-gmp.dll"

Now, download and install CoxIter

cd ~
git clone https://github.com/rgugliel/CoxIter
cd CoxIter/build
cmake ../
make

That's it. CoxIter should be ready to use.

Compilation on Windows with MinGW/MSys

First, we need to download MinGW and MSys which will be used to build CoxIter.

Download and install MinGW (for example, you can use the "mingw-w64-install.exe" here: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/).
Note: it is important to choose an installation path without space. The easiest way is to choose "c:/mingw"

Download MSys: MSys
Extract the file and execute the "msys/postinstall/pi.bat" file. You will be asked to give the path to MinGW.
Once this is done, you can open the MSys console (the "msys.bat" file in the MSys folder).

Now, you can download PCRE here: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.39.zip
Extract the file. With the MSys console, browse to the PCRE folder and type the following commands:

./configure --prefix=c:/pcre/
make
make install

Download the last version of GMP from the official website.
Again, extract the file and use MSys console to browse to the extracted folder. Type the following commands:

./configure --prefix=c:/gmp/ --enable-cxx
make
make check
make install

You can browse now to the folder "CoxIter/Windows" and type the following:

make

You can now use CoxIter.

Compilation on Windows with Visual Studio

You will need at least Visual Studio 2013 to compile CoxIter (see here for a free version: Visual Studio Community).
As explained above, the program will run slower than with other compilers.

Building with the existing project (easiest way)

  • Open the project: /CoxIter/vc++/CoxIter.sln

Building with a new solution

To create a project from scratch, please follow the following steps:

  • Create a new "Win32 Console Application" empty project
  • Add all the files (including the ones in tools/ and its sub-folders)
  • In: Project properties > Configuration properties > VC++ Directories > Library directories
    Add: tools\pcre-windows
  • In: Project properties > Configuration properties > C++ > Linker > Input > Additional Dependencies
    Add: pcre.lib
  • Compile
  • Copy tools\pcre-windows\pcre.dll to the same folder as CoxIter.exe

Get the .exe file

If you cannot build CoxIter, you can try to use the file I built on my computer.
Note that this file is given WITHOUT ANY WARRANTY

First, install the "Visual C++ Redistributable Packages for Visual Studio 2013" for x86 (the file is named 'vcredist_x86.exe').
You can find it here: http://www.microsoft.com/en-gb/download/details.aspx?id=40784
Then, you can use the CoxIter.exe file which is located in "CoxIter/windows"