[lxml-dev] Building from lxml 1.2 tarball

I'm getting an error when trying to build lxml from the 1.2 tarball. I suspect it has something to do with Pyrex? Here's the error: building 'lxml.objectify' extension c:\Arquivos de programas\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /no logo /Ox /MD /W3 /GX /DNDEBUG -IC:\src\lxml-build\\libxml2-2.6.26.win32\include -IC:\src\lxml-build\\libxslt-1.1.17.win32\include -IC:\src\lxml-build\\zlib-1.2. 3.win32\include -IC:\src\lxml-build\\iconv-1.9.2.win32\include -Ic:\Python24\inc lude -Ic:\Python24\PC /Tcsrc/lxml/objectify.c /Fobuild\temp.win32-2.4\Release\sr c/lxml/objectify.obj -w cl : Command line warning D4025 : overriding '/W3' with '/w' objectify.c c:\src\lxml-build\lxml-1.2\src\lxml\etree.h(164) : error C2143: syntax error : m issing ';' before 'type' c:\src\lxml-build\lxml-1.2\src\lxml\etree.h(164) : error C2143: syntax error : m issing ';' before 'const' c:\src\lxml-build\lxml-1.2\src\lxml\etree.h(164) : error C2059: syntax error : ' )' c:\src\lxml-build\lxml-1.2\src\lxml\etree.h(164) : error C2059: syntax error : ' =' c:\src\lxml-build\lxml-1.2\src\lxml\etree.h(166) : error C2065: 'c_api_init' : u ndeclared identifier c:\src\lxml-build\lxml-1.2\src\lxml\etree.h(166) : error C2223: left of '->ob_re fcnt' must point to struct/union c:\src\lxml-build\lxml-1.2\src\lxml\etree.h(167) : error C2065: 'init' : undecla red identifier c:\src\lxml-build\lxml-1.2\src\lxml\etree.h(173) : error C2063: 'init' : not a f unction c:\src\lxml-build\lxml-1.2\src\lxml\etree.h(176) : error C2059: syntax error : ' return' c:\src\lxml-build\lxml-1.2\src\lxml\etree.h(177) : error C2059: syntax error : ' }' -- Sidnei da Silva Enfold Systems http://enfoldsystems.com Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214

Hi Sidnei, Sidnei da Silva wrote:
I'm getting an error when trying to build lxml from the 1.2 tarball. I suspect it has something to do with Pyrex?
I did some changes in the Pyrex version we use, so this is possible - although that would still make it my fault. ;o)
No idea where these might come from. Line 164-165 is unchanged from before (since lxml 1.1 IIRC) and the only place where I can see the character sequence 'type' anywhere near that line is the C-preprocessor result of PyDECREF(), which shouldn't really fail to compile - and which seems to have passed nicely just a few lines before. Any chance you could play with the import_etree function in the generated etree.h file to see if you can make it work? Just delete the "build" directory and the generated objectify.dll by hand when you make changes, that should be enough to rebuild without having Pyrex overwrite the etree.h etc. Thanks, Stefan

Breaking the declaration from the assignment line seems to make it work. Maybe it's a MSVC issue? See attached diff. -- Sidnei da Silva Enfold Systems http://enfoldsystems.com Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214

Sorry, that patch doesn't actually work. My fault trying to update the patch manually. :) Here's a working patch. -- Sidnei da Silva Enfold Systems http://enfoldsystems.com Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214

Thanks! I've uploaded the 1.2 installer for Windows. -- Sidnei da Silva Enfold Systems http://enfoldsystems.com Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214

Hi Sidnei, Sidnei da Silva wrote:
I'm getting an error when trying to build lxml from the 1.2 tarball. I suspect it has something to do with Pyrex?
I did some changes in the Pyrex version we use, so this is possible - although that would still make it my fault. ;o)
No idea where these might come from. Line 164-165 is unchanged from before (since lxml 1.1 IIRC) and the only place where I can see the character sequence 'type' anywhere near that line is the C-preprocessor result of PyDECREF(), which shouldn't really fail to compile - and which seems to have passed nicely just a few lines before. Any chance you could play with the import_etree function in the generated etree.h file to see if you can make it work? Just delete the "build" directory and the generated objectify.dll by hand when you make changes, that should be enough to rebuild without having Pyrex overwrite the etree.h etc. Thanks, Stefan

Breaking the declaration from the assignment line seems to make it work. Maybe it's a MSVC issue? See attached diff. -- Sidnei da Silva Enfold Systems http://enfoldsystems.com Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214

Sorry, that patch doesn't actually work. My fault trying to update the patch manually. :) Here's a working patch. -- Sidnei da Silva Enfold Systems http://enfoldsystems.com Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214

Thanks! I've uploaded the 1.2 installer for Windows. -- Sidnei da Silva Enfold Systems http://enfoldsystems.com Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
participants (2)
-
Sidnei da Silva
-
Stefan Behnel