[issue4204] Cannot build _multiprocessing, math, mmap and readline of Python 2.6 on FreeBSD 4.11 w/ gcc 2.95.4

Zvezdan Petkovic report at bugs.python.org
Mon Feb 23 06:55:27 CET 2009


Zvezdan Petkovic <zvezdan at zope.com> added the comment:

Part of this patch committed in -r 67098 breaks Mac OS X 10.5,
because the completion_matches() function is already declared in 
/usr/include/readline/readline.h and the new declaration conflicts with 
it.

If the lack of this declaration is a problem for FreeBSD, then it will 
have to be conditionally declared for FreeBSD platform, and perhaps 
specific version of FreeBSD 4.x.

Something along the lines of:
#ifdef __FreeBSD__
/* perhaps a specific FreeBSD version condition here 4.x? */
extern char **completion_matches(char *, CPFunction *);
#endif

I have a patch of an off-by-one out-of-bounds error in readline.c, that 
enables building Python with Mac OS X native readline/editline 
emulation.  There's no need for an external GNU readline port 
installation (unless one wants some features that editline perhaps 
doesn't have).

That patch worked fine with Python 2.4 ad 2.5, but when I tried it with 
Python 2.6.1 the build failed because of the conflicting declaration 
introduced with this tracker issue.  When the line

    extern char **completion_matches(char *, CPFunction *);

is commented out, the readline module compiles and works OK.
(Well, line 558 in setup.py needs to be uncommented to look like this:

        if platform == 'darwin' and os.uname()[2] < '9.':

to allow the use of Mac OS X readline/editline library)

I can submit the readline.c patch for Mac OS X in a separate tracker 
issue, but the changes done in this issue should be fixed separately in 
my opinion.

Please advise how to proceed.

----------
nosy: +zvezdan

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4204>
_______________________________________


More information about the Python-bugs-list mailing list