[antlr-interest] 2.7.2 build system is fubar

Dave <davekam at pobox.com> davekam at pobox.com
Sun Feb 16 13:58:57 PST 2003


Hello,

Recently I've been reading up on lex and yacc, and discovered the
existence of antlr. So I thought I'd install it and try it out.
Unfortunately there seems to be no easy way to do this in the ordinary
way on Unix. As one of the readme files says, in theory you should be
able to do:

./configure
make
make install

from the top level directory. But when attempting make, this results
in the following:

davekam at vokzal:~/temp/antlr-2.7.2$ make
=============================
Making dependencies...
=============================
=============================
Making antlr ...
=============================
java -cp /Users/davekam/temp/antlr-2.7.2/antlrall.jar antlr.Tool  
antlr.g
Exception in thread "main" java.lang.NoClassDefFoundError: antlr/Tool
make[1]: *** [.antlr.g] Error 1
make: *** [subdirs] Error 2

...because antlrall.jar is not included in the distribution! I can't
really tell what the difference is supposed to be between antlr.jar
and antlrall.jar -- antlr.jar is included and seems to work. So I went
into scripts/Config.make.in and changed the occurence of antlrall.jar
to antlr.jar, set BOOTSTRAP_JAR to antlr.jar, and reran configure and
make. Then I get a string of errors such as the following:

davekam at vokzal:~/temp/antlr-2.7.2$ make
=============================
Making antlr ...
=============================
java -cp /Users/davekam/temp/antlr-2.7.2/antlr.jar antlr.Tool  
antlr.g
ANTLR Parser Generator   Version 2.7.2   1989-2003 jGuru.com
cannot write to './ANTLRParser.java'
java -cp /Users/davekam/temp/antlr-2.7.2/antlr.jar antlr.Tool  
tokdef.g
ANTLR Parser Generator   Version 2.7.2   1989-2003 jGuru.com
cannot write to './ANTLRTokdefLexer.java'

...because the files in question are mode 444 (read-only). So I did:

find . -perm 444 -exec chmod 666 {} ';'

...and make and make install seemed to run fine. So I tried out the
new install:

davekam at vokzal:~/antlr-2.7.2/examples/cpp/filter$ antlr t.g
Exception in thread "main" java.lang.NoClassDefFoundError: antlr/Tool

The jar files were installed as follows:

davekam at vokzal:~/antlr-2.7.2$ ls -l /usr/local/share/antlr-2.7.2 
total 1056
-rw-r--r--  1 root  staff  120804 Feb 16 16:51 antlr.debug.jar
-rw-r--r--  1 root  staff   89558 Feb 16 16:51 antlr.jar
-rw-r--r--  1 root  staff  326647 Feb 16 16:51 antlrall.jar

Should there have been an antlr/ directory too? I'm not sure, but
obviously it doesn't work. At this point one might like to start the
build over again by running make clean... which deletes my antlr.jar
file, which means I have to unpack the tarball and start again
completely from scratch?!?

Unless I'm seriously missing something here, I don't see how it's
possible to build and install antlr in the current version. Help much
appreciated.

Dave


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list