United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6681798 : (build) CharsetEncoder.java fails to compile in openjdk6 on ubuntu 8.04

Details
Type:
Bug
Submit Date:
2008-03-29
Status:
Closed
Updated Date:
2011-05-18
Project Name:
JDK
Resolved Date:
2011-05-18
Component:
core-libs
OS:
linux_2.6
Sub-Component:
java.nio
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
OpenJDK6
Fixed Versions:

Related Reports
Backport:
Relates:

Sub Tasks

Description
In compiling openjdk6 on ubuntu 8.04 it fails while compiling CharsetEncoder.java.
Compiling the same source on ubuntu 7.10 does not fail.  I asked an Ubuntu contact
about this and he claims it has to do with quoting problems in the spp.sh shell script
and referenced this icedtea patch

http://icedtea.classpath.org/hg/icedtea6/file/9bf416fd51f8/patches/icedtea-generated.patch

That changes SPP_CMD to use /bin/bash which probably is not a good solution.

What occurs is CharsetEncoder.java is generated using a shell/sed/awk script from a
different source file.  It uses tags like $replType$ which get replaced with various
strings encoded in the script.  What happens is in the generated source file the
$replType$ tag is not replaced and the compiler barfs with a syntax error.

                                    

Comments
EVALUATION

This appears to be an issue with dash (on Ubuntu sh is linked to dash). All is okay with dash 0.5.3-1 but with dash 0.5.4-8 (the version with Hardy Herron/8.04) it seems that square brackets used in a sed script aren't passed through correctly to sed. This impacts the generation of code that involves the replacement of tokens with "byte[]". All is okay if sh is linked to bash.
                                     
2008-04-01
WORK AROUND

A possible workaround is to change the symbolic link for /bin/sh which, by default, points to 'dash'.  One way to do this is with:  sudo dpkg-reconfigure dash

And answer "no"
                                     
2008-06-02
EVALUATION

Also see: https://bugs.launchpad.net/ubuntu/+source/dash/+bug/61463
                                     
2008-06-02
EVALUATION

replace spp.sh with a java regex based version.
                                     
2008-06-19



Hardware and Software, Engineered to Work Together