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

Source from
http://sourceforge.net/project/showfiles.php?group_idd73:
PyXML-0.7.1.tar.gz 606480 2060 Platform-Independent Source .gz

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

*Windows 2000 Prof.
*CygWin ver.: 2.194.2.22
*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 setup.py build
cause the following compiling error during building the expat
extention:

.
. -- copying ---
.
.
copying xml/xslt/_4xslt.py ->
build/lib.cygwin-1.3.10-i686-2.2/_xmlplus/xslt
copying xml/xslt/__init__.py ->
build/lib.cygwin-1.3.10-i686-2.2/_xmlplus/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
-DHAVE_EXPAT_H -DV
ERSION="1.95.2" -DXML_NS=1 -DXML_DTD=1 -DXML_BYTE_ORDER
-DXML_CONTEXT_BYTES=1
024 -Iextensions/expat/lib -I/usr/local/include/python2.2 -c
extensions/pyexpat.
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
`handler_info[2].setter')
extensions/pyexpat.c:1712: initializer element is not constant
extensions/pyexpat.c:1712: (near initialization for
`handler_info[3].setter')
extensions/pyexpat.c:1715: initializer element is not constant
extensions/pyexpat.c:1715: (near initialization for
`handler_info[4].setter')
extensions/pyexpat.c:1718: initializer element is not constant
extensions/pyexpat.c:1718: (near initialization for
`handler_info[5].setter')
extensions/pyexpat.c:1727: initializer element is not constant
extensions/pyexpat.c:1727: (near initialization for
`handler_info[8].setter')
extensions/pyexpat.c:1736: initializer element is not constant
extensions/pyexpat.c:1736: (near initialization for
`handler_info[11].setter')
extensions/pyexpat.c:1739: initializer element is not constant
extensions/pyexpat.c:1739: (near initialization for
`handler_info[12].setter')
extensions/pyexpat.c:1742: initializer element is not constant
extensions/pyexpat.c:1742: (near initialization for
`handler_info[13].setter')
extensions/pyexpat.c:1745: initializer element is not constant
extensions/pyexpat.c:1745: (near initialization for
`handler_info[14].setter')
extensions/pyexpat.c:1754: initializer element is not constant
extensions/pyexpat.c:1754: (near initialization for
`handler_info[17].setter')
extensions/pyexpat.c:1757: initializer element is not constant
extensions/pyexpat.c:1757: (near initialization for
`handler_info[18].setter')
extensions/pyexpat.c:1760: initializer element is not constant
extensions/pyexpat.c:1760: (near initialization for
`handler_info[19].setter')
extensions/pyexpat.c:1763: initializer element is not constant
extensions/pyexpat.c:1763: (near initialization for
`handler_info[20].setter')
error: command 'gcc' failed with exit status 1

---------------------------------------------------------------
Workaround:

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;
}

and
$ 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,
Dmitri

Search Discussions

  • Jason Tishler at Jun 22, 2002 at 2:11 am
    Dmitri,
    On Fri, Jun 21, 2002 at 09:04:10AM -0700, Dmitri wrote:
    [snip]
    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?
    Sorry I don't, but see below...
    2. The problem like "initializer element is not constant" is shown but
    [snip]
    See the following for the solution to the above:

    http://cygwin.com/ml/cygwin/2002-06/msg00273.html

    Would you like to contribute a pre-built Cygwin PyXML to the Cygwin
    distribution?

    Jason
  • Dmitri at Jun 22, 2002 at 11:01 pm
    Jason ,
    Would you like to contribute a pre-built Cygwin PyXML to the Cygwin
    distribution?
    That's possible, as long as I will be satisfied by the results.

    Dmitri
  • Jason Tishler at Jun 24, 2002 at 4:54 pm
    Dmitri,
    On Sat, Jun 22, 2002 at 04:01:27PM -0700, Dmitri wrote:
    Would you like to contribute a pre-built Cygwin PyXML to the Cygwin
    distribution?
    That's possible, as long as I will be satisfied by the results.
    I'm sure you will be "satisfied by the results" of contributing a
    pre-built Cygwin PyXML to the Cygwin community. :,)

    Or, were you referring to my suggested solution?

    Jason

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJun 21, '02 at 4:04p
activeJun 24, '02 at 4:54p
posts4
users2
websitepython.org

2 users in discussion

Dmitri: 2 posts Jason Tishler: 2 posts

People

Translate

site design / logo © 2022 Grokbase