On Fri, 20 Jun 2014 21:55:24 -0500
Dan Williams <[email protected]> wrote:
> We're planning the final 0.9.10 release for later this week, so get
> your party hats ready!
If I understand correctly, readline is only needed if nmtui is
enabled. If that's correct, then there's probably a bug in the
build system, as it's unconditionally checking for readline.
That said, I *want* nmtui, so that's not really a concern to me
personally - I'm having a different problem.
./configure
...
checking for readline in -lreadline... no
configure: error: readline library is required
readline *is* installed though - I've got readline-6.3 and the
corresponding libreadline.so.6 ; I also tried on another system
(also Slackware) with libreadline.so.5 (readline-5.2) and it fails
the same way. I don't know autotools well at all, but it looks
like this is how configure checks for readline support:
[rworkman@liberty NetworkManager-0.9.9.98]$ cat testrl.c
#ifdef __cplusplus
extern "C"
#endif
char readline ();
int
main ()
{
return readline ();
;
return 0;
}
So... let's see what happens:
[rworkman@liberty NetworkManager-0.9.9.98]$ gcc -o testrl -lreadline testrl.c
/usr/lib64/gcc/x86_64-slackware-linux/4.8.3/../../../../lib64/libreadline.so:
undefined reference to `tputs'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.3/../../../../lib64/libreadline.so:
undefined reference to `tgoto'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.3/../../../../lib64/libreadline.so:
undefined reference to `tgetflag'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.3/../../../../lib64/libreadline.so:
undefined reference to `UP'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.3/../../../../lib64/libreadline.so:
undefined reference to `tgetent'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.3/../../../../lib64/libreadline.so:
undefined reference to `tgetnum'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.3/../../../../lib64/libreadline.so:
undefined reference to `PC'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.3/../../../../lib64/libreadline.so:
undefined reference to `tgetstr'
/usr/lib64/gcc/x86_64-slackware-linux/4.8.3/../../../../lib64/libreadline.so:
undefined reference to `BC'
collect2: error: ld returned 1 exit status
Okay, looks like that's ncurses, so let's link ncurses too:
[rworkman@liberty NetworkManager-0.9.9.98]$ gcc -o testrl -lreadline
-lncurses testrl.c
[rworkman@liberty NetworkManager-0.9.9.98]$ strings testrl | grep readline
libreadline.so.6
readline
readline
Now, here's where I'm unclear. If I add LDFLAGS="-lnurses" to the configure
environment, the test passes and the complete build occurs successfully.
What's unclear is *why* that's needed -- is this an omission in the NM
sources (isn't nmtui a curses client and thus ncurses should be linked?)
or is something different about how we (Slackware) build readline?
On a related note, assuming ncurses *should* be linked in too, then
should we uses ncursesw instead of ncurses?
-RW
_______________________________________________
networkmanager-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/networkmanager-list