[antlr-interest] Rebuilding Antlr 3.0.1

HJ antlr-interest at codef0x.org
Sun Dec 9 19:54:41 PST 2007


I am attempting to follow http://www.antlr.org/wiki/pages/viewpage.action?pageId=732 ('How do I rebuild ANTLR v3?').

There doesn't seem that much to mess up, and yet the build process blows up pretty good.

$ uname -a
Linux pos 2.6.22-14-386 #1 Sun Oct 14 22:36:54 GMT 2007 i686 GNU/Linux

$ java -version
java version "1.7.0"
IcedTea Runtime Environment (build 1.7.0-b21)
IcedTea Client VM (build 1.7.0-b21, mixed mode, sharing)

$ pwd
/home/me/antlr31pre/antlr-3.0.1

$ ant -version
Apache Ant version 1.7.0 compiled on August 29 2007

$ ant build
Buildfile: build.xml

generator-prepare:

generator:

BUILD FAILED
/home/me/antlr31pre/antlr-3.0.1/build.xml:102: The following error occurred while executing this line:
/home/me/antlr31pre/antlr-3.0.1/build.xml:55: Problem: failed to create task or type antlr
Cause: the class org.apache.tools.ant.taskdefs.optional.ANTLR was not found.
        This looks like one of Ant's optional components.
Action: Check that the appropriate optional JAR exists in
        -/usr/share/ant/lib
        -/home/me/.ant/lib
        -a directory added on the command line with the -lib argument

Do not panic, this is a common problem.
The commonest cause is a missing JAR.

This is not a bug; it is a configuration problem


Total time: 0 seconds



I have also tried ant with a flurry of -lib definitions using absolute paths down into the 'antlr-3.0.1/lib' directory which yields the same error.

I've cd'd to 'src' and I've tried the manual javac method as described by the wiki, but javac -classpath N -d . ....., where N is an absolute path to 'antlr-3.0.1/lib' or a colon-separated list of absolute-path .jar files beneath 'antlr-3.0.1/lib', still yields bad results -- where javac seems to be complaining about no org.antlr package or no stringtemplate package; I can't really tell.

Surely I'm missing something simple?

~HJ


More information about the antlr-interest mailing list