diff mbox series

[2/2] package/ncurses: Also build termlib

Message ID 20250920074707.584930-6-bagasdotme@gmail.com
State New
Headers show
Series [1/2] package/readline: Fix sdk rootfs tarball generation | expand

Commit Message

Bagas Sanjaya Sept. 20, 2025, 7:47 a.m. UTC
As a side effect of readline fix in previous commit, building host-gdb
fails with undefined reference to ncurses error:

  CXX    init.o
  CXXLD  gdb
/usr/bin/ld: /home/bagas/repo/buildroot/output/host/lib/libreadline.so: undefined reference to `tgoto@NCURSES6_TINFO_5.0.19991023'
/usr/bin/ld: /home/bagas/repo/buildroot/output/host/lib/libreadline.so: undefined reference to `UP@NCURSES6_TINFO_5.0.19991023'
/usr/bin/ld: /home/bagas/repo/buildroot/output/host/lib/libreadline.so: undefined reference to `tgetent@NCURSES6_TINFO_5.0.19991023'
/usr/bin/ld: /home/bagas/repo/buildroot/output/host/lib/libreadline.so: undefined reference to `tgetnum@NCURSES6_TINFO_5.0.19991023'
/usr/bin/ld: /home/bagas/repo/buildroot/output/host/lib/libreadline.so: undefined reference to `PC@NCURSES6_TINFO_5.0.19991023'
/usr/bin/ld: /home/bagas/repo/buildroot/output/host/lib/libreadline.so: undefined reference to `tgetstr@NCURSES6_TINFO_5.0.19991023'
/usr/bin/ld: /home/bagas/repo/buildroot/output/host/lib/libreadline.so: undefined reference to `tgetflag@NCURSES6_TINFO_5.0.19991023'
/usr/bin/ld: /home/bagas/repo/buildroot/output/host/lib/libreadline.so: undefined reference to `BC@NCURSES6_TINFO_5.0.19991023'
/usr/bin/ld: /home/bagas/repo/buildroot/output/host/lib/libreadline.so: undefined reference to `tputs@NCURSES6_TINFO_5.0.19991023'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:2232: gdb] Error 1

Fix above by also building termlib (libtinfo.so.6) so that host-readline
is linked to ncurses from buildroot instead from host distro.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
 package/ncurses/ncurses.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/package/ncurses/ncurses.mk b/package/ncurses/ncurses.mk
index 864f62b57c..a837ac96bf 100644
--- a/package/ncurses/ncurses.mk
+++ b/package/ncurses/ncurses.mk
@@ -162,7 +162,9 @@  HOST_NCURSES_CONF_OPTS = \
 	--without-ada \
 	--with-default-terminfo-dir=/usr/share/terminfo \
 	--disable-db-install \
-	--without-normal
+	--without-normal \
+	--with-termlib \
+	--disable-widec
 
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))