New issue 2497: Installing lxml fails on PyPy 3.5: static declaration of ‘PyBytes_FromFormat’ follows non-static declaration https://bitbucket.org/pypy/pypy/issues/2497/installing-lxml-fails-on-pypy-35-static
Konstantin Lopuhin: Here is the error: ``` $ pip install lxml Collecting lxml Using cached lxml-3.7.3.tar.gz Building wheels for collected packages: lxml Running setup.py bdist_wheel for lxml ... error Complete output from command /home/kostia/tmp/pypy3/bin/pypy3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-giz7byil/lxml/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmps8n0ictjpip-wheel- --python-tag pp358: Building lxml version 3.7.3. Building without Cython. Using build configuration of libxslt 1.1.28 running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.5 creating build/lib.linux-x86_64-3.5/lxml copying src/lxml/cssselect.py -> build/lib.linux-x86_64-3.5/lxml ... copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-x86_64-3.5/lxml/isoschematron/resources/xsl/iso-schematron-xslt1 running build_ext building 'lxml.etree' extension creating build/temp.linux-x86_64-3.5 creating build/temp.linux-x86_64-3.5/src creating build/temp.linux-x86_64-3.5/src/lxml gcc -pthread -DNDEBUG -O2 -fPIC -I/usr/include/libxml2 -Isrc/lxml/includes -I/home/kostia/tmp/pypy3/include -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-3.5/src/lxml/l xml.etree.o -w In file included from src/lxml/lxml.etree.c:515:0: src/lxml/includes/etree_defs.h:97:18: error: static declaration of ‘PyBytes_FromFormat’ follows non-static declaration static PyObject* PyBytes_FromFormat(const char* format, ...) { ^ In file included from /home/kostia/tmp/pypy3/include/Python.h:128:0, from src/lxml/lxml.etree.c:84: /home/kostia/tmp/pypy3/include/bytesobject.h:60:24: note: previous declaration of ‘PyBytes_FromFormat’ was here PyAPI_FUNC(PyObject *) PyBytes_FromFormat(const char*, ...); ^ Compile failed: command 'gcc' failed with exit status 1 creating tmp cc -I/usr/include/libxml2 -I/usr/include/libxml2 -c /tmp/xmlXPathInit_o3zaqum.c -o tmp/xmlXPathInit_o3zaqum.o /tmp/xmlXPathInit_o3zaqum.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int] main (int argc, char **argv) { ^ cc tmp/xmlXPathInit_o3zaqum.o -lxml2 -o a.out error: command 'gcc' failed with exit status 1 ---------------------------------------- Failed building wheel for lxml ``` This is Ubuntu 16.04, using latest pypy 3.5 nightly (http://buildbot.pypy.org/nightly/py3.5/pypy-c-jit-90688-27474b4d14e4-linux64.tar.bz2). Cython is installed, and ``import Cython.Compiler.Version`` works. _______________________________________________ pypy-issue mailing list pypy-issue@python.org https://mail.python.org/mailman/listinfo/pypy-issue