{"action":"opened","issue":{"url":"https://api.github.com/repos/amauryfa/lxml/issues/9","labels_url":"https://api.github.com/repos/amauryfa/lxml/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/amauryfa/lxml/issues/9/comments","events_url":"https://api.github.com/repos/amauryfa/lxml/issues/9/events","html_url":"https://github.com/amauryfa/lxml/issues/9","id":85072079,"number":9,"title":"Building on PyPy 2.6 (official docker image) breaks with CompileError","user":{"login":"npiganeau","id":3935559,"avatar_url":"https://avatars.githubusercontent.com/u/3935559?v=3","gravatar_id":"","url":"https://api.github.com/users/npiganeau","html_url":"https://github.com/npiganeau","followers_url":"https://api.github.com/users/npiganeau/followers","following_url":"https://api.github.com/users/npiganeau/following{/other_user}","gists_url":"https://api.github.com/users/npiganeau/gists{/gist_id}","starred_url":"https://api.github.com/users/npiganeau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npiganeau/subscriptions","organizations_url":"https://api.github.com/users/npiganeau/orgs","repos_url":"https://api.github.com/users/npiganeau/repos","events_url":"https://api.github.com/users/npiganeau/events{/privacy}","received_events_url":"https://api.github.com/users/npiganeau/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-04T12:20:44Z","updated_at":"2015-06-04T12:20:44Z","closed_at":null,"body":"Building on PyPy 2.6 (with cffi 1.1) breaks with ValidationError whereas it works perfectly on PyPy 2.5. Tests were made with official PyPy docker images (tags '2-2.6' vs '2-2.5').\r\n\r\nPyPy 2.6:\r\n```\r\nnpiganeau@ndp-host:~$ docker run -t -i --name pypy pypy:2-2.6 bash\r\nroot@8557c3209fe5:/# pip install -e git+git://github.com/amauryfa/lxml.git@cffi#egg=lxml-cffi\r\nObtaining lxml-cffi from git+git://github.com/amauryfa/lxml.git@cffi#egg=lxml-cffi\r\n  Cloning git://github.com/amauryfa/lxml.git (to cffi) to /src/lxml-cffi\r\n    Complete output from command python setup.py egg_info:\r\n    src/lxml-cffi/includes/__pycache__/_cffi__gf1d3c271xb1c86544.c: In function ‘_cffi_check_struct__xmlOutputBuffer’:\r\n    src/lxml-cffi/includes/__pycache__/_cffi__gf1d3c271xb1c86544.c:1624:24: warning: initialization from incompatible pointer type\r\n       { xmlBuffer * *tmp = &p->buffer; (void)tmp; }\r\n                            ^\r\n    src/lxml-cffi/includes/__pycache__/_cffi__gf1d3c271xb1c86544.c:1625:24: warning: initialization from incompatible pointer type\r\n       { xmlBuffer * *tmp = &p->conv; (void)tmp; }\r\n                            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c: In function ‘_cffi_e__xmlRelaxNGValidErr’:\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:7845:8: error: ‘XML_RELAXNG_OK’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_OK) > 0 || (long)(XML_RELAXNG_OK) != 0L) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:7845:8: note: each undeclared identifier is reported only once for each function it appears in\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:7855:8: error: ‘XML_RELAXNG_ERR_MEMORY’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_MEMORY) <= 0 || (unsigned long)(XML_RELAXNG_ERR_MEMORY) != 1UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:7865:8: error: ‘XML_RELAXNG_ERR_TYPE’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_TYPE) <= 0 || (unsigned long)(XML_RELAXNG_ERR_TYPE) != 2UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:7875:8: error: ‘XML_RELAXNG_ERR_TYPEVAL’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_TYPEVAL) <= 0 || (unsigned long)(XML_RELAXNG_ERR_TYPEVAL) != 3UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:7885:8: error: ‘XML_RELAXNG_ERR_DUPID’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_DUPID) <= 0 || (unsigned long)(XML_RELAXNG_ERR_DUPID) != 4UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:7895:8: error: ‘XML_RELAXNG_ERR_TYPECMP’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_TYPECMP) <= 0 || (unsigned long)(XML_RELAXNG_ERR_TYPECMP) != 5UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:7905:8: error: ‘XML_RELAXNG_ERR_NOSTATE’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_NOSTATE) <= 0 || (unsigned long)(XML_RELAXNG_ERR_NOSTATE) != 6UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:7915:8: error: ‘XML_RELAXNG_ERR_NODEFINE’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_NODEFINE) <= 0 || (unsigned long)(XML_RELAXNG_ERR_NODEFINE) != 7UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:7925:8: error: ‘XML_RELAXNG_ERR_LISTEXTRA’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_LISTEXTRA) <= 0 || (unsigned long)(XML_RELAXNG_ERR_LISTEXTRA) != 8UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:7935:8: error: ‘XML_RELAXNG_ERR_LISTEMPTY’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_LISTEMPTY) <= 0 || (unsigned long)(XML_RELAXNG_ERR_LISTEMPTY) != 9UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:7945:8: error: ‘XML_RELAXNG_ERR_INTERNODATA’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_INTERNODATA) <= 0 || (unsigned long)(XML_RELAXNG_ERR_INTERNODATA) != 10UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:7955:8: error: ‘XML_RELAXNG_ERR_INTERSEQ’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_INTERSEQ) <= 0 || (unsigned long)(XML_RELAXNG_ERR_INTERSEQ) != 11UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:7965:8: error: ‘XML_RELAXNG_ERR_INTEREXTRA’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_INTEREXTRA) <= 0 || (unsigned long)(XML_RELAXNG_ERR_INTEREXTRA) != 12UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:7975:8: error: ‘XML_RELAXNG_ERR_ELEMNAME’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_ELEMNAME) <= 0 || (unsigned long)(XML_RELAXNG_ERR_ELEMNAME) != 13UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:7985:8: error: ‘XML_RELAXNG_ERR_ATTRNAME’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_ATTRNAME) <= 0 || (unsigned long)(XML_RELAXNG_ERR_ATTRNAME) != 14UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:7995:8: error: ‘XML_RELAXNG_ERR_ELEMNONS’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_ELEMNONS) <= 0 || (unsigned long)(XML_RELAXNG_ERR_ELEMNONS) != 15UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:8005:8: error: ‘XML_RELAXNG_ERR_ATTRNONS’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_ATTRNONS) <= 0 || (unsigned long)(XML_RELAXNG_ERR_ATTRNONS) != 16UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:8015:8: error: ‘XML_RELAXNG_ERR_ELEMWRONGNS’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_ELEMWRONGNS) <= 0 || (unsigned long)(XML_RELAXNG_ERR_ELEMWRONGNS) != 17UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:8025:8: error: ‘XML_RELAXNG_ERR_ATTRWRONGNS’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_ATTRWRONGNS) <= 0 || (unsigned long)(XML_RELAXNG_ERR_ATTRWRONGNS) != 18UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:8035:8: error: ‘XML_RELAXNG_ERR_ELEMEXTRANS’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_ELEMEXTRANS) <= 0 || (unsigned long)(XML_RELAXNG_ERR_ELEMEXTRANS) != 19UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:8045:8: error: ‘XML_RELAXNG_ERR_ATTREXTRANS’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_ATTREXTRANS) <= 0 || (unsigned long)(XML_RELAXNG_ERR_ATTREXTRANS) != 20UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:8055:8: error: ‘XML_RELAXNG_ERR_ELEMNOTEMPTY’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_ELEMNOTEMPTY) <= 0 || (unsigned long)(XML_RELAXNG_ERR_ELEMNOTEMPTY) != 21UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:8065:8: error: ‘XML_RELAXNG_ERR_NOELEM’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_NOELEM) <= 0 || (unsigned long)(XML_RELAXNG_ERR_NOELEM) != 22UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:8075:8: error: ‘XML_RELAXNG_ERR_NOTELEM’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_NOTELEM) <= 0 || (unsigned long)(XML_RELAXNG_ERR_NOTELEM) != 23UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:8085:8: error: ‘XML_RELAXNG_ERR_ATTRVALID’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_ATTRVALID) <= 0 || (unsigned long)(XML_RELAXNG_ERR_ATTRVALID) != 24UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:8095:8: error: ‘XML_RELAXNG_ERR_CONTENTVALID’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_CONTENTVALID) <= 0 || (unsigned long)(XML_RELAXNG_ERR_CONTENTVALID) != 25UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:8105:8: error: ‘XML_RELAXNG_ERR_EXTRACONTENT’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_EXTRACONTENT) <= 0 || (unsigned long)(XML_RELAXNG_ERR_EXTRACONTENT) != 26UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:8115:8: error: ‘XML_RELAXNG_ERR_INVALIDATTR’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_INVALIDATTR) <= 0 || (unsigned long)(XML_RELAXNG_ERR_INVALIDATTR) != 27UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:8125:8: error: ‘XML_RELAXNG_ERR_DATAELEM’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_DATAELEM) <= 0 || (unsigned long)(XML_RELAXNG_ERR_DATAELEM) != 28UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:8135:8: error: ‘XML_RELAXNG_ERR_VALELEM’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_VALELEM) <= 0 || (unsigned long)(XML_RELAXNG_ERR_VALELEM) != 29UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:8145:8: error: ‘XML_RELAXNG_ERR_LISTELEM’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_LISTELEM) <= 0 || (unsigned long)(XML_RELAXNG_ERR_LISTELEM) != 30UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:8155:8: error: ‘XML_RELAXNG_ERR_DATATYPE’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_DATATYPE) <= 0 || (unsigned long)(XML_RELAXNG_ERR_DATATYPE) != 31UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:8165:8: error: ‘XML_RELAXNG_ERR_VALUE’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_VALUE) <= 0 || (unsigned long)(XML_RELAXNG_ERR_VALUE) != 32UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:8175:8: error: ‘XML_RELAXNG_ERR_LIST’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_LIST) <= 0 || (unsigned long)(XML_RELAXNG_ERR_LIST) != 33UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:8185:8: error: ‘XML_RELAXNG_ERR_NOGRAMMAR’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_NOGRAMMAR) <= 0 || (unsigned long)(XML_RELAXNG_ERR_NOGRAMMAR) != 34UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:8195:8: error: ‘XML_RELAXNG_ERR_EXTRADATA’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_EXTRADATA) <= 0 || (unsigned long)(XML_RELAXNG_ERR_EXTRADATA) != 35UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:8205:8: error: ‘XML_RELAXNG_ERR_LACKDATA’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_LACKDATA) <= 0 || (unsigned long)(XML_RELAXNG_ERR_LACKDATA) != 36UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:8215:8: error: ‘XML_RELAXNG_ERR_INTERNAL’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_INTERNAL) <= 0 || (unsigned long)(XML_RELAXNG_ERR_INTERNAL) != 37UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:8225:8: error: ‘XML_RELAXNG_ERR_ELEMWRONG’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_ELEMWRONG) <= 0 || (unsigned long)(XML_RELAXNG_ERR_ELEMWRONG) != 38UL) {\r\n            ^\r\n    src/lxml-cffi/__pycache__/_cffi__g65f9f103xa680a747.c:8235:8: error: ‘XML_RELAXNG_ERR_TEXTWRONG’ undeclared (first use in this function)\r\n       if ((XML_RELAXNG_ERR_TEXTWRONG) <= 0 || (unsigned long)(XML_RELAXNG_ERR_TEXTWRONG) != 39UL) {\r\n            ^\r\n    Building lxml version 3.4.0.\r\n    Building without Cython.\r\n    Using build configuration of libxslt 1.1.28\r\n    Traceback (most recent call last):\r\n      File \"<builtin>/app_main.py\", line 75, in run_toplevel\r\n      File \"<builtin>/app_main.py\", line 601, in run_it\r\n      File \"<string>\", line 20, in <module>\r\n      File \"/src/lxml-cffi/setup.py\", line 232, in <module>\r\n        **setup_extra_options()\r\n      File \"/src/lxml-cffi/setup.py\", line 145, in setup_extra_options\r\n        STATIC_CFLAGS, STATIC_BINARIES)\r\n      File \"setupinfo.py\", line 167, in ext_modules\r\n        import lxml.etree\r\n      File \"src/lxml/../lxml-cffi/etree.py\", line 26, in <module>\r\n        from .xmlerror import _initThreadLogging, clear_error_log\r\n      File \"src/lxml/../lxml-cffi/xmlerror.py\", line 150, in <module>\r\n        libraries=['xml2'])\r\n      File \"/usr/local/lib_pypy/cffi/api.py\", line 373, in verify\r\n        lib = self.verifier.load_library()\r\n      File \"/usr/local/lib_pypy/cffi/verifier.py\", line 96, in load_library\r\n        self._compile_module()\r\n      File \"/usr/local/lib_pypy/cffi/verifier.py\", line 192, in _compile_module\r\n        outputfilename = ffiplatform.compile(tmpdir, self.get_extension())\r\n      File \"/usr/local/lib_pypy/cffi/ffiplatform.py\", line 38, in compile\r\n        outputfilename = _build(tmpdir, ext)\r\n      File \"/usr/local/lib_pypy/cffi/ffiplatform.py\", line 65, in _build\r\n        raise VerificationError('%s: %s' % (e.__class__.__name__, e))\r\n    VerificationError: CompileError: command 'cc' failed with exit status 1\r\n\r\n    ----------------------------------------\r\nCommand \"python setup.py egg_info\" failed with error code 1 in /src/lxml-cffi\r\n```\r\n\r\nPyPy 2.5\r\n```\r\nnpiganeau@ndp-host:~$ docker run -t -i --name pypy pypy:2-2.5 bash\r\nroot@6b84fa93cfd9:/# pip install -e git+git://github.com/amauryfa/lxml.git@cffi#egg=lxml-cffi\r\nYou are using pip version 7.0.1, however version 7.0.3 is available.\r\nYou should consider upgrading via the 'pip install --upgrade pip' command.\r\nObtaining lxml-cffi from git+git://github.com/amauryfa/lxml.git@cffi#egg=lxml-cffi\r\n  Cloning git://github.com/amauryfa/lxml.git (to cffi) to /src/lxml-cffi\r\nInstalling collected packages: lxml-cffi\r\n  Running setup.py develop for lxml-cffi\r\nSuccessfully installed lxml-cffi\r\n```\r\n"}}