<?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>6797</bug_id>
          
          <creation_ts>2014-10-03 17:26:13 +0000</creation_ts>
          <short_desc>eglibc-use-option-groups.patch breaks locale tests</short_desc>
          <delta_ts>2015-03-10 22:22:36 +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>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.7.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joseph Myers">joseph</reporter>
          <assigned_to name="Juro Bystricky">juro.bystricky</assigned_to>
          <cc>juro.bystricky</cc>
    
    <cc>mark.hatle</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>Regression (Used to work)</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>46094</commentid>
    <comment_count>0</comment_count>
    <who name="Joseph Myers">joseph</who>
    <bug_when>2014-10-03 17:26:13 +0000</bug_when>
    <thetext>eglibc-use-option-groups.patch contains changes to localedata/Makefile that break all glibc tests using locales.  gen-locale.sh takes three separate arguments describing how to run the newly built localedef binary (where environment settings then get inserted by gen-locale.sh between those arguments), followed by another argument; the patch changes this to pass a single argument, which simply doesn&apos;t work, means the locales don&apos;t get built successfully and all glibc tests using locales fail.

The glibc replacement for cross-localedef is to run localedef from a newly built glibc built for the build system, so any replacement for use of $(cross-localedef) here would logically have the user passing arguments describing how to run that localedef for the build system with its corresponding newly built glibc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46866</commentid>
    <comment_count>1</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2014-11-07 17:41:34 +0000</bug_when>
    <thetext>It is possible to avoid the problem by removing the offending changes, the patch lines from eglibc-use-option-groups.patch:

@@ -143,9 +161,13 @@
 $(addprefix $(objpfx),$(CTYPE_FILES)): %: \
   gen-locale.sh $(common-objpfx)locale/localedef Makefile \
   $(addprefix charmaps/,$(CHARMAPS)) $(addprefix locales/,$(LOCALE_SRCS))
-	@$(SHELL) gen-locale.sh $(common-objpfx) \
-		  &apos;$(built-program-cmd-before-env)&apos; &apos;$(run-program-env)&apos; \
-		  &apos;$(built-program-cmd-after-env)&apos; $@; \
+	@$(SHELL) gen-locale.sh $(common-objpfx)	\
+		 &apos;$(if $(cross-localedef), 		\
+		       $(cross-localedef),		\
+		       $(built-program-cmd-before-env)  \
+		       $(run-program-env)		\
+		       $(built-program-cmd-after-env))&apos; \
+		       $@; \
 	$(evaluate-test)

This will work fine and the locales will be built properly. 
However, building locales this way will fail on systems with 64MB or less: for example 
in my glibc tests it failed on qemuarm with 64MB or less.
I believe the purpose of using cross-localedef is to build locales on systems with 
small memory footprint.

Fixing this bug properly depends on whether building the new locales is a glibc test 
in its own write or the newly built locales are simply a prerequisite for subsequent 
glibc tests using locales.
If they are just a prerequisite, than the fix may require using cross-localedef 
with a new patch for eglibc-use-option-groups.patch (and possibly gen-locale.sh).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47214</commentid>
    <comment_count>2</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2014-11-26 18:53:44 +0000</bug_when>
    <thetext>Posted a patch to openembedded-core for a review.
Removed patching of Makefile to use cross-localedef, keep the original
Makefile locale generation using the newly built glibc. This works fine,
all locale dependent glibc tests seem to be happy. This will most likely fail on 
systems with 64M or less. If this becomes an issue, the patch can be revisited.

https://www.mail-archive.com/openembedded-core%40lists.openembedded.org/msg58903.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49358</commentid>
    <comment_count>3</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2015-03-10 22:22:36 +0000</bug_when>
    <thetext>Merged, commit
c453597d44a1a2301f4be7bf7a0853ea12eb448c</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>