install:install

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
install:install [2019/01/26 11:02] – ↷ Page moved from howto:install to install:install oroehriginstall:install [2023/10/06 07:43] (current) – perlbrew benmuell
Line 1: Line 1:
-====== Installation from Source Code ====== +===== Installation from Source Code ===== 
-Installing ''polymake'' from the source code can be a rather tedious task compared to picking up ready-to-use binary packages like RPM or Fink Unfortunately, we can't afford to prepare binaries for all possible combinations of hardware and operating systemthus you'll sometimes have to take this approach.+This page describes how to install polymake from the source code. See the [[:download:start|downloads page]] for other ways of installing polymake. In particularif you are using Ubuntu or Debian, you might want to consider installing our [[:download:start##debian_fedora_gentoo_ubuntu|debian packages]].
  
-Please be aware that the installation procedure described here works on UNIX systems only ''polymake'' is not supported on any native Windows platform.  You might try to get it running in a UNIX emulation like [[http://www.cygwin.com/|Cygwin]], but you will be left to your own devices since we are not used to this setup.+**Warning:** Unfortunately polymake is **not compatible with perl 5.38.0 or newer**. Since several Linux distributions have switched to the new perl version the polymake package had to be removed from their repositories. If you want to continue using polymake you can try our new [[install:jll|jll-based binaries]] or see below to build polymake from source with a [[install:install#Perlbrew|custom perl]]. 
 + 
 +Usually, following the description in the [[install#quick_summary|quick summary]] should do the job. Please be aware that the installation procedure described on this page works on UNIX systems with the newest version of polymakeIf you have special needs, you might find help in other places: 
 + 
 +=== Mac === 
 +We support some versions of MacOS. Please visit the [[.macos:source|Mac installation page]] for detailed instructions. 
 +  
 +=== Windows === 
 +''polymake'' is not supported on any native Windows platform. You might try to get it running in a UNIX emulation like [[http://www.cygwin.com/|Cygwin]], but you will be left to your own devices since we are not used to this setup
 + 
 +=== Legacy versions === 
 +If you for some reason are trying to build an old version of polymake, please consult the [[install:install_legacy|legacy installation page]] additionally, as it may have details that are not necessary for the most recent polymake anymore.
  
-If you for some reason are trying to build an old version of polymake, please consult the [[howto/install_legacy|legacy installation page]] additionally, as it may have details that are not necessary for the most recent polymake anymore. 
  
 ===== Quick summary ===== ===== Quick summary =====
-Installing polymake from sources can usually be accomplished using the following five steps:+Installing polymake from sources can usually be accomplished using the following six steps:
  
-  - Download a source tarball from the [[download/start|download page]]. +  * Make sure to have a supported perl version **older** than 5.38. Otherwise check the section on [[install:install#Perlbrew|perl-brew]]. 
-  Unpack the tarball and change into the source directory with <code>tar xjf polymake-VERSION.tar.bz2+   
 +  * Download a source tarball from the [[download/start|download page]]. 
 + 
 +  Unpack the tarball and change into the source directory with <code>tar xjf polymake-VERSION.tar.bz2
 cd polymake-VERSION cd polymake-VERSION
 </code>  </code> 
-  - Install needed packages according to your distribution. In the [[howto/install#distributions|distributions section]] there are lists of packages for a variety of linux distributions. 
-  - Configure polymake with <code>./configure</code> There are many options that you can (de-)activate, see the [[howto/install#configuration|configuration section]] and the [[howto/install#further_options|further options subsection]] for details. 
-  - Make and install polymake with <code>make 
-sudo make install 
-</code> If your system has multiple cores you can speed of the build process, see the [[howto/install#compilation_and_installation|build section]] for further details. 
  
 +  * Install all [[install#dependencies|needed dependencies]] according to your distribution. In the [[install#distributions|distributions section]] there are lists of packages for a variety of linux distributions.
 +
 +  * Configure polymake with <code>./configure</code> There are many options that you can (de-)activate, see the [[install:install#configuration|configuration section]] and the [[install:install#further_options|further options subsection]] for details.
 +
 +  * Make and install polymake with <code>make
 +sudo make install
 +</code> If your system has multiple cores you can speed of the build process, see the [[install:install#compilation_and_installation|build section]] for further details.
  
  
-===== Preparation ===== +===== Dependencies ===== 
-Before you start you should check whether you have got all the building tools and prerequisite packages:+==== Must have ==== 
 +Before you start you should check whether you have got all the building tools and prerequisite packages. See the [[install:install#distributions|distributions section]] for package lists for some common linux distros. Here's what you'll need:
   * C and C++ compilers with full ''C++14'' support, one of the following is recommended:   * C and C++ compilers with full ''C++14'' support, one of the following is recommended:
     * ''gcc'' and ''g++'', version at least 5 (Note that these might come in separate packages)      * ''gcc'' and ''g++'', version at least 5 (Note that these might come in separate packages) 
Line 36: Line 52:
   * GNU Readline & History library v5.0+   * GNU Readline & History library v5.0+
  
-  * Perl 5.16.0+, with all of the following modules:+  * Perl 5.16.0-5.36.x, with all of the following modules:
     * ''ExtUtils::Embed'', which some distributions ship separately as ''perl-ExtUtils-Embed''     * ''ExtUtils::Embed'', which some distributions ship separately as ''perl-ExtUtils-Embed''
-    * ''XML::LibXML'', ''XML::LibXSLT'', and ''XML::Writer''+    * ''XML::SAX'' 
 +    * ''XML::Writer''
     * ''Term::ReadLine::Gnu''     * ''Term::ReadLine::Gnu''
     * ''Term::ReadKey''     * ''Term::ReadKey''
 +    * ''JSON''
  
   * [[http://gmplib.org/|GMP library]] 5.1.0+ . Some Linux vendors split the GMP in two packages, shared libraries and development stuff.  Please install both. You also need to enable/install the C++ bindings for polymake version 2.11+.   * [[http://gmplib.org/|GMP library]] 5.1.0+ . Some Linux vendors split the GMP in two packages, shared libraries and development stuff.  Please install both. You also need to enable/install the C++ bindings for polymake version 2.11+.
   * [[http://www.mpfr.org/|MPFR library]] 3.0.0+ . Again both shared libraries and development stuff are required.   * [[http://www.mpfr.org/|MPFR library]] 3.0.0+ . Again both shared libraries and development stuff are required.
   * [[http://www.boost.org/|boost]] headers. The basic ''libboost-dev'' should suffice, no shared libraries are required for boost.   * [[http://www.boost.org/|boost]] headers. The basic ''libboost-dev'' should suffice, no shared libraries are required for boost.
 +  * [[http://flintlib.org/|FLINT]] 2.5.2+. (This dependency is strongly recommended but can be disabled if it cannot be fulfilled)
  
-See the [[howto/install#distributions|distributions section]] for package lists for some common linux distros.+==== Perlbrew ====
  
-==== Recommended software ====+If your perl version is 5.38 or newer you need to build a custom perl to use with polymake. The easiest way to do this is to install ''perlbrew'' with your package manager (or from https://perlbrew.pl/).
  
 +Once you have perlbrew installed you need to initialize it with ''perlbrew init'' and add ''source ~/perl5/perlbrew/etc/bashrc'' to your shell rc file as shown in the output.
 +To build a compatible perl use:
 +<code>
 +perlbrew install perl-5.36.1 --as pmperl -Duseshrplib
 +</code>
 +
 +The above command will take a few minutes, once that is done you can (temporarily) switch the perl version for the current shell with ''perlbrew use pmperl''. This change is active until you close that terminal again.
 +
 +To install the required perl modules for this perl installation run:
 +<code>
 +perlbrew use pmperl
 +perlbrew install-cpanm
 +cpanm Term::ReadLine::Gnu Term::ReadKey XML::SAX XML::Writer JSON SVG
 +</code>
 +
 +In this shell you can now run the configure script for polymake and continue with the installation instructions. Make sure to always switch the perl to ''pmperl'' before running ''polymake''.
 +
 +==== Recommended software ====
 +If you want pretty things and use [[:external_software|bundled extensions]], you might want to consider installing further packages.
 === Libraries === === Libraries ===
  
   * [[http://www.tcs.hut.fi/Software/bliss/|bliss]] for computing automorphism groups of graphs and checking combinatorial equivalence of polytopes. Strongly recommended for the ''-minimal'' package, see also below.   * [[http://www.tcs.hut.fi/Software/bliss/|bliss]] for computing automorphism groups of graphs and checking combinatorial equivalence of polytopes. Strongly recommended for the ''-minimal'' package, see also below.
   * [[http://bugseng.com/products/ppl/|PPL]] for convex hull computations, in many cases faster than the bundled cdd or lrs code.\\ polymake 3.2 requires ppl version at least 1.2.   * [[http://bugseng.com/products/ppl/|PPL]] for convex hull computations, in many cases faster than the bundled cdd or lrs code.\\ polymake 3.2 requires ppl version at least 1.2.
-  * [[http://www.singular.uni-kl.de/|Singular]] for Groebner basis computations.+  * [[http://www.singular.uni-kl.de/|Singular]] for Groebner basis computations. Check the [[installsingular| installation instructions for Singular]].
  
 === Perl modules === === Perl modules ===
Line 67: Line 105:
  
 ==== Minimal tarball ==== ==== Minimal tarball ====
- +Since the minimal tarball version does not contain several of the bundled libraries, the packaging system should make sure the following additional dependencies are met. Check ''%%./configure --help%%'' for the corresponding command line arguments.
-=== Mandatory dependencies === +
- +
-Since the minimal tarball does not contain several of the bundled libraries, the packaging system should make sure the following additional dependencies are met. Check ''%%./configure --help%%'' for the corresponding command line arguments.+
  
   * convex hull computation, at least cdd is required:   * convex hull computation, at least cdd is required:
Line 80: Line 115:
     * [[http://cs.anu.edu.au/~bdm/nauty/|nauty]] //source// directory (supported since polymake 3.0r2)     * [[http://cs.anu.edu.au/~bdm/nauty/|nauty]] //source// directory (supported since polymake 3.0r2)
  
- +As the [[http://www.math.uni-rostock.de/~rehn/software/permlib.html|PermLib]] and [[http://www.math.uni-rostock.de/~rehn/software/sympol.html|SymPol]] librarys polymake uses are not available in most distributions, they are included even in the minimal tarball.
-=== Libraries included in the minimal tarball === +
- +
-Since the following libraries are not available in most distributions they are included even in the minimal tarball: +
- +
-  * [[http://www.math.uni-rostock.de/~rehn/software/permlib.html|PermLib]] (by [[http://www.math.uni-rostock.de/~rehn/​|Thomas Rehn]]) is shipped with polymake in ''external/permlib''.\\ The interface also supports a custom directory via ''%%--with-permlib=%%//DIR//''+
-  * [[http://​www.math.uni-rostock.de/​~rehn/software/sympol.html|SymPol]] (by [[http://​www.math.uni-rostock.de/​~rehn/​|Thomas Rehn]] and [[http://​www.mathematik.uni-rostock.de/​lehrstuehle/​geometrie/​people/​|Achill Schürmann]]) is included in ''bundled/sympol/external/sympol''.\\ The interface also supports a custom directory via ''%%--with-sympol=%%//DIR//''. Note that using a custom sympol installation is incompatible with the bundled versions of cdd, lrs and permlib; i.e. all of these have to be installed separately. +
- +
-More information on the bundled extensions and the corresponding software can be found [[:external_software#bundled_extensions_for_polymake|here]].+
  
 ===== Configuration ===== ===== Configuration =====
-The next step after unpacking the tar ball is <code>./configure</code>  polymake's configuration is **not** based on autoconf, but it looks similar.  If you are working in a [[howto/install#distributions|standard environment]] then your configuration probably does not require any further options.  For more elaborate ways to configure your setup see [[howto/install#further_options|below]].+The next step after unpacking the tar ball is <code>./configure</code>  polymake's configuration is **not** based on autoconf, but it looks similar.  If you are working in a [[install:install#distributions|standard environment]] then your configuration probably does not require any further options.  For more elaborate ways to configure your setup see [[install:install#further_options|below]].
  
 After the configuration, you get a new subtree ''build.ARCH'', where ''ARCH'' is usually an abbreviation of your hardware platform as reported by ''uname -m'' .  Inside this directory there is a file ''conf.make'' which can be manually edited, if necessary. After the configuration, you get a new subtree ''build.ARCH'', where ''ARCH'' is usually an abbreviation of your hardware platform as reported by ''uname -m'' .  Inside this directory there is a file ''conf.make'' which can be manually edited, if necessary.
Line 142: Line 169:
     * ''%%--with-soplex=%%//DIR//'' soplex directory, built with ''GMP=true'' and ''SHARED=true''     * ''%%--with-soplex=%%//DIR//'' soplex directory, built with ''GMP=true'' and ''SHARED=true''
     * ''%%--with-permlib=%%//DIR//'' permlib header directory     * ''%%--with-permlib=%%//DIR//'' permlib header directory
-    * ''%%--with-sympol=%%//DIR//'' sympol installation directory, headers should be ''//DIR///include/sympol/'', ''yal'' and ''matrix'' must be in subfolders+    * ''%%--with-sympol=%%//DIR//'' sympol installation directory, headers should be ''//DIR///include/sympol/'', ''yal'' and ''matrix'' must be in subfolders.  Note that using a custom sympol installation is incompatible with the bundled versions of cdd, lrs and permlib; i.e. those then have to be installed separately.
     * ''%%--with-libnormaliz=%%//DIR//'' libnormaliz installation directory     * ''%%--with-libnormaliz=%%//DIR//'' libnormaliz installation directory
  
Line 178: Line 205:
 **Note:** If you are installing polymake in your home-directory, i.e. you have set ''%%--prefix%%'', you should omit ''sudo'' in the above commands. **Note:** If you are installing polymake in your home-directory, i.e. you have set ''%%--prefix%%'', you should omit ''sudo'' in the above commands.
  
-==== Building the documentation ==== +===== Dependency lists for common distros =====
-Finally, to obtain a copy of the reference documentation in HTML format (gathering everything you can get with interactive ''help'' commands a one place), run +
-  sudo make release-docs +
- +
-This will create all files in the documentation directory chosen during the configuration, again omit sudo for a user-install. By default the documentation will be installed into ''/usr/local/share/polymake/doc''.  +
- +
-If you have already used polymake and installed extensions to polymake then to include them for the documentation, run +
-  sudo make docs +
- +
-Should you import or create a new extension later, you can also run the polymake script ''generate_docs'' to complete your documentation. +
- +
-===== Distributions =====+
  
 ==== Debian and Ubuntu ==== ==== Debian and Ubuntu ====
- 
 === Packages === === Packages ===
- 
 We are proud to announce that polymake is part of the debian package library. So for newer debian based distributions like Ubuntu 15.10 (Wily Werewolf) you can install polymake by using the command: We are proud to announce that polymake is part of the debian package library. So for newer debian based distributions like Ubuntu 15.10 (Wily Werewolf) you can install polymake by using the command:
 <code>sudo apt-get install polymake</code> <code>sudo apt-get install polymake</code>
Line 202: Line 216:
 You may want to use other visualization methods like ''threejs'', ''tikz'' or ''javaview''. You may want to use other visualization methods like ''threejs'', ''tikz'' or ''javaview''.
  
-=== Source installation === +=== Installation from Source === 
- +On most recent Ubuntu versions installing the following packages (and their dependencies) should suffice to build ''polymake'' 4.from source:
-On most recent Ubuntu versions installing the following packages (and their dependencies) should suffice to build ''polymake'' 3.from source:+
 <code>sudo apt-get install ant ant-optional default-jdk g++ libboost-dev \ <code>sudo apt-get install ant ant-optional default-jdk g++ libboost-dev \
-libgmp-dev libgmpxx4ldbl libmpfr-dev libperl-dev libterm-readline-gnu-perl \ +libflint-dev libgmp-dev libgmpxx4ldbl libmpfr-dev libperl-dev libterm-readline-gnu-perl \ 
-libxml-libxml-perl libxml-libxslt-perl libxml-perl libxml-writer-perl +libxml-perl libxml-writer-perl libterm-readkey-perl libjson-perl ninja-build
-libterm-readkey-perl libxml2-dev xsltproc ninja-build+
 </code> </code>
  
 If you are going to use the [[:polydb|polymake Database]], you'll also need to install If you are going to use the [[:polydb|polymake Database]], you'll also need to install
-<code>libmongodb-perl libjson-perl</code>+<code>libmongodb-perl</code>
  
 The following packages are recommended but not strictly necessary: The following packages are recommended but not strictly necessary:
Line 219: Line 231:
 ==== Fedora ==== ==== Fedora ====
  
-The following should suffice to be able to build polymake from source on Fedora 25+The following should suffice to be able to build polymake from source on Fedora
  
 <code>sudo dnf install ant java-1.8.0-openjdk-devel gcc-c++ boost-devel \ <code>sudo dnf install ant java-1.8.0-openjdk-devel gcc-c++ boost-devel \
-gmp-devel mpfr-devel perl-devel perl-XML-LibXML perl-XML-LibXSLT +flint-devel gmp-devel mpfr-devel perl-devel perl-XML-Writer 
-perl-XML-Writer libxml2-devel perl-ExtUtils-Embed perl-Term-ReadKey \ +perl-ExtUtils-Embed perl-TermReadKey perl-Term-ReadLine-Gnu bliss-devel 
-perl-Term-ReadLine-Gnu bliss-devel ninja-build perl-JSON</code>+ninja-build perl-JSON</code>
  
 You might need to specify the path to your java installation with ''%%--with-java=JAVA_HOME%%''. You might need to specify the path to your java installation with ''%%--with-java=JAVA_HOME%%''.
Line 233: Line 245:
  
 <code> <code>
-sudo pacman -S gcc libxml2 libxslt readline perl libxml-perl perl-xml-libxslt +sudo pacman -S gcc readline perl libxml-perl perl-xml-writer perl-json 
- perl-xml-writer perl-term-readline-gnu perl-term-readkey mpfr gmp boost ninja+perl-term-readline-gnu perl-term-readkey mpfr gmp boost ninja flint
 </code> </code>
  
Line 242: Line 254:
 ==== Scientific Linux ==== ==== Scientific Linux ====
 The following packages together with their dependencies should suffice to build polymake on a minimal install of SL7: The following packages together with their dependencies should suffice to build polymake on a minimal install of SL7:
-<code>lbzip2 perl gcc-c++ perl-XML-Writer perl-XML-LibXML perl-XML-LibXSLT \ +<code>lbzip2 perl gcc-c++ perl-XML-Writer perl-Term-ReadLine-Gnu 
-perl-Term-ReadLine-Gnu perl-Term-ReadKey gmp-devel mpfr-devel boost-devel \ +perl-Term-ReadKey gmp-devel mpfr-devel boost-devel perl-ExtUtils-Embed\ 
-libxml2-devel perl-ExtUtils-Embed</code> +ninja-build 
- +</code>
-There does not seem to be a ninja package for Scientific Linux, you can either fetch a generic binary or built it from source, see [[https://ninja-build.org/|here]] for details.+
  
 For visualization via jreality ''java-1.8.0-openjdk-devel'' and ''and-antlr'' are needed, passing ''%%--with-java=/usr/lib/jvm/java%%'' to configure should help with the java detection. For visualization via jreality ''java-1.8.0-openjdk-devel'' and ''and-antlr'' are needed, passing ''%%--with-java=/usr/lib/jvm/java%%'' to configure should help with the java detection.
- 
-==== Special Notes for Mac OS X ==== 
-The C++ compiler is not part of the standard system installation and has to be installed separately. All required perl modules, as well as the GMP and GNU readline libraries, can be installed via [[http://www.finkproject.org/|Fink]], [[http://brew.sh/|Homebrew]] or independently.  Look at our page with [[mac|extra information for the Mac]] for detailed instructions. 
- 
- 
- 
  
  
  • install/install.1548500533.txt.gz
  • Last modified: 2019/01/26 11:02
  • by oroehrig