Thank you very much! I'm using Mac OS 10.7 and eventually I was able to install polymake(with additional packages from Fink).
However, I got some problems running the examples. When I try run one of the executables I get the following error messages:
Code: Select all
Undefined subroutine &Polymake::Ext::bootstrap called at /usr/local/share/polymake/perllib/Polymake/Main.pm line 25.
BEGIN failed--compilation aborted at /usr/local/share/polymake/perllib/Polymake/Main.pm line 27.
Compilation failed in require at /Users/Soeren/Documents/polymake-2.12/lib/callable/src/perl/Main.cc line 90.
BEGIN failed--compilation aborted at /Users/Soeren/Documents/polymake-2.12/lib/callable/src/perl/Main.cc line 90.
ERROR: could not initialize the perl interpreter
Segmentation fault: 11
I was not able to figure out what went wrong. The polymake installation should be fine(at least no errors were shown).
This is what my Makefile looks like:
Code: Select all
PM_INC := $(shell polymake-config --includes)
PM_CFLAGS := -fPIC -DPOLYMAKE_DEBUG=0
PM_LIBS := $(shell polymake-config --libs)
PM_LDFLAGS := $(shell polymake-config --ldflags)
CFLAGS += -march=native
LDFLAGS += -lxml2
all: testprog smalltest
smalltest.o: smalltest.cc
g++-4 -mno-avx -o smalltest.o -c -I. ${PM_INC} ${PM_CFLAGS} ${CFLAGS} smalltest.cc
smalltest: smalltest.o
g++-4 -o smalltest smalltest.o ${PM_LDFLAGS} ${PM_LIBS} ${LDFLAGS}
pm_object.o: pm_object.cc pm_object.h
g++-4 -mno-avx -o pm_object.o -c -I. ${PM_INC} ${PM_CFLAGS} ${CFLAGS} pm_object.cc
testprog.o: testprog.cc
g++-4 -mno-avx -o testprog.o -c -I. ${CFLAGS} testprog.cc
testprog: pm_object.o testprog.o
g++-4 -o testprog testprog.o pm_object.o ${PM_LDFLAGS} ${PM_LIBS} ${LDFLAGS}
clean:
rm pm_object.o testprog.o testprog smalltest.o smalltest
Interestingly the -mno-avx flags were inevitable in order to compile the examples. This is kind of weird in my eyes, as my machine(Intel i7) and Mac OS should support AVX, but this might be a total different story.
Best regards,
Soeren