[lxml-dev] Building from lxml 1.2 tarball

Stefan Behnel stefan_ml at behnel.de
Mon Feb 26 19:39:03 CET 2007


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)


> 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'

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



More information about the lxml-dev mailing list