[Buildroot] [PATCH 02/19] Make all package using gettext rely on BR2_NEEDS_GETTEXT

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Fri May 21 22:11:49 UTC 2010


On Fri, 21 May 2010 21:56:05 +0200
Peter Korsgaard <jacmet at uclibc.org> wrote:

> I unfortunately now get the following error when building with an
> internal toolchain and locales NOT enabled:
> 
> checking libintl.h usability... no
> checking libintl.h presence... no
> checking for libintl.h... no
> configure: error: 
> *** You must have either have gettext support in your C library, or
> use the *** GNU gettext library.
> (http://www.gnu.org/software/gettext/gettext.html
> 
> make: *** [/tmp/br/build/libglib2-2.22.5/.stamp_configured] Error 1
> 
> Seems like we need to make libglib2 depend on locale support?

I can reproduce the same problem (strange because I thought I tested
this case, but anyway).

So we have two cases :

 * Packages like Avahi. They understand --disable-nls and therefore
   when locale support is not enabled, they don't need gettext.

 * Packages like libglib2. They don't understand --disable-nls, so even
   when locale is not enabled, they need gettext. libglib2 builds
   fine in the previous situation, where BR2_NEEDS_GETTEXT was set
   to yes as soon as an uClibc toolchain was used (regardless of
   whether BR2_ENABLE_LOCALE is set or not). So it is possible to build
   libglib2 with a !BR2_ENABLE_LOCALE toolchain, but it requires
   gettext to be built.

So either we decide that packages such as libglib2 do require
BR2_ENABLE_LOCALE, or we need to find some smarter way.

In general, this locale/gettext/libintl/libiconv thing still isn't 100%
clear to me. Why is iconv selected only when !BR2_ENABLE_LOCALE ? Does
gettext works when the toolchain doesn't support locales ? What is the
exact role of all these components ?

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com



More information about the buildroot mailing list