Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/lshw: fix the build with glibc without NLS
Date: Thu, 13 Jul 2017 23:28:13 +0200	[thread overview]
Message-ID: <20170713232813.4fd0c83e@windsurf> (raw)
In-Reply-To: <20170713210424.18934-1-romain.naour@gmail.com>

Hello,

On Thu, 13 Jul 2017 23:04:24 +0200, Romain Naour wrote:
> Since [1], NONLS is added to LSHW_CFLAGS even for glibc based toolchain.
> Previously it was not the case since BR2_ENABLE_LOCALE is always
> selected for glibc based toolchain.
> 
> With NONLS, config.h try to redefine two Intl function (textdomain and
> bindtextdomain) that are used by glibc internally.
> 
> This break the build with the following error:
> sysroot/usr/include/libintl.h:82:52: error: expected unqualified-id before 'throw'
>  extern char *textdomain (const char *__domainname) __THROW;
> 
> Fixes:
> http://autobuild.buildroot.net/results/9bf/9bf5437b4348ea8077013b80a51ce05fa328247d
> 
> [1] 3acd9f845de0489071719d52d774aab48d7f9c33
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>

I also had a look at this issue, and I'm not sure this is the most
appropriate fix.

Indeed, the NONLS mode is really for cases where the C library does not
provide *any* gettext implementation, as would be the case with uClibc
without intl stubs enabled.

But in the context of Buildroot, all C libraries provide a gettext
implementation. It might be full-featured or minimal, but it always
exists.

Therefore, I believe the appropriate fix is to in fact never pass
-DNONLS, because we are never in a situation where we don't have any
NLS support at all. So I believe the right fix is to remove the
following three lines:

ifeq ($(BR2_SYSTEM_ENABLE_NLS),)
LSHW_CFLAGS += -DNONLS
endif

Best regards,

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

  reply	other threads:[~2017-07-13 21:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-13 21:04 [Buildroot] [PATCH] package/lshw: fix the build with glibc without NLS Romain Naour
2017-07-13 21:28 ` Thomas Petazzoni [this message]
2017-07-13 22:10   ` Romain Naour
2017-07-14 19:40     ` 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=20170713232813.4fd0c83e@windsurf \
    --to=thomas.petazzoni@free-electrons.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox