[PATCH] ncurses: Install terminfo database again
Charlie Jenkins
thecharlesjenkins at gmail.com
Tue Nov 3 22:47:53 PST 2026
When pkg-config is not installed on the system and the openwrt
pkg-config has been compiled, the openwrt pkg-config will be invoked to
find the ncurses libraries to link against scripts/configs/mconf for
"make menuconfig". The openwrt pkg-config provides the path
-L/path/to/openwrt/staging_dir/hostpkg/lib, so if the openwrt ncurses
package has been built, the openwrt ncurses library will be what
scripts/configs/mconf gets linked against.
Commit 036016036e62 ("ncurses: Skip terminfo database install on host")
removed the terminfo database because on systems where the host has
pkg-config installed, the database attempted to install at /usr/lib and
would fatally fail on ncurses versions above 6.5. This is fine on
systems with pkg-config since scripts/configs/mconf will get dynamically
linked against the system's ncurses and use the system's terminfo
database. However, on systems where the host does not have pkg-config
installed and the ncurses package has been built and the pkg-config
package has been built, scripts/configs/mconf will get statically linked
against the ncurses package that no longer has a terminfo database,
causing a failure similar to:
$ make menuconfig
ncurses: cannot initialize terminal type ($TERM="xterm-256color"); exiting
To resolve this, pass the staging directory to host ncurses configure
such that the terminfo database will be installed into the correct
location regardless of the system's presence of pkg-config, instead of
skipping the installation.
Fixes: 036016036e62 ("ncurses: Skip terminfo database install on host")
Reported-by: Hannu Nyman <hannu.nyman at iki.fi>
Reported-by: Edoardo Pinci <epinci at outlook.com>
Tested-by: Hannu Nyman <hannu.nyman at iki.fi>
Signed-off-by: Charlie Jenkins <thecharlesjenkins at gmail.com>
---
There was a discussion on github here:
https://github.com/openwrt/openwrt/commit/6e5652a4aaf7bb00c11ddea7c1e702a68eb481c3
---
package/libs/ncurses/Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/package/libs/ncurses/Makefile b/package/libs/ncurses/Makefile
index bd9c55369a..d5376b6ad9 100644
--- a/package/libs/ncurses/Makefile
+++ b/package/libs/ncurses/Makefile
@@ -98,7 +98,9 @@ HOST_CONFIGURE_ARGS += \
--without-profile \
--without-tests \
--without-curses-h \
- --disable-db-install
+ --with-terminfo-dirs=$(STAGING_DIR_HOST)/share/terminfo \
+ --with-default-terminfo-dir=$(STAGING_DIR_HOST)/share/terminfo \
+ --with-pkg-config-libdir=$(STAGING_DIR_HOST)/lib/pkgconfig
ifeq ($(HOST_OS),FreeBSD)
---
base-commit: d13ba979b017b63ebc18a4deab161b9557ea07f3
change-id: 20261103-fix_ncurses-0013f20d9a6d
Best regards,
--
- Charlie
More information about the openwrt-devel
mailing list