install:mac

# polymake on the Mac

• Release 3.4 of polymake compiles on Mac OS 10.11 to 10.14 (other versions are untested but should work)

You can use brew or fink to resolve dependencies or install them yourself. Precompiled bundles are also available.

Currently you have the following options to install polymake versions 3.4:

• Mac OS X 10.11-10.14: compiling sources from scratch using brew to resolve dependencies.
• Mac OS X 10.11-10.14: compiling sources from scratch using Fink to resolve dependencies.
• Mac OS X 10.11-10.14: compiling sources from scratch and resolving dependencies by installing them yourself.
• Mac OS X 10.11-10.14: install docker and use the docker start script for polymake avaialble for download (no visualization, no jupyter)

Please have a look at the bundle available on the download page (only Macbooks of Fall 2013 or later). This is a precompiled bundle. You have to install apple's command line tools first, see here, after that you can just drag the bundle into the /Applications folder as with most other programs.

To do a source installation we recommend using Homebrew to resolve dependencies, but you can also use Fink or install all required dependencies from the sources yourself. See here for a detailed description.

If you choose to install the source distribution of polymake then you can also build you private documentation. This has the advantage that it will also include documentation contained in extensions (see our extensions howto for more information) that you have installed locally on your computer. See here for instructions.

If you encounter difficulties during installation you can check

We constantly try to improve the installation process and have tested the installation process on different Mac OS X installations, but sometimes combinations of compiler/perl-versions lead to problems we haven't yet experienced. If you have problems installing polymake please tell us so that we can try to help and improve the installation process.

Once you have installed polymake you probably also want to install some external packages that you can use together with polymake (the bundle already comes with singular). A complete list is here. If you encounter problems here, we have collected some common issues and the corresponding solution here. However, usually it is better to contact maintainers of the other software directly.

# Source Installation

For a source installation you should follow the instructions in the order given below. Some steps are only required for a specific version of Mac OS. Choose the appropriate.

Note: Not all steps might be necessery for you. Check the subpages.

• Compiler: See here.
• If you compile all dependencies yourself: The ninja build system: Go to the ninja page and download and extract the mac binary on your mac (e.g. create a directory $HOME/bin, extract the dmg in this directory and add $HOME/bin to your path)
• X11: If you use Fink to resolve dependencies, then you have to install XQuartz first (get the latest binaries as disk image here. Follow the installation instructions). Otherwise, you don't need to do anything here.
• Java: You need Java, but this is not installed by default on MacOS. Fink asks you during its installation whether to install Java, otherwise you can download and install one here or here.
• Solving dependencies on other packages: polymake relies on some other software packages that are not installed on a Mac by default. You have to install them yourself. There are several options to do this:
• There are various package managers for Mac available that make it rather simple and reliable to install software on a Mac. We have tested two: Fink and Homebrew. See here for more details:
• If you don't want to use one you can also install all necessary software yourself. Though this is not difficult we still recommend to use a package manager for not so experienced Mac users. For more detailed instructions see here.

With these preparations you are ready to compile polymake. You can now get the release version from github.

For compilation see

• here if you have decided to use Fink to resolve dependencies and
• here if you have decided to use Homebrew and Perlbrew to resolve dependencies and
• here if you provide dependencies on your own.

You can build your own local version of the documentation with

make docs

This will create all files in the documentation directory chosen during the configuration. If you have already installed extensions to polymake then this will be included right now. Should you import or create a new extension later, you can run the polymake script generate_docs to complete your documentation.

• Calling polymake in a terminal should now start the interactive shell.
• At the first start polymake will try to find some third-party software installed on your computer it knows how to communicate with. You can examine the list of unsuccessful attempts by calling the command show_unconfigured in the shell.
• For an introduction on how to work with the shell see here. Enjoy.

# Installing the App Bundle

It is still necessary to install apple's command line tools. However, this version does not depend on Fink or Homebrew and doesn't require compilation. To install the command line tools try to run clang in a terminal and click install in the window that opens. If that does not work then run xcode-select –install in a terminal. You can also install the full XCode IDE from the app store, but this takes about 20 times more disk space than the command line tools.

Installation of the bundle works as for any other Mac app that does not come via the app store:

• Mount the disk image.
• Drag the polymake application to a folder of your choice on your hard disk (the common choice would be the /Applications folder).
• Start polymake by double clicking the icon.

The disk image also contains a README file with some more detailed instructions, and the corresponding sources.

Note that the application is not a true Mac application. It just opens a Terminal and starts polymake. This implies the following limitations:

• It does not appear in the Dock, or in the list of running applications.
• Clicking the icon again always opens a new instance of polymake instead of switching to a running instance.
• It is not relocatable. After you started polymake once you have to reset the customization of polymake and all extensions if you want to move the app to a different folder. See the README for more details.

The bundle comes with a still experimental support for starting polymake in a jupyter notebook. To use it you need to install python3 and jupyter yourself and make sure polymake can find both in the path (usually python is found with the default path, only jupyter needs to be added. You have two options for this: add the path to the $PATH variable in .bash_profile, or add the path to the variable POLYMAKE_ADD_PATH in the file$HOME/.polymake-macbundle/bundle.config created after the first start of the bundle.) To use polymake in a jupyter notebook, start the bundle at least once and exit, then set POLYMAKE_START_IN_JUPYTER to 1 in $HOME/.polymake-macbundle/bundle.config, and start polymake again. It should ask your confirmation to install the kernel and then start a browser with jupyter. On Mac OS 10.11 you need at least clang version 8 (for Julia, and thus also for polymake in Julia). You can use the bundle together with Polymake.jl in Julia. You need however to prepare your Julia. Note however that this is still an experimental feature and may fail on your system. We value feedback on this! Start both Julia and the bundle at least once to create the user configuration directories. Download this file and save it to a location on your computer. Open a terminal and do mkdir -p$HOME/.julia/config
echo 'include("/path/to/file/polymake_start_julia.jl")' >> $HOME/.julia/config/startup.jl where /path/to/file should be the full path (so starting with /Users) to the file you downloaded. Now start julia and hopefully it downloads and compiles Polymake.jl, linking it against the bundle. # Compiling your own version of the bundle You can build your own version of the bundle with the following steps. The only prerequisite is Xcode, which you can easily install via the app store. Then open a Terminal (in the utilities folder of Applications) and type the following commands (if you want to you can first switch into a different folder): git clone https://github.com/polymake/polybundle.git cd polybundle ./build_bundle open -R . The third command will take a long while. Here, all required software packages are downloaded and installed, so you need a working connection to the internet during this step. The last command opens a finder window of the folder polymake is compiled in. If everything worked you will find the polymake app (look for the logo) in that folder. You can either drag this to /Applications or start directly from this folder by double clicking. The same usage hints as for the precompiled binaries above apply also to this version. # Potential Problems If you encounter any problems with the app bundle, please execute [path/to/polymake.app]/Contents/MacOS/polymake.debug -c in a Terminal window. This will create a file poly.log.[Timestamp] in your home directory. Please send this file to forum@polymake.org. The Fink F.A.Q. provides detailed answers to many problems with Fink, and questions about Fink installation problems should mainly be directed to the Fink team (e.g. use the Fink-beginners mailing list, see here), but contact us if you are unsure what the problem is. • Fink cannot do a selfupdate: Check whether you are behind a firewall or a proxy. If so, you have to tell Fink this using fink configure. If it still does not work (i.e. Fink still asks you to choose a different mirror), then maybe the approriate ports are blocked in your network. Contact the local administrators, or choose a less restictive network. #### JavaView Download JavaView (you need the Unix version) from this page and unzip it into some directory on your computer. If you are going to use JavaView on its own (it can much more than only serving as a showcase for polymake!), you'll have to prepare its start script javaview, which is located in the sub-directory bin/ . You have to make it executable with chmod u+x bin/javaview. You should place the full path to this script in the $PATH variable of your terminal (and remember to change this if you move your javaview installation to a different place). Then start polymake and execute reconfigure("javaview.rules") . This should automatically find the script and start JavaView once for testing - just click its window away.

If you are only interested in polymake interface to JavaView, then execute the reconfigure command right after unpacking the ZIP archive; now you will be asked to enter the location of the unpacked JavaView manually.

#### POV-Ray

polymake has been tested with the povray version that comes with Fink. The Mac OS X version seems to have problems with the newer Intel Macs.

povray is quite restrictive with files it reads and writes. So before you can use povray with polymake you have to allow it to read from the povray sub-directory of your polymake-root directory, and from the temporary directory polymake places temporary files into. It should be something starting with /private/var/folders. If you don't now where it is, you can call

$c=cube(2); povray($c->VISUAL);

in a polymake shell. It will tell you something like Parse Error: Reading from … is not permitted. Place the given directory in the povray.conf file (The error message will also tell you where you can find it). Add a line

read* = <dir>

for both the temp dir and the povray dir of polymake (You might need to use sudo to be allowed to write into that file.)

If you use the Fink version of povray and installed polymake into its standard location, then the povray.conf file should be in

/sw/etc/povray/3.6/povray.conf

and you should add the lines

read* = /usr/local/share/polymake/povray
read* = /private/var/folders

at the end of the file.

#### Porta

Before compiling porta you should significantly increase the length of the char array fname in porta.c, say from 20 to 100. The variable contains the name of the input file, which polymake places in a temporary directory. The name of the directory is significantly longer on a Mac than on a Linux system.

Before you install porta you should also consider the remarks about porta on the external software page

• install/mac.txt