Re: problem compiling python's readline on linux

Ulf Bartelt (stub@pce60.rz.tu-clausthal.de)
23 Sep 1994 06:47:57 GMT

Guido.van.Rossum@cwi.nl wrote:
: > I would like to compile python on a linux box with readline (to use tkinter)
: > or as an alternative with stdwin. Python itself builds without change. I
: > also build python + readline + stdwin successfully on a sun4 under SunOs
: > 4.3.1. Unfortunateley things are not so straightforward under linux, and I
: > do not know much about unix, gcc, make ...

: You really don't need readline to run tkinter, unless you insist on
: running in interactively.

: Regarding readline: I suggest you use readline 2.0. From the Python
: 1.1 README:

: - You can use the GNU readline library to improve the interactive user
: interface: this gives you line editing and command history when
: calling python interactively. You need to configure build the GNU
: readline library before running the configure script.

In ftp://sunsite.unc.edu/pub/Linux/Libs, there's a package called
readline-2.0.x (x round about 2 or 3) which contains a shared library image
of readline-2.0.x, it's sources and some other goodies...

You'll need a newer ld.so (1.4.4 ?) to use that package.

Put the librl.so.2.0.x in /usr/lib, put a softlink named librl.so.2 in /lib
and compile python --with-readline=/usr/lib.

For me it worked.

Nasty: Both Ncurses and Readline are defining backspace. This collides when
using the cursesmodule and readline together.
For me putting a -Dbackspace=bAckspace in ncurses' Makefile was the cure. So
side effects so far... ;-)

I got a nearly full (module) featured python 1.0.3 running under linux. If
someone wants the binary, drop me a line... ;-)

Bye,
Ulf.

--
Ulf Bartelt | 2:2437/120.666@fidonet.org | bartelt@sun2.isaf.tu-clausthal.de
            |                            | stub@linux.rz.tu-clausthal.de