videlec / pypolymake

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

Installation failed on Ubuntu 16.04 #24

Open dmalyuta opened 6 years ago

dmalyuta commented 6 years ago

I'm following the instructions and run:

pip install git+https://github.com/videlec/pypolymake

But this outputs a huge amount of text, with an error at the end:

    /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

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-WiDVVb-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-1o4sEt-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-WiDVVb-build/

I am running Ubuntu 16.04 and Polymake 3.1 and GCC 5.4.

videlec commented 6 years ago

Thanks for your interest.

The pypolymake code is currently very sensitive to the polymake version (and I did not test it since a long time). If you are interested by the code you would have to dig into it!