[XML-SIG] pyxml 0.7 and cygwin
Martin v. Loewis
martin@v.loewis.de
Sat, 5 Jan 2002 09:32:50 +0100
> gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DUSE_DL_IMPORT -DHAVE_EXPAT_H
> -DV
> ERSION="1.95.2" -DXML_NS=1 -DXML_DTD=1 -DXML_BYTE_ORDER=12 -DXML_CONTEXT_BYT
> ES=1
> uild/temp.cygwin-1.3.6-i686-2.2/pyexpat.o
> extensions/pyexpat.c:1800: initializer element is not constant
> extensions/pyexpat.c:1800: (near initialization for
> `handler_info[2].setter')
Hmm. This refers to
{"ProcessingInstructionHandler",
(xmlhandlersetter)XML_SetProcessingInstructionHandler, /*line 1800*/
(xmlhandler)my_ProcessingInstructionHandler},
Right? I fail to see what it complains about;
XML_SetProcessingInstructionHandler *is* constant. What gcc version is
that?
Can you try replacing that with
{"ProcessingInstructionHandler",
(xmlhandlersetter)&XML_SetProcessingInstructionHandler,
(xmlhandler)my_ProcessingInstructionHandler},
Unless I'm missing something obvious, this looks like a bug in gcc to
me. Since my gcc on Linux accepts this just fine, I'd say it is a
cygwin bug.
However, I'm also surprised that it does not pass
-Iextensions/expat/lib to the compiler. Where does it get expat.h
from, then? Can you print ext_modules in setup.py right before setup
is invoked? Can you also try to trace how the value of include_dirs
gets lost?
Regards,
Martin