Discussion:
bash will not link against ncursesw and readline in /usr/local
John Frankish
2018-11-11 11:42:52 UTC
Permalink
Using bash-4.4.18
Intel core i7 laptop running 32-bit or 64-bit linux
Using gcc-8.2.0

The configure script does not find libncursesw on a system where only the wide version of ncurses exists - even when readine is linked against ncursesw.

The configure scripts does not find libreadline when it is compiled to /usr/local and when using the configure switch "--with-installed-readline=/usr/local"

The following seems to work, but it would be good if the configure script could manage without help

edit configure
5166: LIBS="-lncursesw $LIBS"

5260: eval ac_cv_rl_includedir=/usr/local/include/readline
5261: eval ac_cv_rl_libdir=/usr/local/lib

5263: LIBS="$LIBS -lreadline -lncursesw"


./configure --prefix=/usr/local --without-bash-malloc --with-installed-readline=/usr/local ac_cv_lib_ncurses_tgetent=true

make
make install
John Frankish
2018-11-11 11:34:57 UTC
Permalink
Using bash-4.4.18
Intel core i7 laptop running 32-bit or 64-bit linux
Using gcc-8.2.0

The configure script does not find libncursesw on a system where only the wide version of ncurses exists - even when readine is linked against ncursesw.

The configure scripts does not find libreadline when it is compiled to /usr/local and when using the configure switch "--with-installed-readline=/usr/local"

The following seems to work, but it would be good if the configure script could manage without help

edit configure
5166: LIBS="-lncursesw $LIBS"

5260: eval ac_cv_rl_includedir=/usr/local/include/readline
5261: eval ac_cv_rl_libdir=/usr/local/lib

5263: LIBS="$LIBS -lreadline -lncursesw"


./configure --prefix=/usr/local --without-bash-malloc --with-installed-readline=/usr/local ac_cv_lib_ncurses_tgetent=true

make
make install
Chet Ramey
2018-11-12 14:13:45 UTC
Permalink
Post by John Frankish
Using bash-4.4.18
Intel core i7 laptop running 32-bit or 64-bit linux
Using gcc-8.2.0
The configure script does not find libncursesw on a system where only the wide version of ncurses exists - even when readine is linked against ncursesw.
I haven't seen a distro where ncursesw is installed without a link to
ncurses. Which distribution are you using?

I could add a check for ncursesw, but that's the kind of thing the distro
usually does.
Post by John Frankish
The configure scripts does not find libreadline when it is compiled to /usr/local and when using the configure switch "--with-installed-readline=/usr/local"
I don't have any trouble finding readline in /usr/local/lib/libreadline.so
after installing it, editing /etc/ld.so.conf, and running ldconfig. I tried
with readline-8.0-beta and bash-5.0-beta, so at least it will be working
when those hit release status.

Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU ***@case.edu http://tiswww.cwru.edu/~chet/
John Frankish
2018-11-14 06:07:59 UTC
Permalink
Post by John Frankish
Using bash-4.4.18
Intel core i7 laptop running 32-bit or 64-bit linux Using gcc-8.2.0
The configure script does not find libncursesw on a system where
only the wide version of ncurses exists - even when readine is linked against ncursesw.
I haven't seen a distro where ncursesw is installed without a link to ncurses.
Which distribution are you using?
The 64-bit version of tinycorelinux - all non-base packages are installed to /usr/local.
Since ncursesw is now the default, I'm trying to compile against that.
I could add a check for ncursesw, but that's the kind of thing the distro usually does.
If ncursesw is now the default, maybe it would make sense to check for that rather than a symlink?
Post by John Frankish
The configure scripts does not find libreadline when it is compiled to
/usr/local and when using the configure switch "--with-installed-readline=/usr/local"
I don't have any trouble finding readline in /usr/local/lib/libreadline.so after
installing it, editing /etc/ld.so.conf, and running ldconfig. I tried with readline-8.0-beta
and bash-5.0-beta, so at least it will be working when those hit release status.
It appears that the readline check relies on the ncurses check being successful.

If I configure without an ncurses symlink the check for readline fails.

If I add an ncurses symlink the check for readline succeeds.

checking for tgetent... no
checking for tgetent in -ltermcap... no
checking for tgetent in -ltinfo... no
checking for tgetent in -lcurses... no
checking for tgetent in -lncurses... no
checking which library has the termcap functions... using gnutermcap
checking version of installed readline library... configure: WARNING: Could not test version of installed readline library.
configure: WARNING: installed readline library is too old to be linked with bash
configure: WARNING: using private bash version

configure:5194: result: no
configure:5213: checking which library has the termcap functions
configure:5216: result: using gnutermcap
configure:5242: checking version of installed readline library
configure:5296: gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe -o conftest -g -O2 -Wno-parentheses -Wno-format-security -I/usr/local/include -L./lib/termcap -L/usr/local/lib conftest.c -lreadline ./lib/termcap/libtermcap.a >&5
gcc: error: ./lib/termcap/libtermcap.a: No such file or directory

$ cd /usr/local/lib
$ sudo ln -s libncursesw.so.6.1 libncurses.so
$ sudo ldconfig

checking for tgetent... no
checking for tgetent in -ltermcap... no
checking for tgetent in -ltinfo... no
checking for tgetent in -lcurses... no
checking for tgetent in -lncurses... yes
checking which library has the termcap functions... using libncurses
check
Chet Ramey
2018-11-14 16:36:11 UTC
Permalink
Post by John Frankish
Post by John Frankish
Using bash-4.4.18
Intel core i7 laptop running 32-bit or 64-bit linux Using gcc-8.2.0
The configure script does not find libncursesw on a system where
only the wide version of ncurses exists - even when readine is linked against ncursesw.
I haven't seen a distro where ncursesw is installed without a link to ncurses.
Which distribution are you using?
The 64-bit version of tinycorelinux - all non-base packages are installed to /usr/local.
Since ncursesw is now the default, I'm trying to compile against that.
I could add a check for ncursesw, but that's the kind of thing the distro usually does.
If ncursesw is now the default, maybe it would make sense to check for that rather than a symlink?
What does "the default" mean in a multi-distro context? And readline
doesn't check for "a symlink"; it checks for ncurses.
Post by John Frankish
I don't have any trouble finding readline in /usr/local/lib/libreadline.so after
installing it, editing /etc/ld.so.conf, and running ldconfig. I tried with readline-8.0-beta
and bash-5.0-beta, so at least it will be working when those hit release status.
It appears that the readline check relies on the ncurses check being successful.
If I configure without an ncurses symlink the check for readline fails.
Yes, readline requires curses/ncurses to work. You can't have readline and
line editing without it.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU ***@case.edu http://tiswww.cwru.edu/~chet/
Chet Ramey
2018-11-14 21:09:44 UTC
Permalink
Post by John Frankish
If ncursesw is now the default, maybe it would make sense to check for that rather than a symlink?
I added a check for it, but I think its impact will be minimal.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU ***@case.edu http://tiswww.cwru.edu/~chet/
John Frankish
2018-11-15 05:24:07 UTC
Permalink
Post by Chet Ramey
Post by John Frankish
If ncursesw is now the default, maybe it would make sense to check for that rather than a symlink?
I added a check for it, but I think its impact will be mini
Loading...