Compiling polymake on macOS 10.14

Discussions on installation issues go here.

Moderator: Moderators

green
Posts: 2
Joined: 10 Apr 2019, 14:10

Compiling polymake on macOS 10.14

Postby green » 10 Apr 2019, 14:32

I've been trying to install polymake on macOS 10.14 and ran into a few problems.
I have Xcode installed and downloaded Java from https://www.java.com/en/download/mac_download.jsp .
I used brew to resolve dependency issues.
I got the latest release from git and issued

Code: Select all

./configure --without-fink LDFLAGS=' -stdlib=libstdc++' CXXFLAGS=-I/usr/include/c++/4.2.1
which gave the following error:

Code: Select all

checking C++ compiler ... C++ compiler g++ could not compile a test program for version recognition: clang: warning: libstdc++ is deprecated; move to libc++ [-Wdeprecated] warning: include path for stdlibc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found] /var/folders/lz/nt5r_68s7x73d2flvbct7x3m0000gn/T//polymake_62124_configure.cc:1:10: fatal error: 'iostream' file not found #include <iostream> ^~~~~~~~~~ 1 warning and 1 error generated. Please investigate and reconfigure with CXX=<appropriate C++ compiler>
So I ran the same command using

Code: Select all

'-stdlib=libc++'
, which worked.
Now, if I do

Code: Select all

make
I receive an error regarding java:

Code: Select all

ninja -C build/Opt all ninja: Entering directory `build/Opt' [1/1] BUILD /Users/janinheuer/polymake/build/Opt/jars/polymake_jreality.jar FAILED: /Users/janinheuer/polymake/build/Opt/jars/polymake_jreality.jar JAVA_HOME=/usr ant -S -q -f /Users/janinheuer/polymake/bundled/jreality/java/build.xml -Dpolymake.top=/Users/janinheuer/polymake -Dbuild.dir=/Users/janinheuer/polymake/build/Opt -Djar.name=`basename /Users/janinheuer/polymake/build/Opt/jars/polymake_jreality.jar` -Ddebug=`if [ Opt = Debug ]; then echo on; else echo off; fi` all Unable to find a $JAVA_HOME at "/usr", continuing with system-provided Java... Using Java version 12. error: Source option 6 is no longer supported. Use 7 or later. error: Target option 6 is no longer supported. Use 7 or later. BUILD FAILED /Users/janinheuer/polymake/bundled/jreality/java/build.xml:12: The following error occurred while executing this line: /Users/janinheuer/polymake/bundled/jreality/external/jreality/build.xml:171: Compile failed; see the compiler error output for details. Total time: 0 seconds ninja: build stopped: subcommand failed. make: *** [all] Error 1

This is especially strange since $JAVA_HOME is in the right location.

I would be very grateful for any help and/or suggestions.

paffenholz
Developer
Posts: 175
Joined: 24 Dec 2010, 13:47

Re: Compiling polymake on macOS 10.14

Postby paffenholz » 10 Apr 2019, 21:27

Your java is alright. The compilation fails as the version of the software jreality that comes with polymake requires a java version that is older than the last version supported by java 12.

On MacOS jreality currently doesn't work properly anyway. I suggest to switch this off entirely during compilation and use one of the other visualization methods available in polymake. I would recommend to use threejs, which you can activate by typing

Code: Select all

prefer "threejs";
in a polymake session. This will open images in a browser. You can disable jreality during configuration with the option

Code: Select all

--without-jreality
to the configure script.

If you really do need jreality then at the moment you will have to downgrade java to at least version 11.

Andreas

green
Posts: 2
Joined: 10 Apr 2019, 14:10

Re: Compiling polymake on macOS 10.14

Postby green » 11 Apr 2019, 09:22

This worked nicely, thanks a lot!


Return to “Installing polymake”

cron