[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [REGRESSION] Incorrect libcurses detection in 8.2 (on HP-UX)
From: |
Chet Ramey |
Subject: |
Re: [REGRESSION] Incorrect libcurses detection in 8.2 (on HP-UX) |
Date: |
Fri, 18 Aug 2023 09:08:12 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 |
On 8/17/23 9:05 AM, Osipov, Michael (IN IT IN) wrote:
Folks,
while trying to configure and compile 8.2 on HP-UX I have a link error with
-lncurses although configure tells me:
checking which library has the termcap functions... using libcurses
checking for ncurses/termcap.h... no
I tracked the issue down to be caused by
f7a382fd09319b20ef4435b9b554183b605468c1. The proper BASH_CHECK_LIB_TERMCAP
in readline-8.2/examples/autoconf/BASH_CHECK_LIB_TERMCAP has this fallback:
else
TERMCAP_LIB=-lcurses
TERMCAP_DEP=
fi
which perfectly works for HP-UX and likely others. Now aclocal.m4 has:
else
# we assume ncurses is installed somewhere the linker can find it
TERMCAP_LIB=-lncurses
TERMCAP_DEP=
fi
Yes, it defaults to ncurses and assumes that it can be found, even though
configure did not find it.
note that libncurses is handled explicitly a few lines up and does not
require to be the default. The trivial patch is like before in 8.1:
That's not the right fix.
The right fix is:
*** ../bash-5.2-patched/aclocal.m4 Fri Mar 25 10:14:23 2022
--- aclocal.m4 Thu Aug 17 09:47:59 2023
***************
*** 987,990 ****
--- 956,962 ----
TERMCAP_LIB=-lncurses
TERMCAP_DEP=
+ elif test $bash_cv_termcap_lib = libcurses; then
+ TERMCAP_LIB=-lcurses
+ TERMCAP_DEP=
elif test $bash_cv_termcap_lib = libc; then
TERMCAP_LIB=
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/