[issue7384] curses crash on FreeBSD

Stefan Krah report at bugs.python.org
Sun Apr 18 17:19:03 CEST 2010


Stefan Krah <stefan-usenet at bytereef.org> added the comment:

To clarify a couple of things:

On some systems (Redhat?) readline is not linked against ncurses in order to give the user the possibility to choose. This is why setup.py
has to select an ncurses version.

However, things can go wrong if readline is already linked against
a specific ncurses version. On FreeBSD-8.0 this version is ncurses,
but setup.py selects ncursesw:


stefan at freebsd-amd64:~> ldd /lib/libreadline.so.8 
/lib/libreadline.so.8:
        libncurses.so.8 => /lib/libncurses.so.8 (0x800b3e000)
        libc.so.7 => /lib/libc.so.7 (0x800648000)
stefan at freebsd-amd64:~> ls /lib/libncurses*
/lib/libncurses.so.8    /lib/libncursesw.so.8


issue7384.patch suppresses the selection, but is a little primitive.

I've created a new patch, which does the following:

  1) Detect if readline is already linked against ncurses and
     if so, skip any further selection. This must be done.

  2) Use the same version of ncurses for readline.so and _curses.so.


I'm not sure if 2) is necessary. With the previous patch, readline.so
was linked against ncurses and _curses.so against ncursesw. All tests
were passed though.



Any thoughts whether readline.so and _curses.so should link against
the same curses library?

----------
Added file: http://bugs.python.org/file16973/issue7384-2.patch

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


More information about the Python-bugs-list mailing list