[antlr-interest] build problem with antlr-2.7.5

Ric Klaren ric.klaren at gmail.com
Thu Feb 10 05:22:42 PST 2005

Hmmm it looks like the lib/antlr.jar is missing in the official 
distribution antlr-2.7.5.tar.gz, which leeds to a bootstrapping problem. 
(also keep a copy of antlr.jar around for when you do a make clean, I 
think, the makefiles were redone and I'm not 100% familiar with the new 

You can work around it for now by copying the .jar file from the rpm 
distribution to the lib or antlr directory. Or use one of these options 
to configure with a preinstalled antlr-2.7.4 to bootstrap:


Terence could you fix the tarball on the site?

Krishanu Debnath wrote:
> Unable to compile ANTLR grammar file(s)
>  /u/krishanu/ANTLR/antlr-2.7.5/antlr/../antlr/antlr.g
> Reason(s):
>  (a) there's no /u/krishanu/ANTLR/antlr-2.7.5/antlr/antlr.jar
>  (b) there's no /u/krishanu/ANTLR/antlr-2.7.5/antlr.jar
>  (c) there's no /u/krishanu/ANTLR/antlr-2.7.5/lib/antlr.jar
>  (d) options --with-antlr-jar --with-antlr-cmd not applied
>      or value given is not correct.                                   
>          You may resolve this problem by setting environment variable
> java -cp "/u/krishanu/ANTLR/antlr-2.7.4/antlr.jar" antlr.Tool lexer.g
> java -cp "/u/krishanu/ANTLR/antlr-2.7.4/antlr.jar" antlr.Tool parser.g
> gcc -c -g -I. -I$ANTLR_HOME/lib/cpp -Wall myLexer.cpp
> gcc -c -g -I. -I$ANTLR_HOME/lib/cpp -Wall myParser.cpp
> gcc -c -g -I. -I$ANTLR_HOME/lib/cpp -Wall main.cpp
> gcc main.o myLexer.o myParser.o $ANTLR_HOME/lib/cpp/src/libantlr.a -lstdc++
> Am I missing something? (My java knowledge is frustratingly poor)

This should still hold for 2.7.5. Also after installing there should be 
a script in <prefix>/bin with the name antlr that you can use in stead 
of running java manually as above (but 2.7.4 also had that one)



More information about the antlr-interest mailing list