AlVin  1.0
A C++ implementation of the Vinberg's algorithm for Q, Q( sqrt(d) ) and Q( cos(2 pi / 7) )
Building AlVin

Table of Contents

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.

You will need g++ and cmake to compile AlVin and CoxIter. The libraries graphviz, pcre and pari are needed for CoxIter and libxml2 is an additional library needed by AlVin. The easiest way to obtain the source code is using git.

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 libxml2-dev git

On Fedora, type the following commands in a Shell:

sudo dnf install gcc-c++ cmake graphviz cppunit-devel pcre-devel pari-devel gmp-devel libxml2-devel git

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

git clone --recursive https://github.com/rgugliel/AlVin

We also need the following libraries: crlibm, GAOL, igraph and Eigen
You can either download the libraries separately or use the versions given with AlVin. In the latter case, type the following commands:

cd AlVin/lib/
tar -xf crlibm-1.0beta5.tgz
cd crlibm/
./configure
make
sudo make install
cd ..
tar -xf gaol-4.2.0.tar.gz
cd gaol-4.2.0/
./configure -q --disable-verbose-mode --with-mathlib=crlibm
sudo make install
cd ..
tar -xf igraph-0.7.1.tar.gz
cd igraph-0.7.1/
./configure
make
sudo make install
cd ..
tar -xf eigen-eigen-*.tar.bz2
cd eigen-eigen-*/
mkdir build
cd build
cmake ../
sudo make install
cd ../../
rm -rf gaol-4.2.0/
rm -rf crlibm/
rm -rf igraph-0.7.1/
sudo rm -rf eigen-eigen-*/
cd ../../

You can now build AlVin:

cd AlVin/build/
cmake ../
make

Compilation

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

cd AlVin/build
cmake ../
make

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

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

Troubleshooting

If one of the library (PCRE, PARI/GP) is installed but is 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 OSX

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++
brew install Caskroom/cask/xquartz
brew install homebrew/x11/pari

Now, download the last version of GMP from the official website.
Extract the downloaded file and open a terminal in GMP folder. Then, use the following commands:

./configure
make
make check
sudo make install

We can now download Alvin. With a shell, go to the directory where you want to install AlVin and type the following:

git clone --recursive https://github.com/rgugliel/AlVin

We also need the following libraries: igraph and Eigen
You can either download the libraries separately or use the versions given with AlVin. In the latter case, type the following commands:

cd AlVin/lib/
tar -xf igraph-0.7.1.tar.gz
cd igraph-0.7.1/
./configure
make
sudo make install
cd ..
tar -xf eigen-eigen-*.tar.bz2
cd eigen-eigen-*/
mkdir build
cd build
cmake ../
sudo make install
cd ../../
rm -rf igraph-0.7.1/
sudo rm -rf eigen-eigen-*/
cd ../../

You can now build AlVin:

cd AlVin/build/
cmake ../
make

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:

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 CgyWin 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"

With a shell, go to the directory where which contains AlVin and CoxIter

We also need the following libraries: igraph and Eigen
You can either download the libraries separately or use the versions given with AlVin. In the latter case, type the following commands:

cd AlVin/lib/
tar -xf igraph-0.7.1.tar.gz
cd igraph-0.7.1/
./configure
make
make install
cd ..
tar -xf eigen-eigen-*.tar.bz2
cd eigen-eigen-*/
mkdir build
cd build
cmake ../
make install
cd ../../
rm -rf igraph-0.7.1/
rm -rf eigen-eigen-*/
cd ../../

You can now build AlVin:

cd AlVin/build/
cmake ../
make