From pascal@rz.hu-berlin.de  Mon Jan 10 12:31:59 2000
Received: from suncom.rz.hu-berlin.de (suncom.rz.hu-berlin.de [141.20.1.31])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id MAA27456
	for <prolog@swi.psy.uva.nl>; Mon, 10 Jan 2000 12:31:58 +0100 (MET)
Received: from localhost.rz.hu-berlin.de (ppp196-41.rz.hu-berlin.de [141.20.196.41])
	by suncom.rz.hu-berlin.de (8.9.3/8.9.3) with ESMTP id MAA02249
	for <prolog@swi.psy.uva.nl>; Mon, 10 Jan 2000 12:32:02 +0100 (MET)
Received: (from pascal@localhost)
	by localhost (8.8.8/8.8.8/Debian/GNU) id MAA03133;
	Mon, 10 Jan 2000 12:32:43 +0100
Date: Mon, 10 Jan 2000 11:32:42 +0000 (GMT)
From: Pascal Vaillant <Pascal.Vaillant@rz.hu-berlin.de>
To: prolog@swi.psy.uva.nl
Subject: Problem to link with libreadline on Linux
Message-ID: <Pine.LNX.4.05.10001101057340.455-100000@ppp196-41.rz.hu-berlin.de>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


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
 (dsc3pzp@nmrdc1.nmrdc.nnmc.navy.mil) 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



