[kaffe] KJC bug preventing Ant 1.6.0 bootstrap
Dalibor Topic
robilad@kaffe.org
Sat Jan 3 03:11:02 2004
This is a multi-part message in MIME format.
--------------070505050106010702050901
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Hi Ito, salut Guilhem,
I've tried to update kaffe-extras to 1.1.3 and ant 1.6.0, and after
spending some time revisiting the ant bootstrap script, I failed due to
what seems to be a compiler bug in kjc.
With the attached patched applied to kaffe-extras CVS HEAD and the file
ant-kaffe-1.1.3.diff in patches/, I get:
bash-2.05a$ build.sh -Dbuild.compiler=kjc
... Bootstrapping Ant Distribution
... Compiling Ant Classes
src/main/org/apache/tools/ant/taskdefs/Execute.java:123: error:Catch
block is unreachable [JLS 14.20]
... Failed compiling Ant classes !
With Execute.java :
112 /**
113 * Builds a command launcher for the OS and JVM we are
running under
114 */
115 static {
116 // Try using a JDK 1.3 launcher
117 try {
118 if (Os.isFamily("openvms")) {
119 vmLauncher = new VmsCommandLauncher();
120 } else if (!Os.isFamily("os/2")) {
121 vmLauncher = new Java13CommandLauncher();
122 }
123 } catch (NoSuchMethodException exc) {
124 // Ignore and keep trying
125 }
and VmsCommandLauncher:
1113 /**
1114 * A command launcher for VMS that writes the command to a
temporary DCL
1115 * script before launching commands. This is due to
limitations of both
1116 * the DCL interpreter and the Java VM implementation.
1117 */
1118 private static class VmsCommandLauncher extends
Java13CommandLauncher {
1119
1120 public VmsCommandLauncher() throws NoSuchMethodException {
1121 super();
1122 }
so it can actually throw NoSuchMethodException.
Since I'm not as familiar with kjc sources as you guys are, it would be
nice if you could give some clues on how to go about fixing this bug.
It's sad that apparently the kjc developers prefer to be silent when
they receive bug reports, so I guess the burden on maintaining kjc in a
useable shape falls on kaffe developers.
cheers,
dalibor topic
--------------070505050106010702050901
Content-Type: text/plain;
name="kaffe.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="kaffe.diff"
? kaffe.diff
? out
? patches/ant-kaffe-1.1.3.diff
Index: bootstrap-kaffe+ant.sh
===================================================================
RCS file: /cvs/kaffe/kaffe-extras/bootstrap-kaffe+ant.sh,v
retrieving revision 1.3
diff -u -r1.3 bootstrap-kaffe+ant.sh
--- bootstrap-kaffe+ant.sh 1 Dec 2003 09:39:46 -0000 1.3
+++ bootstrap-kaffe+ant.sh 3 Jan 2004 11:01:03 -0000
@@ -6,8 +6,8 @@
TOPDIR=$(cd `dirname $0`; pwd)
PREFIX=$TOPDIR/install
-KAFFE=kaffe-1.1.2
-ANT=apache-ant-1.5.4
+KAFFE=kaffe-1.1.3
+ANT=apache-ant-1.6.0
export TOPDIR PREFIX KAFFE ANT
cd $TOPDIR
@@ -52,7 +52,7 @@
set -e
cd $ANT
-patch -p1 < ../../patches/ant-kaffe-1.1.0.diff
+patch -p1 < ../../patches/ant-$KAFFE.diff
JAVA_HOME=$PREFIX
JAVACMD=$JAVA_HOME/bin/java
export CLASSPATH JAVA_HOME JAVACMD KAFFELIBRARYPATH
--------------070505050106010702050901
Content-Type: text/plain;
name="ant-kaffe-1.1.3.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="ant-kaffe-1.1.3.diff"
diff -u apache-ant-1.6.0/bootstrap.sh apache-ant-1.6.0.patched/bootstrap.sh
--- apache-ant-1.6.0/bootstrap.sh Thu Dec 18 21:16:06 2003
+++ apache-ant-1.6.0.patched/bootstrap.sh Sat Jan 3 11:42:18 2004
@@ -121,7 +121,95 @@
${TOOLS}/ant/types/*.java \
${TOOLS}/ant/*.java ${TOOLS}/ant/taskdefs/*.java \
${TOOLS}/ant/taskdefs/compilers/*.java \
- ${TOOLS}/ant/taskdefs/condition/*.java
+ ${TOOLS}/ant/taskdefs/condition/*.java \
+ ${TOOLS}/ant/filters/util/ChainReaderHelper.java \
+ ${TOOLS}/ant/filters/BaseFilterReader.java \
+ ${TOOLS}/ant/filters/ChainableReader.java \
+ ${TOOLS}/ant/launch/Locator.java \
+ ${TOOLS}/ant/util/ResourceUtils.java \
+ ${TOOLS}/ant/util/JavaEnvUtils.java \
+ ${TOOLS}/ant/util/FileNameMapper.java \
+ ${TOOLS}/ant/util/MergingMapper.java \
+ ${TOOLS}/ant/util/IdentityMapper.java \
+ ${TOOLS}/ant/util/GlobPatternMapper.java \
+ ${TOOLS}/ant/util/SourceFileScanner.java \
+ ${TOOLS}/ant/taskdefs/email/EmailTask.java \
+ ${TOOLS}/ant/util/facade/ImplementationSpecificArgument.java \
+ ${TOOLS}/ant/util/facade/FacadeTaskHelper.java \
+ ${TOOLS}/ant/taskdefs/rmic/RmicAdapterFactory.java \
+ ${TOOLS}/ant/taskdefs/rmic/RmicAdapter.java \
+ ${TOOLS}/ant/util/StringUtils.java \
+ ${TOOLS}/ant/util/TeeOutputStream.java \
+ ${TOOLS}/ant/util/LazyFileOutputStream.java \
+ ${TOOLS}/ant/types/selectors/SelectorContainer.java \
+ ${TOOLS}/ant/types/selectors/modifiedselector/ModifiedSelector.java \
+ ${TOOLS}/ant/types/selectors/BaseExtendSelector.java \
+ ${TOOLS}/ant/util/JAXPUtils.java \
+ ${TOOLS}/ant/types/selectors/BaseSelectorContainer.java \
+ ${TOOLS}/ant/helper/AntXMLContext.java \
+ ${TOOLS}/ant/helper/ProjectHelperImpl.java \
+ ${TOOLS}/ant/types/selectors/BaseSelector.java \
+ ${TOOLS}/ant/types/selectors/ExtendFileSelector.java \
+ ${TOOLS}/ant/types/selectors/FileSelector.java \
+ ${TOOLS}/ant/types/selectors/TypeSelector.java \
+ ${TOOLS}/ant/types/selectors/SizeSelector.java \
+ ${TOOLS}/ant/types/selectors/SelectSelector.java \
+ ${TOOLS}/ant/types/selectors/PresentSelector.java \
+ ${TOOLS}/ant/types/selectors/MappingSelector.java \
+ ${TOOLS}/ant/types/selectors/OrSelector.java \
+ ${TOOLS}/ant/types/selectors/NotSelector.java \
+ ${TOOLS}/ant/types/selectors/NoneSelector.java \
+ ${TOOLS}/ant/types/selectors/MajoritySelector.java \
+ ${TOOLS}/ant/types/selectors/FilenameSelector.java \
+ ${TOOLS}/ant/types/selectors/ExtendSelector.java \
+ ${TOOLS}/ant/types/selectors/DifferentSelector.java \
+ ${TOOLS}/ant/types/selectors/DepthSelector.java \
+ ${TOOLS}/ant/types/selectors/DependSelector.java \
+ ${TOOLS}/ant/types/selectors/DateSelector.java \
+ ${TOOLS}/ant/types/selectors/ContainsSelector.java \
+ ${TOOLS}/ant/types/selectors/ContainsRegexpSelector.java \
+ ${TOOLS}/ant/util/regexp/Regexp.java \
+ ${TOOLS}/ant/types/selectors/AndSelector.java \
+ ${TOOLS}/ant/util/CollectionUtils.java \
+ ${TOOLS}/ant/input/MultipleChoiceInputRequest.java \
+ ${TOOLS}/ant/input/InputRequest.java \
+ ${TOOLS}/ant/types/selectors/SelectorUtils.java \
+ ${TOOLS}/ant/util/TimeoutObserver.java \
+ ${TOOLS}/ant/taskdefs/email/Message.java \
+ ${TOOLS}/ant/types/selectors/modifiedselector/Algorithm.java \
+ ${TOOLS}/ant/types/selectors/modifiedselector/Cache.java \
+ ${TOOLS}/ant/util/Watchdog.java \
+ ${TOOLS}/ant/util/ClasspathUtils.java \
+ ${TOOLS}/ant/filters/ClassConstants.java \
+ ${TOOLS}/ant/filters/EscapeUnicode.java \
+ ${TOOLS}/ant/filters/ExpandProperties.java \
+ ${TOOLS}/ant/filters/HeadFilter.java \
+ ${TOOLS}/ant/filters/LineContains.java \
+ ${TOOLS}/ant/filters/LineContainsRegExp.java \
+ ${TOOLS}/ant/filters/PrefixLines.java \
+ ${TOOLS}/ant/filters/ReplaceTokens.java \
+ ${TOOLS}/ant/filters/StripJavaComments.java \
+ ${TOOLS}/ant/filters/StripLineBreaks.java \
+ ${TOOLS}/ant/filters/StripLineComments.java \
+ ${TOOLS}/ant/filters/TabsToSpaces.java \
+ ${TOOLS}/ant/filters/BaseParamFilterReader.java \
+ ${TOOLS}/ant/filters/TailFilter.java \
+ ${TOOLS}/ant/util/Tokenizer.java \
+ ${TOOLS}/ant/util/LineTokenizer.java \
+ ${TOOLS}/ant/filters/TokenFilter.java \
+ ${TOOLS}/ant/util/regexp/RegexpFactory.java \
+ ${TOOLS}/ant/util/DateUtils.java \
+ ${TOOLS}/ant/types/selectors/SelectorScanner.java \
+ ${TOOLS}/ant/launch/AntMain.java \
+ ${TOOLS}/ant/util/LoaderUtils.java \
+ ${TOOLS}/ant/util/KeepAliveInputStream.java \
+ ${TOOLS}/ant/input/DefaultInputHandler.java \
+ ${TOOLS}/ant/taskdefs/email/EmailAddress.java \
+ ${TOOLS}/ant/input/InputHandler.java \
+ ${TOOLS}/ant/util/DOMElementWriter.java \
+ ${TOOLS}/ant/util/FlatFileNameMapper.java \
+ ${TOOLS}/ant/helper/ProjectHelper2.java \
+ ${TOOLS}/ant/util/FileUtils.java
ret=$?
if [ $ret != 0 ]; then
echo ... Failed compiling Ant classes !
diff -u apache-ant-1.6.0/build.sh apache-ant-1.6.0.patched/build.sh
--- apache-ant-1.6.0/build.sh Thu Dec 18 21:16:06 2003
+++ apache-ant-1.6.0.patched/build.sh Sat Jan 3 10:38:35 2004
@@ -24,7 +24,7 @@
export ANT_HOME
if test ! -f bootstrap/lib/ant.jar -o ! -x bootstrap/bin/ant -o ! -x bootstrap/bin/antRun ; then
- /bin/sh ./bootstrap.sh
+ /bin/sh ./bootstrap.sh -Dbuild.compiler=kjc
fi
if test ! -f bootstrap/lib/ant.jar -o ! -x bootstrap/bin/ant -o ! -x bootstrap/bin/antRun ; then
--------------070505050106010702050901--