Open Julian opened 10 years ago
This is strange. Can you check whether XML_ATTRIBUTE_IDREF
appears multiple times in your copy of the src/lxml-cffi
directory?
The string appears in:
⊙ ag XML_ATTRIBUTE_IDREF Julian@Air
src/lxml/dtd.pxi
126: elif type == tree.XML_ATTRIBUTE_IDREF:
128: elif type == tree.XML_ATTRIBUTE_IDREFS:
src/lxml/includes/tree.pxd
132: XML_ATTRIBUTE_IDREF= 3
133: XML_ATTRIBUTE_IDREFS= 4
src/lxml-cffi/dtd.py
119: elif type == tree.XML_ATTRIBUTE_IDREF:
121: elif type == tree.XML_ATTRIBUTE_IDREFS:
src/lxml-cffi/includes/tree.py
260: XML_ATTRIBUTE_IDREF ,
261: XML_ATTRIBUTE_IDREFS,
Which looks like just once to me in where that would complain, right?
@amauryfa It seems to abuse ffi.include()
quite a lot. In this format, every module in the includes
subpackage compile its own .so
that has got functions to call all the functions that it includes. You get multiple definition errors because some constants appear in more than one file, or one file's ffi is included more than once (directly or indirectly) in another file's ffi. I have no clue how it could ever have worked, btw. All I say is that you should probably not use ffi.include()
in this situation.
This is not what I saw. With pypy-c-jit-70319-c77678f05b18-linux-64 (cffi 0.8.2), XML_ATTRIBUTE_IDREF is present in only one .c file. And I don't get any warning.
I cloned https://github.com/amauryfa/lxml
, switched to branch cffi
, then cd src
and pypy -c "import lxml.xslt"
with PyPy 2.4.0... I get the XML_ATTRIBUTE_IDREF error.
I get a CFFI exception when trying to either install HEAD via pip or when trying to just directly import
lxml.etree
from a source checkout:Obviously I can provide whatever other info is necessary to help debug, but I can't figure out just what would be helpful yet myself :)