| Message ID | 20250920074707.584930-6-bagasdotme@gmail.com |
|---|---|
| State | Handled Elsewhere |
| Headers | show |
| Series | [1/2] package/readline: Fix sdk rootfs tarball generation | expand |
Hello, Thanks for your patch! On Sat, 20 Sep 2025 14:47:10 +0700 Bagas Sanjaya <bagasdotme@gmail.com> wrote: > 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 Since host-gdb builds fine for most people, there must be something specific to your environment. Could you provide the details of your host distribution + the exact Buildroot version + minimal Buildroot defconfig that exhibits the issue so that people can reproduce ? To be honest, I don't pretend to fully grasp the interactions between readline, ncurses, termlib, etc. So if you want patches to be merged, they need to come with detailed and convincing explanations :-) Thanks a lot! Thomas
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))
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(-)