videlec / pypolymake

Python wrappers for polymake
https://pypi.python.org/pypi/pypolymake
3 stars 5 forks source link

Installation Failure on Linux Mint 18 #23

Open liam-lloyd opened 7 years ago

liam-lloyd commented 7 years ago

When I attempt to install pypolymake using the following command pip install git+https://github.com/videlec/pypolymake --upgrade installation fails with the following output `Collecting git+https://github.com/videlec/pypolymake Cloning https://github.com/videlec/pypolymake to /tmp/pip-2yq1OU-build Installing collected packages: pypolymake Running setup.py install for pypolymake: started Running setup.py install for pypolymake: finished with status 'error' Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-2yq1OU-build/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-ZxwaMX-record/install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build/lib.linux-x86_64-2.7 creating build/lib.linux-x86_64-2.7/polymake copying polymake/init.py -> build/lib.linux-x86_64-2.7/polymake copying polymake/functions.py -> build/lib.linux-x86_64-2.7/polymake creating build/lib.linux-x86_64-2.7/polymake/cygmp copying polymake/cygmp/init.py -> build/lib.linux-x86_64-2.7/polymake/cygmp copying polymake/matrix.pxd -> build/lib.linux-x86_64-2.7/polymake copying polymake/quadratic_extension.pxd -> build/lib.linux-x86_64-2.7/polymake copying polymake/polynomial.pxd -> build/lib.linux-x86_64-2.7/polymake copying polymake/sparse_matrix.pxd -> build/lib.linux-x86_64-2.7/polymake copying polymake/incidence_matrix.pxd -> build/lib.linux-x86_64-2.7/polymake copying polymake/vector.pxd -> build/lib.linux-x86_64-2.7/polymake copying polymake/power_set.pxd -> build/lib.linux-x86_64-2.7/polymake copying polymake/defs.pxd -> build/lib.linux-x86_64-2.7/polymake copying polymake/perl_object.pxd -> build/lib.linux-x86_64-2.7/polymake copying polymake/array.pxd -> build/lib.linux-x86_64-2.7/polymake copying polymake/integer.pxd -> build/lib.linux-x86_64-2.7/polymake copying polymake/handlers.pxd -> build/lib.linux-x86_64-2.7/polymake copying polymake/rational_function.pxd -> build/lib.linux-x86_64-2.7/polymake copying polymake/set.pxd -> build/lib.linux-x86_64-2.7/polymake copying polymake/main.pxd -> build/lib.linux-x86_64-2.7/polymake copying polymake/rational.pxd -> build/lib.linux-x86_64-2.7/polymake copying polymake/map.pxd -> build/lib.linux-x86_64-2.7/polymake copying polymake/array.pyx -> build/lib.linux-x86_64-2.7/polymake copying polymake/big_object.pyx -> build/lib.linux-x86_64-2.7/polymake copying polymake/rational.pyx -> build/lib.linux-x86_64-2.7/polymake copying polymake/vector.pyx -> build/lib.linux-x86_64-2.7/polymake copying polymake/set.pyx -> build/lib.linux-x86_64-2.7/polymake copying polymake/rational_function.pyx -> build/lib.linux-x86_64-2.7/polymake copying polymake/power_set.pyx -> build/lib.linux-x86_64-2.7/polymake copying polymake/main.pyx -> build/lib.linux-x86_64-2.7/polymake copying polymake/sage.pyx -> build/lib.linux-x86_64-2.7/polymake copying polymake/matrix.pyx -> build/lib.linux-x86_64-2.7/polymake copying polymake/sparse_matrix.pyx -> build/lib.linux-x86_64-2.7/polymake copying polymake/perl_object.pyx -> build/lib.linux-x86_64-2.7/polymake copying polymake/sage_conversion.pyx -> build/lib.linux-x86_64-2.7/polymake copying polymake/polynomial.pyx -> build/lib.linux-x86_64-2.7/polymake copying polymake/incidence_matrix.pyx -> build/lib.linux-x86_64-2.7/polymake copying polymake/quadratic_extension.pyx -> build/lib.linux-x86_64-2.7/polymake copying polymake/handlers.pyx -> build/lib.linux-x86_64-2.7/polymake copying polymake/integer.pyx -> build/lib.linux-x86_64-2.7/polymake copying polymake/map.pyx -> build/lib.linux-x86_64-2.7/polymake copying polymake/wrap.h -> build/lib.linux-x86_64-2.7/polymake copying polymake/cygmp/types.pxd -> build/lib.linux-x86_64-2.7/polymake/cygmp copying polymake/cygmp/random.pxd -> build/lib.linux-x86_64-2.7/polymake/cygmp copying polymake/cygmp/all.pxd -> build/lib.linux-x86_64-2.7/polymake/cygmp copying polymake/cygmp/utils.pxd -> build/lib.linux-x86_64-2.7/polymake/cygmp copying polymake/cygmp/misc.pxd -> build/lib.linux-x86_64-2.7/polymake/cygmp copying polymake/cygmp/mpz.pxd -> build/lib.linux-x86_64-2.7/polymake/cygmp copying polymake/cygmp/mpn.pxd -> build/lib.linux-x86_64-2.7/polymake/cygmp copying polymake/cygmp/mpq.pxd -> build/lib.linux-x86_64-2.7/polymake/cygmp copying polymake/cygmp/mpf.pxd -> build/lib.linux-x86_64-2.7/polymake/cygmp copying polymake/cygmp/utils.pyx -> build/lib.linux-x86_64-2.7/polymake/cygmp copying polymake/cygmp/python_extra.h -> build/lib.linux-x86_64-2.7/polymake/cygmp running build_ext Rebuilding handlers and mappings Map.h --> map.pxd Set.h --> set.pxd Matrix.h --> matrix.pxd QuadraticExtension.h --> quadratic_extension.pxd PowerSet.h --> power_set.pxd Vector.h --> vector.pxd Rational.h --> rational.pxd Polynomial.h --> polynomial.pxd Integer.h --> integer.pxd Array.h --> array.pxd RationalFunction.h --> rational_function.pxd IncidenceMatrix.h --> incidence_matrix.pxd SparseMatrix.h --> sparse_matrix.pxd Compiling polymake/perl_object.pyx because it depends on polymake/map.pxd. Compiling polymake/main.pyx because it depends on polymake/array.pxd. Compiling polymake/handlers.pyx because it depends on polymake/vector.pxd. Compiling polymake/array.pyx because it depends on polymake/set.pxd. Compiling polymake/incidence_matrix.pyx because it depends on polymake/incidence_matrix.pxd. Compiling polymake/integer.pyx because it depends on polymake/rational.pxd. Compiling polymake/map.pyx because it depends on polymake/rational.pxd. Compiling polymake/matrix.pyx because it depends on polymake/rational.pxd. Compiling polymake/polynomial.pyx because it depends on polymake/polynomial.pxd. Compiling polymake/power_set.pyx because it depends on polymake/power_set.pxd. Compiling polymake/quadratic_extension.pyx because it depends on polymake/quadratic_extension.pxd. Compiling polymake/rational.pyx because it depends on polymake/rational.pxd. Compiling polymake/rational_function.pyx because it depends on polymake/rational_function.pxd. Compiling polymake/set.pyx because it depends on polymake/set.pxd. Compiling polymake/sparse_matrix.pyx because it depends on polymake/sparse_matrix.pxd. Compiling polymake/vector.pyx because it depends on polymake/vector.pxd. [ 1/16] Cythonizing polymake/array.pyx [ 2/16] Cythonizing polymake/handlers.pyx warning: polymake/handlers.pyx:80:19: local variable 'ans' referenced before assignment warning: polymake/handlers.pyx:81:14: local variable 'ans' referenced before assignment warning: polymake/handlers.pyx:84:26: local variable 'ans' referenced before assignment warning: polymake/handlers.pyx:85:14: local variable 'ans' referenced before assignment warning: polymake/handlers.pyx:89:21: local variable 'ans' referenced before assignment warning: polymake/handlers.pyx:90:14: local variable 'ans' referenced before assignment warning: polymake/handlers.pyx:93:28: local variable 'ans' referenced before assignment warning: polymake/handlers.pyx:94:14: local variable 'ans' referenced before assignment [ 3/16] Cythonizing polymake/incidence_matrix.pyx [ 4/16] Cythonizing polymake/integer.pyx [ 5/16] Cythonizing polymake/main.pyx [ 6/16] Cythonizing polymake/map.pyx [ 7/16] Cythonizing polymake/matrix.pyx [ 8/16] Cythonizing polymake/perl_object.pyx [ 9/16] Cythonizing polymake/polynomial.pyx [10/16] Cythonizing polymake/power_set.pyx [11/16] Cythonizing polymake/quadratic_extension.pyx [12/16] Cythonizing polymake/rational.pyx [13/16] Cythonizing polymake/rational_function.pyx [14/16] Cythonizing polymake/set.pyx [15/16] Cythonizing polymake/sparse_matrix.pyx [16/16] Cythonizing polymake/vector.pyx building 'polymake.cygmp.utils' extension creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/polymake creating build/temp.linux-x86_64-2.7/polymake/cygmp x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c polymake/cygmp/utils.c -o build/temp.linux-x86_64-2.7/polymake/cygmp/utils.o polymake/cygmp/utils.c:7:28: warning: "/" within comment [-Wcomment] "polymake/cygmp/.pxd", ^ polymake/cygmp/utils.c:8:28: warning: "/" within comment [-Wcomment] "polymake/cygmp/h" ^ x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/polymake/cygmp/utils.o -lgmp -o build/lib.linux-x86_64-2.7/polymake/cygmp/utils.so building 'polymake.perl_object' extension x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c polymake/perl_object.cpp -o build/temp.linux-x86_64-2.7/polymake/perl_object.o cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ polymake/perl_object.cpp:7:22: warning: "/" within comment [-Wcomment] "polymake/.pxd", ^ polymake/perl_object.cpp:8:28: warning: "/" within comment [-Wcomment] "polymake/cygmp/", ^ polymake/perl_object.cpp: In function ‘PyObject pyx_f_8polymake_11perl_object_get_properties(pyx_obj_8polymake_11perl_object_PerlObject, int)’: polymake/perl_object.cpp:1600:17: error: ‘call_function’ is not a member of ‘polymake’ pyx_t_4 = polymake::call_function(((std::string)pyx_t_3), (pyx_v_p->pm_obj[0])); ^ polymake/perl_object.cpp: In function ‘PyObject pyx_f_8polymake_11perl_object_get_methods(pyx_obj_8polymake_11perl_object_PerlObject, int)’: polymake/perl_object.cpp:1888:17: error: ‘call_function’ is not a member of ‘polymake’ pyx_t_4 = polymake::call_function(((std::string)pyx_t_3), (pyx_v_p->pm_obj[0])); ^ polymake/perl_object.cpp: In function ‘PyObject __pyx_pf_8polymake_11perl_object_10call_polymake_function(PyObject, PyObject, PyObject, PyObject*)’: polymake/perl_object.cpp:2401:19: error: ‘call_function’ is not a member of ‘polymake’ pyx_t_8 = polymake::call_function(((std::string)pyx_t_7)); ^ polymake/perl_object.cpp:2442:19: error: ‘call_function’ is not a member of ‘polymake’ pyx_t_8 = polymake::call_function(((std::string)pyx_t_7), ((int)pyx_t_9)); ^ polymake/perl_object.cpp:2487:19: error: ‘call_function’ is not a member of ‘polymake’ pyx_t_8 = polymake::call_function(((std::string)pyx_t_7), ((int)pyx_t_9), ((int)pyx_t_10)); ^ polymake/perl_object.cpp:2536:19: error: ‘call_function’ is not a member of ‘polymake’ pyx_t_8 = polymake::call_function(((std::string)pyx_t_7), ((int)pyx_t_10), ((int)pyx_t_9), ((int)pyx_t_11)); ^ error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------`
videlec commented 7 years ago

Thanks for the report. Same as #12. You need polymake 3.1 to have pypolymake working. Which version is yours?

liam-lloyd commented 7 years ago

I had 3.0, but I've just updated to 3.1. Now running the command from above results in failure with an output too long to fit in a single comment here. Here's the part where things seem to start going wrong: x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c polymake/cygmp/utils.c -o build/temp.linux-x86_64-2.7/polymake/cygmp/utils.o polymake/cygmp/utils.c:7:28: warning: "/" within comment [-Wcomment] "polymake/cygmp/.pxd", ^ polymake/cygmp/utils.c:8:28: warning: "/" within comment [-Wcomment] "polymake/cygmp/h" ^ x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/polymake/cygmp/utils.o -lgmp -o build/lib.linux-x86_64-2.7/polymake/cygmp/utils.so building 'polymake.perl_object' extension x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c polymake/perl_object.cpp -o build/temp.linux-x86_64-2.7/polymake/perl_object.o cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ polymake/perl_object.cpp:7:22: warning: "/" within comment [-Wcomment] "polymake/.pxd", ^ polymake/perl_object.cpp:8:28: warning: "/" within comment [-Wcomment] "polymake/cygmp/", ^ In file included from /usr/include/c++/5/type_traits:35:0, from /usr/local/include/polymake/meta_list.h:20, from /usr/local/include/polymake/internal/type_manip.h:21, from /usr/local/include/polymake/internal/operations_basic_defs.h:20, from /usr/local/include/polymake/internal/comparators_basic_defs.h:20, from /usr/local/include/polymake/internal/comparators_ops.h:23, from /usr/local/include/polymake/Series.h:24, from /usr/local/include/polymake/internal/sparse.h:20, from /usr/local/include/polymake/GenericIO.h:20, from /usr/local/include/polymake/perl/Value.h:20, from /usr/local/include/polymake/client.h:21, from /usr/local/include/polymake/Main.h:31, from polymake/wrap.h:5, from polymake/perl_object.cpp:471: /usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.

error This file requires compiler and library support \

  ^
In file included from /usr/local/include/polymake/perl/constants.h:22:0,
                 from /usr/local/include/polymake/client.h:20,
                 from /usr/local/include/polymake/Main.h:31,
                 from polymake/wrap.h:5,
                 from polymake/perl_object.cpp:471:
/usr/local/include/polymake/AnyString.h:38:28: error: function definition does not declare parameters
    AnyString(std::nullptr_t)
                            ^
/usr/local/include/polymake/AnyString.h:60:15: error: expected unqualified-id before ‘&&’ token
    std::string&& operator+ (std::string&& s1, const AnyString& s2)
               ^
/usr/local/include/polymake/AnyString.h: In constructor ‘polymake::AnyString::AnyString()’:
/usr/local/include/polymake/AnyString.h:43:19: error: ‘nullptr’ was not declared in this scope
       : AnyString(nullptr) {}
                   ^
/usr/local/include/polymake/AnyString.h: In member function ‘polymake::AnyString::operator bool() const’:
/usr/local/include/polymake/AnyString.h:49:51: error: ‘nullptr’ was not declared in this scope
    explicit operator bool() const { return ptr != nullptr; }
                                                   ^
In file included from /usr/local/include/polymake/client.h:20:0,
                 from /usr/local/include/polymake/Main.h:31,
                 from polymake/wrap.h:5,
                 from polymake/perl_object.cpp:471:
/usr/local/include/polymake/perl/constants.h: At global scope:

And here's the last part: In file included from /usr/local/include/polymake/next/Vector.h:24:0, from /usr/local/include/polymake/Vector.h:20, from /usr/local/include/polymake/GenericMatrix.h:20, from /usr/local/include/polymake/next/Matrix.h:24, from /usr/local/include/polymake/Matrix.h:20, from polymake/wrap.h:6, from polymake/perl_object.cpp:471: /usr/local/include/polymake/GenericVector.h: In member function ‘void pm::GenericVector<TVector, E>::assign(const TVector2&)’: /usr/local/include/polymake/GenericVector.h:98:35: error: there are no arguments to ‘sparse_discr’ that depend on a template parameter, so a declaration of ‘sparse_discr’ must be available [-fpermissive] assign_impl(v, sparse_discr()); ^ /usr/local/include/polymake/GenericVector.h: In member function ‘void pm::GenericVector<TVector, E>::remove0s(pm::pure_sparse)’: /usr/local/include/polymake/GenericVector.h:158:17: error: ‘e’ does not name a type for (auto e=me.begin(); !e.at_end(); ) { ^ /usr/local/include/polymake/GenericVector.h:158:31: error: expected ‘;’ before ‘!’ token for (auto e=me.begin(); !e.at_end(); ) { ^ /usr/local/include/polymake/GenericVector.h:158:32: error: ‘e’ was not declared in this scope for (auto e=me.begin(); !e.at_end(); ) { ^ /usr/local/include/polymake/GenericVector.h: In member function ‘void pm::GenericVector<TVector, E>::swap(pm::GenericVector<TVector2, E>&)’: /usr/local/include/polymake/GenericVector.h:183:29: error: ‘conditional’ in namespace ‘std’ does not name a template type typedef typename std::conditional<check_container_feature<TVector, sparse>::value || ^ /usr/local/include/polymake/GenericVector.h:183:40: error: expected unqualified-id before ‘<’ token typedef typename std::conditional<check_container_feature<TVector, sparse>::value || ^ /usr/local/include/polymake/GenericVector.h:187:29: error: there are no arguments to ‘sparse_discr2’ that depend on a template parameter, so a declaration of ‘sparse_discr2’ must be available [-fpermissive] swap(v, sparse_discr2()); ^ /usr/local/include/polymake/GenericVector.h: In member function ‘void pm::GenericVector<TVector, E>::assign_op(const TVector2&, const Operation&)’: /usr/local/include/polymake/GenericVector.h:199:29: error: ‘conditional’ in namespace ‘std’ does not name a template type typedef typename std::conditional<check_container_feature<TVector2, sparse>::value, sparse, dense>::type sparse_discr2; ^ /usr/local/include/polymake/GenericVector.h:199:40: error: expected unqualified-id before ‘<’ token typedef typename std::conditional<check_container_feature<TVector2, sparse>::value, sparse, dense>::type sparse_discr2; ^ /usr/local/include/polymake/GenericVector.h:200:42: error: there are no arguments to ‘sparse_discr’ that depend on a template parameter, so a declaration of ‘sparse_discr’ must be available [-fpermissive] assign_op_impl(v, op, sparse_discr(), sparse_discr2()); ^ /usr/local/include/polymake/GenericVector.h:200:59: error: there are no arguments to ‘sparse_discr2’ that depend on a template parameter, so a declaration of ‘sparse_discr2’ must be available [-fpermissive] assign_op_impl(v, op, sparse_discr(), sparse_discr2()); ^ /usr/local/include/polymake/GenericVector.h: In member function ‘void pm::GenericVector<TVector, E>::fill(const E2&)’: /usr/local/include/polymake/GenericVector.h:206:45: error: there are no arguments to ‘sparse_discr’ that depend on a template parameter, so a declaration of ‘sparse_discr’ must be available [-fpermissive] this->top().fill_impl(x, sparse_discr()); ^ /usr/local/include/polymake/GenericVector.h: In member function ‘void pm::GenericVector<TVector, E>::remove0s()’: /usr/local/include/polymake/GenericVector.h:323:29: error: there are no arguments to ‘sparse_discr’ that depend on a template parameter, so a declaration of ‘sparse_discr’ must be available [-fpermissive] remove0s(sparse_discr()); ^ /usr/local/include/polymake/GenericVector.h: At global scope: /usr/local/include/polymake/GenericVector.h:324:4: error: expected unqualified-id at end of input } ^ /usr/local/include/polymake/GenericVector.h:324:4: error: expected ‘}’ at end of input error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

videlec commented 7 years ago

And what's your gcc? (gcc --version)

liam-lloyd commented 7 years ago

gcc --version yields gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609