twisted/protocols/_c_urlarg.c compilation errors on IBM AIX

[email protected] Tue, 01 Dec 2009 07:18:21 -0000
Newsgroups gmane.comp.python.twisted.bugs
Message-ID <[email protected]>
New submission from aprilmay <None>:

Errors building on IBM AIX 5.3 with native compiler xlc_r:
{{{
Running Twisted-9.0.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-dO3vwp/Twisted-9.0.0/egg-dist-tmp-ECS6yS
"conftest.c", line 1.10: 1506-296 (S) #include file <sys/epoll.h> not found.
"conftest.c", line 1.23: 1506-356 (W) Compilation unit is empty.
"twisted/protocols/_c_urlarg.c", line 65.28: 1506-280 (E) Function argument assignment between types "const char*" and "unsigned char*" is not allowed.
"twisted/protocols/_c_urlarg.c", line 75.28: 1506-280 (E) Function argument assignment between types "const char*" and "unsigned char*" is not allowed.
"twisted/protocols/_c_urlarg.c", line 83.28: 1506-280 (E) Function argument assignment between types "const char*" and "unsigned char*" is not allowed.
"twisted/protocols/_c_urlarg.c", line 85.28: 1506-280 (E) Function argument assignment between types "const char*" and "unsigned char*" is not allowed.
"twisted/protocols/_c_urlarg.c", line 93.20: 1506-280 (E) Function argument assignment between types "const char*" and "unsigned char*" is not allowed.
"twisted/protocols/_c_urlarg.c", line 96.20: 1506-280 (E) Function argument assignment between types "const char*" and "unsigned char*" is not allowed.
"twisted/protocols/_c_urlarg.c", line 97.20: 1506-280 (E) Function argument assignment between types "const char*" and "unsigned char*" is not allowed.
}}}

Unfortunately _c_urlarg.so is generated, so:

{{{
>>> from twisted.protocols._c_urlarg import unquote
>>> unquote("")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
MemoryError: out of memory
}}}

When running a twisted web server, there's a nasty CPU loop around line 122 of twisted/web/server.py. I guess other defects might occur so the easy workaround os to remove the _c_urlarg.so file.

Everything else seem to work like a charm on AIX (with python 2.6 from http://www.perzl.org/aix/index.php?n=Main.Python)

----------
Type     : defect
Component: core
Keywords : 
Priority : normal
Nosy     : 
----------
http://twistedmatrix.com/trac/ticket/4142