Bug 6797 - eglibc-use-option-groups.patch breaks locale tests
Summary: eglibc-use-option-groups.patch breaks locale tests
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.7.2
Assignee: Juro Bystricky
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-10-03 17:26 UTC by Joseph Myers
Modified: 2015-03-10 22:22 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: Regression (Used to work)
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Myers 2014-10-03 17:26:13 UTC
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't work, means the locales don'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.
Comment 1 Juro Bystricky 2014-11-07 17:41:34 UTC
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) \
-		  '$(built-program-cmd-before-env)' '$(run-program-env)' \
-		  '$(built-program-cmd-after-env)' $@; \
+	@$(SHELL) gen-locale.sh $(common-objpfx)	\
+		 '$(if $(cross-localedef), 		\
+		       $(cross-localedef),		\
+		       $(built-program-cmd-before-env)  \
+		       $(run-program-env)		\
+		       $(built-program-cmd-after-env))' \
+		       $@; \
 	$(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).
Comment 2 Juro Bystricky 2014-11-26 18:53:44 UTC
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
Comment 3 Juro Bystricky 2015-03-10 22:22:36 UTC
Merged, commit
c453597d44a1a2301f4be7bf7a0853ea12eb448c