Re: [Buildroot] [PATCH 1/1] package/readline: propagate CONF_OPTS to host build

Thomas Petazzoni via buildroot <[email protected]>
Newsgroups net.busybox.buildroot
Message-ID <aoyvkaV1_UeTRjrl@windsurf>
On Sun, Jul 19, 2026 at 03:16:04AM +0000, Ronan Loftus wrote:
> --with-shared-termcap-library is only applied to the target readline
> because CONF_OPTS is not inherited by the host variant. The resulting
> host libreadline.so.8 has no DT_NEEDED on ncurses/tinfo, leaving
> termcap symbols (UP, BC, tgetent, ...) unresolved.
> 
> With recent binutils (--no-copy-dt-needed-entries), any process
> loading this libreadline via LD_LIBRARY_PATH fails at startup. This
> breaks fakeroot-based rootfs generation when host-gdb (which pulls
> host-readline) is selected:
> 
>   /bin/sh: symbol lookup error: .../host/lib/libreadline.so.8:
>   undefined symbol: UP
> 
> Reproduced on Arch Linux (gcc 16.1.1, binutils 2.46.1).

Could you provide some detailed reproduction instructions? I did a
build of host-gdb in an Arch Linux container, and the resulting gdb
binary runs just fine... apparently because it is itself directly
linked with libncurses.

> diff --git a/package/readline/readline.mk b/package/readline/readline.mk
> index f69cbe45..8c49fab8 100644
> --- a/package/readline/readline.mk
> +++ b/package/readline/readline.mk
> @@ -15,6 +15,7 @@ READLINE_CONF_OPTS = \
>  	--disable-install-examples \
>  	--with-curses \
>  	--with-shared-termcap-library
> +HOST_READLINE_CONF_OPTS = $(READLINE_CONF_OPTS)

We don't want to do that, we really want a separate
HOST_READLINE_CONF_OPTS, even if today it will carry the same value as
READLINE_CONF_OPTS. There is in general no reason for the host and
target variants of a package to share the same configuration options.

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.