[Buildroot] [PATCH 1/2] package/powertop: needs ncursesw
gustavo at zacarias.com.ar
Tue Mar 31 23:03:43 UTC 2015
On 03/27/2015 02:16 PM, Bernd Kuhls wrote:
> powertop is a weird piece of code;)
> Using this defconfig
> configure works
> checking for NCURSES... no
> checking for library containing delwin... -lncurses
> but then this happens:
> lib.cpp: In function 'void align_string(char*, size_t, size_t)':
> lib.cpp:271:59: error: 'mbsrtowcs' was not declared in this scope
> sz = mbsrtowcs(NULL, (const char **)&buffer, max_sz, NULL);
> Afaics mbsrtowcs() is a function which is only available with a wchar-enabled
> toolchain, so my patch does the right thing, but the description needs some
Actually mb* and wc* usage is a pointer towards wchar, yes.
But in ncurses-land there's no need for ncursesw since powertop doesn't
use any of the wide (*_wch) variant functions.
Hence it just sucks at finding libncurses: you can drop the
NCURSES_WCHAR select and do something like:
POWERTOP_CONF_ENV += ac_cv_search_delwin="-lncursesw"
POWERTOP_CONF_ENV += ac_cv_search_delwin="-lncurses"
(or in a single if if you're so inclined).
More information about the buildroot