hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Urko Benito (JIRA)" <j...@apache.org>
Subject [jira] Created: (HADOOP-6175) Incorret version compilation with es_ES.ISO8859-15 locale on Solaris 10
Date Mon, 03 Aug 2009 09:23:14 GMT
Incorret version compilation with es_ES.ISO8859-15 locale on Solaris 10
-----------------------------------------------------------------------

                 Key: HADOOP-6175
                 URL: https://issues.apache.org/jira/browse/HADOOP-6175
             Project: Hadoop Common
          Issue Type: Bug
          Components: build
    Affects Versions: 0.20.0
         Environment: SunOS 5.10
Locale:
LC_CTYPE=es_ES.ISO8859-15
LC_NUMERIC=es_ES.ISO8859-15
LC_TIME=es_ES.ISO8859-15
LC_COLLATE=es_ES.ISO8859-15
LC_MONETARY=es_ES.ISO8859-15
LC_MESSAGES=es

            Reporter: Urko Benito


When you compile _hadoop_ on Solaris 10 with locale _es_ES.ISO8859-15_ the _src/saveVersion.sh_
script generates incorrect date on _build/src/org/apache/hadoop/package-info.java_

The ploblem is that the _saveVersion.sh_ script unsets the *LC_CTYPE* to avoid the problem,
but on Solaris the _date_ command uses the *LC_TIME* enviroment variable as you can see at
the _man page_

{noformat}
Specifications of native language translations of month  and
weekday  names  are  supported.  The month and weekday names
used for a language are based on the locale specified by the
environment variable LC_TIME. See environ(5).
{noformat}

Here's an example about *date* on Solaris

{quote}
$ echo $LC_CTYPE
es_ES.ISO8859-15
$ echo $LC_TIME
es_ES.ISO8859-15
$ date
lunes  3 de agosto de 2009 11H10'25" CEST
$ unset LC_TYPE
$ date
lunes  3 de agosto de 2009 11H10'31" CEST
$ unset LC_TIME
$ date
Mon Aug  3 11:10:35 CEST 2009
{quote}

So the _saveVersion.sh_ script creates the _package-info.java_ file as 

{code}
/*
 * Generated by src/saveVersion.sh
 */
@HadoopVersionAnnotation(version="0.20.1-dev", revision="",
                         user="itily", date="lunes  3 de agosto de 2009 11H16'01" CEST", url="http://svn.apache.org/repos/asf/hadoop/common/tags/release-0.20.0")
package org.apache.hadoop;
{code}

And if you run hadoop with _version_ argument it's says "Unknow", here's an example

{quote}
$ hadoop version
Hadoop Unknown
Subversion Unknown -r Unknown
Compiled by Unknown on Unknown
{quote}


To solve this issue is as simple as adding 

*unset LC_TIME*

to _saveVersion.sh_ script, and the output is as _C_ locale as
{code}
/*
 * Generated by src/saveVersion.sh
 */
@HadoopVersionAnnotation(version="0.20.1-dev", revision="",
                         user="itily", date="Mon Aug  3 11:19:41 CEST 2009", url="http://svn.apache.org/repos/asf/hadoop/common/tags/release-0.20.0")
package org.apache.hadoop;
{code}




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message