Karim BELABAS on Mon, 10 Jun 2002 15:02:10 +0200 (MEST)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[readline | ncurses]-devel on Linux


There have been many bug reports about readline on Linux machines (some of
them on the lists):

1) readline.rpm is installed (for bash), but not readline-devel.rpm hence
libreadline.so is not there (although libreadline.so.x is present). Hence,
Configure would report a missing readline. The simple solution is to install
the readline-devel.rpm package

2) Another, more subtle, problem is that readline-devel _is_ installed, but
not ncurses-devel (this is a bug in the RedHat distribution for instance).
So libreadline.so is there but not libncurses.so, although the former depends
on the latter, hence Configure would think that readline is not functional
since it depends on a "missing" library (although libncurses.so.x is there).

So to compile pari, one needs to install both readline-devel and
ncurses-devel (and readline and ncurses, but these are most probably
installed by default). One some distributions, readline-devel is not flagged
as depending on ncurses-devel, so that one can install one without the other,
leading to confusion.

[ there are variations on this theme with libtercap instead of libncurses ]

=============================================================================

Bill and I have changed the Configure logic (the config/locatelib script) in
the unstable branc, so as to look specifically for a .a /.so / .sl and _not_
for .so.x as it did before (when desperate), the reason being that we need a
library matching the installed header files. If there are multiple .so.x, we
have no way of chosing the right one, and weird problems crop up.

The new script should now report problems (Linux only, otherwise the warning
could be confusing) like:

###
### libreadline.so not found. Please install readline-devel.rpm
###

to give the user a clue that something went wrong (although this being a
non-fatal problem, the Configure run will succeed). The specific message
above means that we could not find a libreadline.a or libreadline.so, but we
found libreadline.so.x.  Same goes for ncurses or any other library for that
matter.

I've documented this in INSTALL.tex. It does break something on your machine if

1) readline-devel is installed
2) ncurses-devel is _not_ installed

in that case the old Configure would notice that libncurses.so.x is there,
contains the symbols required by readline (tgetent), and hope for the best.
In simple installations (e.g packages coming from a single distribution), it
was usually right. If not, gp would not compile.

Now the new locatelib will reject readline, and gp will compile, without
readline support. Hopefully the message

###
### libncurses.so not found. Please install ncurses-devel.rpm
###

will be enough to enable users to correct the problem themselves, without our
trying to second-guess the system.

    Karim.
-- 
Karim Belabas                    Tel: (+33) (0)1 69 15 57 48
Dép. de Mathematiques, Bat. 425  Fax: (+33) (0)1 69 15 60 19
Université Paris-Sud             Email: Karim.Belabas@math.u-psud.fr
F-91405 Orsay (France)           http://www.math.u-psud.fr/~belabas
--
PARI/GP Home Page: http://www.parigp-home.de/