Hi,
With the head cvs snapshot of 15/03 and earlier, configure doesn't seem able anymore to find the readline libs. It finds the includes ok, but hangs on the lib even when pointed to.
It's a minor detail but I thought I'd mention it.
Command used:
./configure --with-readline --with-readline-includes=/usr/include/readline --with-readline-libs=/usr/lib etc
Readline version redhat readline-4.3-3 rpm
Greetings Sjors
sjors wrote:
With the head cvs snapshot of 15/03 and earlier, configure doesn't seem
able anymore to find the readline libs. It finds the includes ok, but
hangs on the lib even when pointed to.
It's a minor detail but I thought I'd mention it.
Can you locate the corresponding error message in the config.log file?
--
Glynn Clements <glynn.clements@virgin.net>
Glynn Clements wrote:
Can you locate the corresponding error message in the config.log file
Hi Glynn, here it is:
configure:5130: checking whether to use Readline
configure:5151: checking for location of Readline includes
configure:5177: checking for readline/readline.h
configure:5185: gcc -E -I/usr/include/readline/ conftest.c >/dev/null 2>conftest.out
configure:5221: checking for readline/history.h
configure:5229: gcc -E -I/usr/include/readline/ conftest.c >/dev/null 2>conftest.out
configure:5263: checking for location of Readline library
configure:5288: checking for readline in -lreadline
configure:5305: gcc -o conftest -g -O2 conftest.c -lreadline 1>&5
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `tgetnum'
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `tgoto'
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `tgetflag'
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `BC'
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `tputs'
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `PC'
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `tgetent'
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `UP'
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so: undefined reference to `tgetstr'
collect2: ld returned 1 exit status
configure: failed program was:
#line 5294 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char readline();
int main() {
readline()
; return 0; }
sjors wrote:
> Can you locate the corresponding error message in the config.log file
configure:5288: checking for readline in -lreadline
configure:5305: gcc -o conftest -g -O2 conftest.c -lreadline 1>&5
/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libreadline.so:
undefined reference to `tgetnum'
OK; it's a known problem. At present, the only workaround is to
manually edit src/CMD/head/head, e.g.
READLINELIB = -lreadline -lncurses
and src/include/config.h, e.g.
/* define if readline exists */
#define HAVE_READLINE_READLINE_H 1
Unfortunately, it's far from clear as to which additional libraries we
should be checking for. Actually, it's fairly clear which libraries
are plausible (lib[n]curses, libtinfo and libtermcap), but the termcap
functions (e.g. tgetnum) are often provided by more than one of them,
and it isn't clear as to exactly which one we should choose.
--
Glynn Clements <glynn.clements@virgin.net>