All of lore.kernel.org
 help / color / mirror / Atom feed
* building recipe with buildtools, causes sanity error: Your system needs to support the en_US.UTF-8 locale.
@ 2018-04-24 18:04 John Smith
  2018-04-25  7:41 ` Uwe Geuder
  2018-04-25 10:48 ` Burton, Ross
  0 siblings, 2 replies; 6+ messages in thread
From: John Smith @ 2018-04-24 18:04 UTC (permalink / raw)
  To: yocto

bitbake stops with this error message: "Your system needs to support the en_US.UTF-8 locale."

export LC_ALL=en_US.UTF-8 has no effect. Do you know how to fix that error?

What I ve done:
- installed buildtools from http://downloads.yoctoproject.org/releases/yocto/yocto-2.4.2/buildtools/
  under /opt/poky/2.4.2

> cd poky
> . oe-init-build-env
> . /opt/poky/2.4.2/environment-setup-x86_64-pokysdk-linux
> bitbake <ANY RECIPE>



https://git.yoctoproject.org/cgit.cgi/poky/plain/meta/classes/sanity.bbclass
def sanity_check_locale(d):
    """
    Currently bitbake switches locale to en_US.UTF-8 so check that this locale actually exists.
    """
    import locale
    try:
        locale.setlocale(locale.LC_ALL, "en_US.UTF-8")
    except locale.Error:
        raise_sanity_error("Your system needs to support the en_US.UTF-8 locale.", d)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: building recipe with buildtools, causes sanity error: Your system needs to support the en_US.UTF-8 locale.
  2018-04-24 18:04 building recipe with buildtools, causes sanity error: Your system needs to support the en_US.UTF-8 locale John Smith
@ 2018-04-25  7:41 ` Uwe Geuder
  2018-04-25 10:27   ` Uwe Geuder
  2018-04-25 10:48 ` Burton, Ross
  1 sibling, 1 reply; 6+ messages in thread
From: Uwe Geuder @ 2018-04-25  7:41 UTC (permalink / raw)
  To: yocto

On Tue, Apr 24, 2018 at 9:04 PM, John Smith <john-s-84@gmx.net>:
> bitbake stops with this error message: "Your system needs to support the en_US.UTF-8 locale."
>
> export LC_ALL=en_US.UTF-8 has no effect. Do you know how to fix that
> error?

Use "locale -a" to show what locales your system supports at the
moment. It appears that en_US.UTF-8 is not on the list.

Installing/building additional locales is distro specific and out of
scope for this list. Please use your favorite search engine to find out
how to do it for your distro or ask in your friendly distro support forum
if necessary.

Exporting the environment variable just tells other programs what to
use. It does not help to tell them to use something that is not
installed. For bitbake you don't have to tell it anything, it insists on
using en_US.UTF-8 anyway as the error message shows.

Bitbake uses Python. To make things more confusing the locales in Python
are not necessarily named the same way as in your underlying distro and
there can be aliases.

In the end this code needs to run without returning an error

$ python
>>> import locale
>>> locale.setlocale(locale.LC_ALL, "en_US.UTF-8")
'en_US.UTF-8'

E.g. in Ubuntu the locale is listed by "locale -a" as en_US.utf8 but that
works fine.

Regards,

Uwe Geuder
Neuro Event Labs Oy
Tampere, Finland
uwe.gexder at neuroeventlabs.com (Bot check: fix one obvious typo)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: building recipe with buildtools, causes sanity error: Your system needs to support the en_US.UTF-8 locale.
  2018-04-25  7:41 ` Uwe Geuder
@ 2018-04-25 10:27   ` Uwe Geuder
  0 siblings, 0 replies; 6+ messages in thread
From: Uwe Geuder @ 2018-04-25 10:27 UTC (permalink / raw)
  To: yocto

Correcting myself...

On Wed, Apr 25, 2018 at 10:41 AM, Uwe Geuder <jrswdnan22@snkmail.com> wrote:
[...]
>
> Bitbake uses Python. To make things more confusing the locales in Python
> are not necessarily named the same way as in your underlying distro and
> there can be aliases.
>
> In the end this code needs to run without returning an error
>
> $ python
> >>> import locale
> >>> locale.setlocale(locale.LC_ALL, "en_US.UTF-8")
> 'en_US.UTF-8'
>

The command should have been python3.

Should not make a difference here, but that's what we have said before...

Regards,

Uwe Geuder
Neuro Event Labs Oy
Tampere, Finland
uwe.gexder at neuroeventlabs.com (Bot check: fix one obvious typo)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: building recipe with buildtools, causes sanity error: Your system needs to support the en_US.UTF-8 locale.
  2018-04-24 18:04 building recipe with buildtools, causes sanity error: Your system needs to support the en_US.UTF-8 locale John Smith
  2018-04-25  7:41 ` Uwe Geuder
@ 2018-04-25 10:48 ` Burton, Ross
  2018-04-25 12:18   ` Uwe Geuder
  1 sibling, 1 reply; 6+ messages in thread
From: Burton, Ross @ 2018-04-25 10:48 UTC (permalink / raw)
  To: John Smith; +Cc: Yocto-mailing-list

So my hunch is that you've a modern system with glibc 2.27 on the
host, so that old buildtools won't work.  Try this buildtools:

http://downloads.yoctoproject.org/releases/yocto/milestones/yocto-2.5_M3/buildtools/

Ross

On 24 April 2018 at 19:04, John Smith <john-s-84@gmx.net> wrote:
> bitbake stops with this error message: "Your system needs to support the en_US.UTF-8 locale."
>
> export LC_ALL=en_US.UTF-8 has no effect. Do you know how to fix that error?
>
> What I ve done:
> - installed buildtools from http://downloads.yoctoproject.org/releases/yocto/yocto-2.4.2/buildtools/
>   under /opt/poky/2.4.2
>
>> cd poky
>> . oe-init-build-env
>> . /opt/poky/2.4.2/environment-setup-x86_64-pokysdk-linux
>> bitbake <ANY RECIPE>
>
>
>
> https://git.yoctoproject.org/cgit.cgi/poky/plain/meta/classes/sanity.bbclass
> def sanity_check_locale(d):
>     """
>     Currently bitbake switches locale to en_US.UTF-8 so check that this locale actually exists.
>     """
>     import locale
>     try:
>         locale.setlocale(locale.LC_ALL, "en_US.UTF-8")
>     except locale.Error:
>         raise_sanity_error("Your system needs to support the en_US.UTF-8 locale.", d)
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: building recipe with buildtools, causes sanity error: Your system needs to support the en_US.UTF-8 locale.
  2018-04-25 10:48 ` Burton, Ross
@ 2018-04-25 12:18   ` Uwe Geuder
  2018-04-25 12:22     ` Burton, Ross
  0 siblings, 1 reply; 6+ messages in thread
From: Uwe Geuder @ 2018-04-25 12:18 UTC (permalink / raw)
  To: Yocto-mailing-list

On Wed, Apr 25, 2018 at 1:48 PM, Burton, Ross <ross.burton@intel.com> wrote:
> So my hunch is that you've a modern system with glibc 2.27 on the
> host, so that old buildtools won't work.  Try this buildtools:
>
> http://downloads.yoctoproject.org/releases/yocto/milestones/yocto-2.5_M3/buildtools/

Ah, buildtools come with their own locale. 

So my previous message was probably not applicable for users of
buildtools. Sorry about the noise!

Regards,

Uwe Geuder
Neuro Event Labs Oy
Tampere, Finland
uwe.gexder at neuroeventlabs.com (Bot check: fix one obvious typo)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: building recipe with buildtools, causes sanity error: Your system needs to support the en_US.UTF-8 locale.
  2018-04-25 12:18   ` Uwe Geuder
@ 2018-04-25 12:22     ` Burton, Ross
  0 siblings, 0 replies; 6+ messages in thread
From: Burton, Ross @ 2018-04-25 12:22 UTC (permalink / raw)
  To: Uwe Geuder; +Cc: Yocto-mailing-list

On 25 April 2018 at 13:18, Uwe Geuder <jrswdnan22@snkmail.com> wrote:
> On Wed, Apr 25, 2018 at 1:48 PM, Burton, Ross <ross.burton@intel.com> wrote:
>> So my hunch is that you've a modern system with glibc 2.27 on the
>> host, so that old buildtools won't work.  Try this buildtools:
>>
>> http://downloads.yoctoproject.org/releases/yocto/milestones/yocto-2.5_M3/buildtools/
>
> Ah, buildtools come with their own locale.
>
> So my previous message was probably not applicable for users of
> buildtools. Sorry about the noise!

Well, it's more complicated than that.

The old buildtools (including 2.4.2 because we haven't released a
2.4.3 with the fixes yet) did a fairly evil but we hoped safe thing to
save space by using the *host* locales even though the buildtools
ships its own glibc.  This was fine for a few years, until glibc 2.27
changed the locale format.

So now, you're using our glibc which is trying to read the host
locales, and failing.  The new buildtools ship their own locales to
avoid this problem, which is why I suggested trying the 2.5M3
buildtools, and we should get around to releasing 2.4.3 which will
also have this fixed.

Ross


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-04-25 12:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-24 18:04 building recipe with buildtools, causes sanity error: Your system needs to support the en_US.UTF-8 locale John Smith
2018-04-25  7:41 ` Uwe Geuder
2018-04-25 10:27   ` Uwe Geuder
2018-04-25 10:48 ` Burton, Ross
2018-04-25 12:18   ` Uwe Geuder
2018-04-25 12:22     ` Burton, Ross

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.