Page 1 of 1

Help installing polymake

Posted: 29 Jan 2023, 20:07
by Chlo
Hi All,

I hope this isn't too much of a basic question, I'm trying to install polymake on my mac and I've followed all the steps indicated here (https://polymake.org/doku.php/install/macos), except that when I arrived at the stage "Download polymake", I got an error message when I typed "tar -xvfj polymake-4.9.tar.bz2" into terminal (note on the page it says polymake-4.3 instead of 4.9, I guess this was the latest version when this page was last updated). I got it to work after removing the "j" (typing tar -xvf polymake-4.9.tar.bz2), so now I'm trying to go through the next steps, which is to write:

cd ~/Downloads/polymake-4.9
./configure --without-java
ninja -C build/Opt -j2 install

but I end up with an error message like so:

MacBook-Air-2:polymake-4.9 Chloe$ ./configure --without-java
checking C++ compiler ... ok (g++ is Apple CLANG (roughly 10.0) from Xcode 13.1.6)
checking C++ library ... ok (libc++ 13000, C++ 201402)
checking for package manager ... no package manager specified
determining architecture ... ok (darwin.arm64)
determining compiler flags ... ok
CFLAGS=
CXXFLAGS= -std=c++14 -Wno-logical-op-parentheses -Wno-shift-op-parentheses -Wno-mismatched-tags -Wno-unused-local-typedef -Wno-error=unneeded-internal-declaration -Wshadow -Wconversion -Wno-sign-conversion -Wzero-as-null-pointer-constant
LDFLAGS=
checking gmp installation ... Could not compile a test program checking for the GNU Multiprecision Library (GMP).
The most probable reasons are that the library is installed at a non-standard location,
lacking developer's subpackage or missing at all.
Please refer to the installation instructions at http://www.polymake.org/doku.php/howto/install.
The complete error log follows:
g++ -std=c++14 -Wno-logical-op-parentheses -Wno-shift-op-parentheses -Wno-mismatched-tags -Wno-unused-local-typedef -Wno-error=unneeded-internal-declaration -Wshadow -Wconversion -Wno-sign-conversion -Wzero-as-null-pointer-constant -o /var/folders/ck/4jxlnb5n4lgcs15p685d2v6r0000gn/T//polymake_68463_configure /var/folders/ck/4jxlnb5n4lgcs15p685d2v6r0000gn/T//polymake_68463_configure.cc -lgmp -lc++
/var/folders/ck/4jxlnb5n4lgcs15p685d2v6r0000gn/T//polymake_68463_configure.cc:2:10: fatal error: 'gmp.h' file not found
#include <gmp.h>
^~~~~~~
1 error generated.
MacBook-Air-2:polymake-4.9 Chloe$ ninja -C build/Opt -j2 install
ninja: Entering directory `build/Opt'
ninja: fatal: chdir to 'build/Opt' - No such file or directory

I'm sorry I have very limited knowledge of computers, the most advanced stuff I did before was a bit of java programming, I would really appreciate any kind of help.

Re: Help installing polymake

Posted: 30 Jan 2023, 15:51
by paffenholz
I can't explain the first problem about decompressing the tar archive. Does your browser decompress automatically, but keep the file name? Anyway, you got the sources. The pages indeed haven't updated for a year now, but the general process should still be correct.

From the second error I assume that you skipped the installation of perlbrew and homebrew (on the same wiki page a littel further up), which is needed to install quite a lot of dependencies for polymake. Specifically it seems you did not do

Code: Select all

brew install gmp
Or you installed brew into a non-standard location, in which case you should supply the base path with

Code: Select all

--with-brew=<path>
to configure.

Andreas

Re: Help installing polymake

Posted: 31 Jan 2023, 18:59
by Chlo
Hi Andreas,

Thank you so much for your answer! It turns out that compiling works if you put the j first (i.e. I entered "tar -jxvf polymake-4.9.tar.bz2"). I did install gmp (and I tried reinstalling it, but to no avail). Instead I've been trying the following things:
- I tried installing it though sage with pip install polymake but kept getting error legacy-install-failure. From https://github.com/PyTables/PyTables/issues/828 I get that it seems to be a problem with the newest version of mac os? I currently have 12.0.1.
- I tried downloading polybundle-v4.4-macos-11.3-perl-5.30.2-v1.dmg, and I thought it would be okay but when I try to open it I get an error message saying that my current version of perl is 5.30.3 whereas this package is for perl 5.30.2, as it says in the name. I don't think there is any bundle compatible with the newest version of perl yet?

Best,
Chloe

Re: Help installing polymake

Posted: 03 Feb 2023, 11:17
by paffenholz
The missing gmp is a bit mysterious to me. Is brew installed at /usr/local/ (is there a folder /usr/local/Homebrew/)?
Is there a gmp.h at

Code: Select all

/usr/local/include/gmp.h
?

The bundles don't work on newer macs. We are in the process of creting new ones, but that will still take some time.

Best
Andreas