Subject: Problem to link with libreadline on Linux

From: Pascal Vaillant <[email-masked]>
Date: Mon, 10 Jan 2000 11:32:42 +0000 (GMT)

Dear _,

First of all: I know, the problem I have is well-known, it is
even mentioned in the first file you open when you get the
linux sources (README.linux) :

 This  file  used  to  hold an  enthousiastic  mail from   Phil Perucci
 ([email-masked]) describing  his linux    port  of
 version 1.6.9.  The current version  is fully integrated and  requires
 no additional README ... except for the GNU readline library.

 This library  isn't  out for long  and the  official   GNU version 1.1
 compiles fine on Linux but runs lousy :-(.  There  is a decent version
 of this library in /pub/linux/lib/librl-1.1.tar.Z.

This does make me all the more unhappy that I could not solve it
by myself, so... sorry!

(Anyway I couldn't find the problem mentioned in the recent archived
mails of this mailing list, which suggests many other people in the
world might have succeeded in solving it, hence my question here :).

Here is the problem: I want to install SWI-Prolog v. 3.2.9. I have
the GNU Libraries (got from the Debian distribution):

libreadline.so.2.1

(... and:

libc.so.6 (aka glibc.2.0.7)
libncurses.so.4
ld-linux.so.2)

Exactly as predicted, SWI-Prolog "compiles fine" (after configure,
make, make install), but the readline functions "run lousy": The
up-arrow key just tells me "^[[A", and Control-P tells me "^P".

I also tried the adapted static library distributed by Jan
Wielemaker on:

 ftp://swi.psy.uva.nl/pub/gnu/readline/readline.2.0.2.tar.gz

Following the instructions, I ran configure, make, make install.
It installed the static library libreadline.a in /usr/local/lib.
To make sure the linker would take the desired version, I also
destroyed the link to the shlib in the /lib directory:

 /lib/libreadline.so -> /lib/libreadline.so.2.1

and put another link to:

 /lib/libreadline.a -> /usr/local/lib/libreadline.a

instead (thought it could not harm).

However, when I recompile, I get the same problem.

(I also tried to 'make clean' before I 'make' again).

The theoretic possibility that these readline functions should
work, more or less, still must exist, since the previous version
of prolog (swi-prolog-2.9.6, installed automatically from a Debian
package distributed on my Debian CD-ROM, swi-prolog_2.9.6-6.deb),
worked fine on this same system.

Can anyone understand what does not work here?

Many thanks in advance,

Pascal Vaillant
Berlin