Python+Cygwin+XML SAX build failure of PyXML 0.7.1

Dmitri dm_top at
Fri Jun 21 18:04:10 CEST 2002

(possibly this is the second message, I have had a little prob., so
if it is, but this message contains the source info :)

Source from
PyXML-0.7.1.tar.gz 606480  2060  Platform-Independent Source .gz 

I need the XML SAX parser for Python under Cygwin.
(And I can not find precompiled version for Cygwin)

*Windows 2000 Prof.
*CygWin ver.:
*GCC ver.:     2.95.3-5
    Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/specs
    gcc version 2.95.3-5 (cygwin special)
*Python ver.:  2.2.1
    $ python
    Python 2.2.1 (#1, Jun  6 2002, 16:53:43)
    [GCC 2.95.3-5 (cygwin special)] on cygwin

Description of the problem:

After unpacking of the tarball, the issuing the python build
cause the following compiling error during building the expat

. -- copying ---
copying xml/xslt/ ->
copying xml/xslt/ ->
running build_ext
building '_xmlplus.parsers.pyexpat' extension
creating build/temp.cygwin-1.3.10-i686-2.2
gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DUSE_DL_IMPORT
024 -Iextensions/expat/lib -I/usr/local/include/python2.2 -c
c -o build/temp.cygwin-1.3.10-i686-2.2/pyexpat.o
extensions/pyexpat.c:1709: initializer element is not constant
extensions/pyexpat.c:1709: (near initialization for
extensions/pyexpat.c:1712: initializer element is not constant
extensions/pyexpat.c:1712: (near initialization for
extensions/pyexpat.c:1715: initializer element is not constant
extensions/pyexpat.c:1715: (near initialization for
extensions/pyexpat.c:1718: initializer element is not constant
extensions/pyexpat.c:1718: (near initialization for
extensions/pyexpat.c:1727: initializer element is not constant
extensions/pyexpat.c:1727: (near initialization for
extensions/pyexpat.c:1736: initializer element is not constant
extensions/pyexpat.c:1736: (near initialization for
extensions/pyexpat.c:1739: initializer element is not constant
extensions/pyexpat.c:1739: (near initialization for
extensions/pyexpat.c:1742: initializer element is not constant
extensions/pyexpat.c:1742: (near initialization for
extensions/pyexpat.c:1745: initializer element is not constant
extensions/pyexpat.c:1745: (near initialization for
extensions/pyexpat.c:1754: initializer element is not constant
extensions/pyexpat.c:1754: (near initialization for
extensions/pyexpat.c:1757: initializer element is not constant
extensions/pyexpat.c:1757: (near initialization for
extensions/pyexpat.c:1760: initializer element is not constant
extensions/pyexpat.c:1760: (near initialization for
extensions/pyexpat.c:1763: initializer element is not constant
extensions/pyexpat.c:1763: (near initialization for
error: command 'gcc' failed with exit status 1


the simple code review and primitive test like:
void funcA(int a, int b)
  printf("from A: %d, %d\n", a, b);

void funcB(int a, int b)
  printf("from B: %d, %d\n", a, b);

typedef void (*PF)(int, int);

struct S {
  const char * _F;
  PF           _pf;

extern struct S ars[2];

static struct S ars[] =
    {"funcA", funcA },
    {"funcB", funcB },

int main()
  printf("%s ", ars[0]._F);
  ars[0]._pf(1, 2);
  printf("%s ", ars[1]._F);
  ars[1]._pf(3, 4);

  return 0;

$ gcc -o test main.c

shows that everything should be all right. But it is not...

Searching the net:
1. I did not find the precompiled version of the PyXML for cygwin.
   Does someone know where can I get it, it it does exist?
2. The problem like "initializer element is not constant" is shown but
the recommendations goes to the updating of the gcc compiler with
unclear direction. That's possibly true, but instalation of the GNU's
projects under cygwin is a different story. And it's hard to beleive
that the upgrating compiler would fix this problem...

Thank you.

With the best regards,

More information about the Python-list mailing list