Hadoop Common
  1. Hadoop Common
  2. HADOOP-6175

Incorret version compilation with es_ES.ISO8859-15 locale on Solaris 10

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.20.0
    • Fix Version/s: 0.21.0
    • Component/s: build
    • Labels:
      None
    • 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

    • Hadoop Flags:
      Reviewed

      Description

      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

      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).
      

      Here's an example about date on Solaris

      $ 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

      So the saveVersion.sh script creates the package-info.java file as

      /*
       * 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;
      

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

      $ hadoop version
      Hadoop Unknown
      Subversion Unknown -r Unknown
      Compiled by Unknown on Unknown

      To solve this issue is as simple as adding

      unset LC_TIME

      to saveVersion.sh script, and the output is as C locale as

      /*
       * 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;
      
      1. HADOOP-6175.patch
        0.3 kB
        Urko Benito

        Activity

          People

          • Assignee:
            Urko Benito
            Reporter:
            Urko Benito
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 5m
              5m
              Remaining:
              Remaining Estimate - 5m
              5m
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development