<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>9775</bug_id>
          
          <creation_ts>2016-06-15 03:51:53 +0000</creation_ts>
          <short_desc>buildtools results in broken system locale if LANG is not en_US</short_desc>
          <delta_ts>2016-07-29 15:12:13 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>2.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>2.2 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>jose.perez.carranza</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>62982</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-06-15 03:51:53 +0000</bug_when>
    <thetext>I just set up a new CentOS system, and there I have LANG set to en_NZ.utf8. I need buildtools to have all the right dependencies, so I installed the latest snapshot from the autobuilder (20160614-1). However, when I try to run bitbake within the buildtools environment, it tells me &quot;Please use a locale setting which supports utf-8.&quot;, and indeed if I run python3 and query sys.getfilesystemencoding() it returns &apos;ascii&apos;. However if I instead run LANG=en_US.utf8 python3 and try the same thing I get the expected &apos;utf-8&apos;.

Initially I thought this was something broken in CentOS, but then I tried installing the python 3.4 package from EPEL and running that instead of the python3 from buildtools, and with that I get the correct &apos;utf-8&apos; value with LANG set to my default &quot;en_NZ.utf8&quot;. Do we perhaps need to ship the locale data files for glibc within buildtools as well now?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63572</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-07-01 11:27:03 +0000</bug_when>
    <thetext>Can you see what happens if you leave LANG=en_NZ.utf8 but set LOCPATH=/usr/share/locale, so the buildtool glibc should look at the host locales?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63616</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-07-04 13:14:25 +0000</bug_when>
    <thetext>Looks like LOCPATH isn&apos;t an option.  When LOCPATH isn&apos;t set glibc uses the locale archive (/usr/lib/locale/locale-archive) which is a mmappable binary representation of the locale database.  However when LOCPATH is set it won&apos;t look for a locale archive but will look for expanded /usr/lib/locale/[locale]/[key] files, which on at least Debian and Fedora don&apos;t exist for most locales (Debian only ships those for C.UTF-8).  Instead it is expected that the locale archive is used, and that has a fixed location.

I wonder if it would be possible to patch nativesdk-glibc to use the host&apos;s locale path...  the question here is how stable is the binary locale format?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63672</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-07-06 14:09:27 +0000</bug_when>
    <thetext>Paul, so poky-contrib:ross/sdki18n has a rather special patch for glibc which will mean nativesdk-glibc will look in /usr/ for the locale archive.

Can you build a fresh buildtools with that patch and see if it solves your problem on the Centos machine?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63911</commentid>
    <comment_count>4</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-07-13 05:17:52 +0000</bug_when>
    <thetext>I tested a build with the top commit on ross/sdki18n and that does indeed seem to have fixed the issue - and FWIW I build the buildtools tarball on my Fedora 23 machine and then ran it on CentOS 7, so that may indicate that compatibility isn&apos;t going to be too much of an issue either.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63990</commentid>
    <comment_count>5</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-07-14 16:37:54 +0000</bug_when>
    <thetext>Thanks Paul!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64229</commentid>
    <comment_count>6</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-07-20 13:44:29 +0000</bug_when>
    <thetext>Fixed in oe-core 75321b6b0f2c0ac667b9350b387b01a188e195c8.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64655</commentid>
    <comment_count>7</comment_count>
    <who name="Jose Perez C">jose.perez.carranza</who>
    <bug_when>2016-07-29 15:12:13 +0000</bug_when>
    <thetext>Verified that cworks as per Comment 4</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>