I could not find libreadline
Hi all, I am installing ginac 1.4.0 on an openSuSE 10.3 machine. I have installed libreadline: # ll /lib/*readline* lrwxrwxrwx 1 root root 21 Nov 15 10:02 /lib/libreadline.so -> /lib/libreadline.so.5 lrwxrwxrwx 1 root root 23 Oct 13 09:59 /lib/libreadline.so.4 -> /lib/libreadline.so.5.2 lrwxrwxrwx 1 root root 18 Oct 8 20:55 /lib/libreadline.so.5 -> libreadline.so.5.2 -rwxr-xr-x 1 root root 198824 Sep 22 00:16 /lib/libreadline.so.5.2 Still, configuring ginac results in: === The following minor problems have been detected by configure. === Please check the messages below before running "make". === (see the section 'Common Problems' in the INSTALL file) == I could not find libreadline (needed by ginsh). In config.log, I find: configure:22950: checking for readline in -lreadline configure:22980: g++ -o conftest -g -O2 conftest.cc -lreadline >&5 /usr/local/lib/libreadline.so: undefined reference to `PC' /usr/local/lib/libreadline.so: undefined reference to `tgetflag' /usr/local/lib/libreadline.so: undefined reference to `tgetent' /usr/local/lib/libreadline.so: undefined reference to `UP' /usr/local/lib/libreadline.so: undefined reference to `tputs' /usr/local/lib/libreadline.so: undefined reference to `tgoto' /usr/local/lib/libreadline.so: undefined reference to `tgetnum' /usr/local/lib/libreadline.so: undefined reference to `BC' /usr/local/lib/libreadline.so: undefined reference to `tgetstr' collect2: ld returned 1 exit status which suggests that libreadline is looked for in /usr/local/lib, but not in /lib. Can this behavior be changed? Not even installing libreadline in /usr/local/lib like # ll /usr/local/lib/*readline* -rw-r--r-- 1 root root 659580 Nov 13 10:54 /usr/local/lib/libreadline.a lrwxrwxrwx 1 root root 16 Nov 13 10:54 /usr/local/lib/libreadline.so -> libreadline.so.5 lrwxrwxrwx 1 root root 18 Nov 13 10:54 /usr/local/lib/libreadline.so.5 -> libreadline.so.5.2 -r-xr-xr-x 1 root root 484002 Nov 13 10:54 /usr/local/lib/libreadline.so.5.2 does help. Any suggestion, what could be the reason? Best regards Bernd -- ======================================================================= Bernd Speiser Institut für Organische Chemie Auf der Morgenstelle 18 temporary address: Auf der Morgenstelle 15 D-72076 Tübingen Germany phone: +49-7071-2976205 (office) +49-7071-2976242 (laboratory) fax: +49-7071-295518 e-mail: bernd.speiser@uni-tuebingen.de Internet: http://www.uni-tuebingen.de/speiser =======================================================================
Hi! Bernd Speiser wrote:
In config.log, I find:
configure:22950: checking for readline in -lreadline configure:22980: g++ -o conftest -g -O2 conftest.cc -lreadline >&5 /usr/local/lib/libreadline.so: undefined reference to `PC' /usr/local/lib/libreadline.so: undefined reference to `tgetflag' /usr/local/lib/libreadline.so: undefined reference to `tgetent' /usr/local/lib/libreadline.so: undefined reference to `UP' /usr/local/lib/libreadline.so: undefined reference to `tputs' /usr/local/lib/libreadline.so: undefined reference to `tgoto' /usr/local/lib/libreadline.so: undefined reference to `tgetnum' /usr/local/lib/libreadline.so: undefined reference to `BC' /usr/local/lib/libreadline.so: undefined reference to `tgetstr' collect2: ld returned 1 exit status
which suggests that libreadline is looked for in /usr/local/lib, but not in /lib. Can this behavior be changed?
Not even installing libreadline in /usr/local/lib like
# ll /usr/local/lib/*readline* -rw-r--r-- 1 root root 659580 Nov 13 10:54 /usr/local/lib/libreadline.a lrwxrwxrwx 1 root root 16 Nov 13 10:54 /usr/local/lib/libreadline.so -> libreadline.so.5 lrwxrwxrwx 1 root root 18 Nov 13 10:54 /usr/local/lib/libreadline.so.5 -> libreadline.so.5.2 -r-xr-xr-x 1 root root 484002 Nov 13 10:54 /usr/local/lib/libreadline.so.5.2
does help.
Any suggestion, what could be the reason?
Those unresolved symbols are all supposed to be provided by libncurses. Actually, the dynamic libreadline should be linked against libncurses. If linking against a dynamic libreadline fails to pull in libncurses, then libreadline is broken or not installed correctly. Which suggest you should fix the installation of libreadline. (Alternatively, you may be able to export LDFLAGS="-lncurses" or similarly, but that is a hack.) Cheers -richy. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/>
Richard B. Kreckel wrote:
Those unresolved symbols are all supposed to be provided by libncurses. Actually, the dynamic libreadline should be linked against libncurses. If linking against a dynamic libreadline fails to pull in libncurses, then libreadline is broken or not installed correctly.
Which suggest you should fix the installation of libreadline. (Alternatively, you may be able to export LDFLAGS="-lncurses" or similarly, but that is a hack.)
All right, installing ncurses-devel did the trick. Now configure does no longer complain, the compilation runs ok. I did no test yet though. Thanks. Bernd -- ======================================================================= Bernd Speiser Institut für Organische Chemie Auf der Morgenstelle 18 temporary address: Auf der Morgenstelle 15 D-72076 Tübingen Germany phone: +49-7071-2976205 (office) +49-7071-2976242 (laboratory) fax: +49-7071-295518 e-mail: bernd.speiser@uni-tuebingen.de Internet: http://www.uni-tuebingen.de/speiser =======================================================================
Hello! On Sat, Nov 17, 2007 at 03:32:06PM +0100, Bernd Speiser wrote:
I am installing ginac 1.4.0 on an openSuSE 10.3 machine. I have installed libreadline:
I don't thinks so (I'll give more details in a moment).
Still, configuring ginac results in:
=== The following minor problems have been detected by configure. === Please check the messages below before running "make". === (see the section 'Common Problems' in the INSTALL file)
== I could not find libreadline (needed by ginsh).
If you don't intend to use ginsh, you can safely ignore this warning. Otherwise you need to install readline-devel package (it may be called libreadline-dev, etc).
In config.log, I find:
It would be nice to see the *complete* config.log, so I won't need to play the guess game. Well, here is more detailed explanation.
# ll /lib/*readline* lrwxrwxrwx 1 root root 21 Nov 15 10:02 /lib/libreadline.so -> /lib/libreadline.so.5
Typically the /lib directory contains only important libraries necessary for running basic *NIX programs. So this symlink looks suspicious. This web page http://www.novell.com/products/linuxpackages/opensuse/libreadline5.html kind of confirms my naive expectations. I guess you made this symlink yourself. But it is useless. First of all, the linker (/usr/bin/ld) does not look for libraries in the /lib directory. Secondly, the headers are still missing (ls /usr/include/readline to check). So, you've decided to compile readline from the source. Your attempt failed. Some libraries (i.e. libncurses) neccessary for readline are still missing, hence the error:
configure:22950: checking for readline in -lreadline configure:22980: g++ -o conftest -g -O2 conftest.cc -lreadline >&5 /usr/local/lib/libreadline.so: undefined reference to `PC' /usr/local/lib/libreadline.so: undefined reference to `tgetflag' /usr/local/lib/libreadline.so: undefined reference to `tgetent' /usr/local/lib/libreadline.so: undefined reference to `UP' /usr/local/lib/libreadline.so: undefined reference to `tputs' /usr/local/lib/libreadline.so: undefined reference to `tgoto' /usr/local/lib/libreadline.so: undefined reference to `tgetnum' /usr/local/lib/libreadline.so: undefined reference to `BC' /usr/local/lib/libreadline.so: undefined reference to `tgetstr' collect2: ld returned 1 exit status
lrwxrwxrwx 1 root root 23 Oct 13 09:59 /lib/libreadline.so.4 -> /lib/libreadline.so.5.2
Ouch! This one is definitely wrong. AFAIK version 4 of libreadline is incompatible with version 5. If you ever happen to use some programs linked with libreadline 4.x version, all bets are off. This symlink might cause a lot of troubles, ranging from a bunch of cryptic warnings (emitted by the runtime linker) to a segfault or a silent data corruption. If you made this symlink yourself, you'd better remove it. Otherwise report this to openSuSE maintainers. Best regards, Alexei -- All science is either physics or stamp collecting.
participants (3)
-
Alexei Sheplyakov
-
bernd.speiser@t-online.de
-
Richard B. Kreckel