All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Zacarias <gustavo@zacarias.com.ar>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] package/powertop: needs ncursesw
Date: Tue, 31 Mar 2015 20:03:43 -0300	[thread overview]
Message-ID: <551B27CF.9050402@zacarias.com.ar> (raw)
In-Reply-To: <XnsA46AB9F2F3F85berndkuhlsPkbjNfxxIA@bernd-kuhls.de>

On 03/27/2015 02:16 PM, Bernd Kuhls wrote:

> Hi,
> 
> powertop is a weird piece of code;)
> 
> Using this defconfig
> 
> BR2_TOOLCHAIN_BUILDROOT_CXX=y
> BR2_PACKAGE_POWERTOP=y
> 
> 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 
> additions.

Hi.
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:

$(if $(BR2_PACKAGE_NCURSES_WCHAR),y)
POWERTOP_CONF_ENV += ac_cv_search_delwin="-lncursesw"
else
POWERTOP_CONF_ENV += ac_cv_search_delwin="-lncurses"
fi

(or in a single if if you're so inclined).

Regards.

  reply	other threads:[~2015-03-31 23:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-27 16:01 [Buildroot] [PATCH 1/2] package/powertop: needs ncursesw Bernd Kuhls
2015-03-27 16:01 ` [Buildroot] [PATCH 2/2] package/powertop: depends on c++ Bernd Kuhls
2015-03-31 23:06   ` Gustavo Zacarias
2015-04-01 22:07   ` Thomas Petazzoni
2015-03-27 16:34 ` [Buildroot] [PATCH 1/2] package/powertop: needs ncursesw Thomas Petazzoni
2015-03-27 17:16   ` Bernd Kuhls
2015-03-31 23:03     ` Gustavo Zacarias [this message]
2015-04-01 22:07 ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=551B27CF.9050402@zacarias.com.ar \
    --to=gustavo@zacarias.com.ar \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.