[Buildroot] [PATCH 1/1] ncurses: generate libtermcap

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Mon Nov 30 22:30:49 UTC 2015


Dear Pascal Mazon,

On Fri, 24 Apr 2015 14:54:26 +0200, Pascal Mazon wrote:
> There is no libtermcap package in buildroot, but ncurses implements termcap
> natively. Furthermore, ncurses already provides the termcap.h header file.
> 
> With this patch, we fix an issue encountered with some external toolchains
> that include a libtermcap.a (typically the GNU libtermcap version) in their
> sysroot folder.
> Bash, for instance, would be linking with this libtermcap while using
> headers from ncurses.
> 
> In order to be consistent, let's make sure there is only the ncurses'
> termcap library. To that effect, we:
> - remove any libtermcap.* in the staging dir,
> - install a link to libncurses static and/or shared in staging and target
>   dirs.
> 
> Signed-off-by: Pascal Mazon <pascal.mazon at 6wind.com>

We finally took a bit of time on IRC today to discuss your patch. From
our point of view, the fact that your toolchain provides libtermcap.a
is a bug of the toolchain. From Buildroot's point of view, a toolchain
should not provide in its sysroot anything but the C library and its
headers, and the kernel headers.

If we start doing hacks in packages to cope with toolchain sysroot
already shipped with some libraries, it's going to be an endless fight
against those toolchains. You have the problem with libtermcap.a, but
the next person will have it with libz.a, and then lib<something>, and
again.

Our suggestion is that you fix your toolchain either by asking your
toolchain vendor, or by doing a quick hack to remove libtermcap.a
before using the toolchain with Buildroot. If you add this toolchain as
a known Buildroot profile, you can even automate this and make it part
of the build process.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


More information about the buildroot mailing list