Message ID | 20180426190845.21415-1-arnout@mind.be |
---|---|
State | Superseded |
Headers | show |
Series | package/ncurses: enable widechar for host build | expand |
Hi, Arnout: I suggest you to adjust your patch from HOST_NCURSES_CONF_OPTS = \ --with-shared \ --without-gpm \ --without-manpages \ --without-cxx \ --without-cxx-binding \ --without-ada \ --enable-widec \ --without-normal to HOST_NCURSES_CONF_OPTS = \ --enable-widec \ --with-shared \ --without-gpm \ --without-manpages \ --without-cxx \ --without-cxx-binding \ --without-ada \ --without-normal just for more cleanly. Thanks. Scott Fan On Fri, Apr 27, 2018 at 3:08 AM Arnout Vandecappelle (Essensium/Mind) < arnout@mind.be> wrote: > Kconfig uses pkg-config to find the ncurses or ncursesw library. If the > ncursesw package is found with pkg-config, it will #include <ncursesw.h>. > Since Buildroot's host-ncurses doesn't install a .pc file, and linux.mk > anyway doesn't pass the pkg-config options to find the host pkg-config > files, Kconfig will always find the system's ncursesw.h. > > However, since commit dde090c299 (linux: fix passing of host CFLAGS and > LDFLAGS) HOST_LDFLAGS is passed to the linux build system. Thus, if > host-ncurses was already built before 'make linux-menuconfig' is called, > the build will pick up libncurses from the host directory, which is NOT > widechar. Thus, two different ncurses configurations are mixed into the > final mconf program. This will result in serious breakage in the > rendering of the menus (lots of @ and question mark characters). > > As a workaround, just build host-ncurses with widechar support. That > makes it compatible with ncursesw.h picked up from the host. Clearly, > this is not a robust solution. But it's simple, it works, and it > shouldn't hurt to build host-ncurses with widechar support (we can > safely assume that the system doesn't have a non-widechare uClibc > library...). > > Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> > Cc: David De Grave <david.degrave@essensium.com> > --- > package/ncurses/ncurses.mk | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/package/ncurses/ncurses.mk b/package/ncurses/ncurses.mk > index 90cf4a4dc5..9942d3f0bd 100644 > --- a/package/ncurses/ncurses.mk > +++ b/package/ncurses/ncurses.mk > @@ -153,6 +153,7 @@ HOST_NCURSES_CONF_OPTS = \ > --without-cxx \ > --without-cxx-binding \ > --without-ada \ > + --enable-widec \ > --without-normal > > $(eval $(autotools-package)) > -- > 2.17.0 > > _______________________________________________ > buildroot mailing list > buildroot@busybox.net > http://lists.busybox.net/mailman/listinfo/buildroot > <div dir="ltr">Hi, Arnout:<div><br></div><div>I suggest you to adjust your patch from</div><div><br></div><div><div>HOST_NCURSES_CONF_OPTS = \</div><div><span style="white-space:pre"> </span>--with-shared \</div><div><span style="white-space:pre"> </span>--without-gpm \</div><div><span style="white-space:pre"> </span>--without-manpages \</div><div><span style="white-space:pre"> </span>--without-cxx \</div><div><span style="white-space:pre"> </span>--without-cxx-binding \</div><div><span style="white-space:pre"> </span>--without-ada \</div><div><span style="white-space:pre"> </span>--enable-widec \</div><div><span style="white-space:pre"> </span>--without-normal</div><div><br></div><div>to</div><div><br></div><div><div>HOST_NCURSES_CONF_OPTS = \</div><div><span style="white-space:pre"><div style="color:rgb(34,34,34);font-family:sans-serif;font-size:13px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="white-space:pre"> </span>--enable-widec \</div> </span>--with-shared \</div><div><span style="white-space:pre"> </span>--without-gpm \</div><div><span style="white-space:pre"> </span>--without-manpages \</div><div><span style="white-space:pre"> </span>--without-cxx \</div><div><span style="white-space:pre"> </span>--without-cxx-binding \</div><div><span style="white-space:pre"> </span>--without-ada \</div><div><span style="white-space:pre"> </span>--without-normal<br></div></div><div><br></div><div>just for more cleanly.</div><div><br></div><div><br></div><div>Thanks.</div><div><br></div><div><div dir="ltr" class="gmail_signature"><div dir="ltr">Scott Fan<br></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Apr 27, 2018 at 3:08 AM Arnout Vandecappelle (Essensium/Mind) <<a href="mailto:arnout@mind.be">arnout@mind.be</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Kconfig uses pkg-config to find the ncurses or ncursesw library. If the<br> ncursesw package is found with pkg-config, it will #include <ncursesw.h>.<br> Since Buildroot's host-ncurses doesn't install a .pc file, and <a href="http://linux.mk" rel="noreferrer" target="_blank">linux.mk</a><br> anyway doesn't pass the pkg-config options to find the host pkg-config<br> files, Kconfig will always find the system's ncursesw.h.<br> <br> However, since commit dde090c299 (linux: fix passing of host CFLAGS and<br> LDFLAGS) HOST_LDFLAGS is passed to the linux build system. Thus, if<br> host-ncurses was already built before 'make linux-menuconfig' is called,<br> the build will pick up libncurses from the host directory, which is NOT<br> widechar. Thus, two different ncurses configurations are mixed into the<br> final mconf program. This will result in serious breakage in the<br> rendering of the menus (lots of @ and question mark characters).<br> <br> As a workaround, just build host-ncurses with widechar support. That<br> makes it compatible with ncursesw.h picked up from the host. Clearly,<br> this is not a robust solution. But it's simple, it works, and it<br> shouldn't hurt to build host-ncurses with widechar support (we can<br> safely assume that the system doesn't have a non-widechare uClibc<br> library...).<br> <br> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <<a href="mailto:arnout@mind.be" target="_blank">arnout@mind.be</a>><br> Cc: David De Grave <<a href="mailto:david.degrave@essensium.com" target="_blank">david.degrave@essensium.com</a>><br> ---<br> package/ncurses/<a href="http://ncurses.mk" rel="noreferrer" target="_blank">ncurses.mk</a> | 1 +<br> 1 file changed, 1 insertion(+)<br> <br> diff --git a/package/ncurses/<a href="http://ncurses.mk" rel="noreferrer" target="_blank">ncurses.mk</a> b/package/ncurses/<a href="http://ncurses.mk" rel="noreferrer" target="_blank">ncurses.mk</a><br> index 90cf4a4dc5..9942d3f0bd 100644<br> --- a/package/ncurses/<a href="http://ncurses.mk" rel="noreferrer" target="_blank">ncurses.mk</a><br> +++ b/package/ncurses/<a href="http://ncurses.mk" rel="noreferrer" target="_blank">ncurses.mk</a><br> @@ -153,6 +153,7 @@ HOST_NCURSES_CONF_OPTS = \<br> --without-cxx \<br> --without-cxx-binding \<br> --without-ada \<br> + --enable-widec \<br> --without-normal<br> <br> $(eval $(autotools-package))<br> -- <br> 2.17.0<br> <br> _______________________________________________<br> buildroot mailing list<br> <a href="mailto:buildroot@busybox.net" target="_blank">buildroot@busybox.net</a><br> <a href="http://lists.busybox.net/mailman/listinfo/buildroot" rel="noreferrer" target="_blank">http://lists.busybox.net/mailman/listinfo/buildroot</a><br> </blockquote></div>
diff --git a/package/ncurses/ncurses.mk b/package/ncurses/ncurses.mk index 90cf4a4dc5..9942d3f0bd 100644 --- a/package/ncurses/ncurses.mk +++ b/package/ncurses/ncurses.mk @@ -153,6 +153,7 @@ HOST_NCURSES_CONF_OPTS = \ --without-cxx \ --without-cxx-binding \ --without-ada \ + --enable-widec \ --without-normal $(eval $(autotools-package))
Kconfig uses pkg-config to find the ncurses or ncursesw library. If the ncursesw package is found with pkg-config, it will #include <ncursesw.h>. Since Buildroot's host-ncurses doesn't install a .pc file, and linux.mk anyway doesn't pass the pkg-config options to find the host pkg-config files, Kconfig will always find the system's ncursesw.h. However, since commit dde090c299 (linux: fix passing of host CFLAGS and LDFLAGS) HOST_LDFLAGS is passed to the linux build system. Thus, if host-ncurses was already built before 'make linux-menuconfig' is called, the build will pick up libncurses from the host directory, which is NOT widechar. Thus, two different ncurses configurations are mixed into the final mconf program. This will result in serious breakage in the rendering of the menus (lots of @ and question mark characters). As a workaround, just build host-ncurses with widechar support. That makes it compatible with ncursesw.h picked up from the host. Clearly, this is not a robust solution. But it's simple, it works, and it shouldn't hurt to build host-ncurses with widechar support (we can safely assume that the system doesn't have a non-widechare uClibc library...). Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Cc: David De Grave <david.degrave@essensium.com> --- package/ncurses/ncurses.mk | 1 + 1 file changed, 1 insertion(+)