incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Black <abl...@roguewave.com>
Subject Re: [PATCH] Windows infrastructure for generating VisualStudio projects and solution(s)
Date Wed, 16 Aug 2006 16:33:49 GMT
Greetings Farid

My suspicion is that they are supposed to be exported.  My understanding 
is that those variables tell the locale and localedef utilities exactly 
what language they are dealing with.
On my machine, it appears that the pair of variables are auto-exported 
to the child processes, and I have observed similar behavior to what you 
observed after explicitly exporting the variables to the child processes.

I have done a little digging, and it seems to me that the issue 
originates in the LC_COLLATE section of the out.1 file.  Either the 
logic to fill the section is incorrect, or the logic to parse the 
section is incorrect.

Attached is a patch containing changes I made to the run_locale_utils.sh 
script that I made while trying to track down why I was seeing test 
failures building locales.  This also incorporates your observations on 
the missed exports.  If it is to be committed, a changelog entry follows.

--Andrew Black

Log
	* run_locale_utils.sh (generate_locale): Redirect stderr from localedef 
utility to $dbgout
	  (test_locale): Export LC_ALL and LANG
	  echo all export directives and values to debug output

Farid Zaripov wrote:
>   When I ported the run_locale_utils.sh script to Windows I seen the
> following lines:
> 
> run_locale_utils.sh, line 244:
>     # set necessary environment variables
>     LC_ALL=$3
>     LANG=$3
> 
>   This lines modify the environment variables for run_locale_utils.sh
> process, but not exported to the locale and localedef processes when
> that processes are created. When I added the following lines:
> 
> -----------
>     export LC_ALL
>     export LANG
> -----------
> 
> I got the following output:
> 
> ./ru_RU.KIO8-R.sh -d
> ./localedef -w -c -f /usr/src/WorkingCopy/etc/nls/charmaps/KOI8-R -I
> /usr/src/WorkingCopy/etc/nls/src/ru_RU /tmp/locale.14561/ru_RU.KOI8- R
> 2>/dev/null
> ./locale -ck -h LC_ALL > /tmp/locale.14561/out.1
> 
> ./localedef -w -c -f /usr/src/WorkingCopy/etc/nls/charmaps/KOI8-R -I
> /tmp/locale.14561/out.1 /tmp/locale.14561/ru_RU.KOI8-R 2>/dev/null
> Error - localedef returned code: 4
> ./locale -ck -h LC_ALL > /tmp/locale.14561/out.2
> ./localedef -w -c -f /usr/src/WorkingCopy/etc/nls/charmaps/KOI8-R -I
> /tmp/locale.14561/out.2 /tmp/locale.14561/ru_RU.KOI8-R 2>/dev/null
> Error - localedef returned code: 4
> ./locale -ck -h LC_ALL > /tmp/locale.14561/out.3
> # +-----------------------+--------+--------+--------+
> # | DIAGNOSTIC            | ACTIVE |  TOTAL |INACTIVE|
> # +-----------------------+--------+--------+--------+
> # | (S7) ASSERTION        |      2 |      7 |    71% |
> # +-----------------------+--------+--------+--------+
> 
> ## Assertions = 7
> ## FailedAssertions = 2
> 
> 
>   The error message from localedef calls:
> Error 399: decimal value in the range [0, 255) expected: \d384
> 
>   The question is: should be LANG and LC_ALL variables exported or not?
> 
> Farid.

Mime
View raw message