Building ANTLR4 from source seems to not be working for me

187 views
Skip to first unread message

Chris Miner

unread,
May 6, 2022, 4:07:33 PM5/6/22
to antlr-discussion
Hi,

Out of curiosity, I am trying to build ANTLR from source following the instructions at 

https://github.com/antlr/antlr4/blob/master/doc/building-antlr.md

After 
mvn -DskipTests install

The build errors with:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile (default-testCompile) on project antlr4-runtime-testsuite: Fatal error compiling: java.lang.IllegalAccessError: class org.antlr.v4.test.runtime.CommentHasStringValueProcessor (in unnamed module @0x6e649fd0) cannot access class com.sun.tools.javac.model.JavacElements (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.model to unnamed module @0x6e649fd0 -> [Help 1]

Probably there is a simple fix. Ideas?


Terence Parr

unread,
May 6, 2022, 4:33:29 PM5/6/22
to antlr-discussion
That looks to be an older version of antlr; CommentHasStringValueProcessor should be gone in 4.10 :)
Ter

--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/antlr-discussion/2cef658d-208d-4fc8-879c-2ca9f57061ffn%40googlegroups.com.


--
Dictation in use. Please excuse homophones, malapropisms, and nonsense.

Chris Miner

unread,
May 6, 2022, 6:43:28 PM5/6/22
to antlr-discussion
hmmm....
I'm using the master, which based on the docs is the one that has the latest greatest most stable version which I presume is 4.10.1.  I was going to say there isn't a tag for 4.10.1 as near as I can tell, but I see there is on GitHub, but not according to vs code.  Not sure why that doesn't show up in vs code.  Still, I am trying this build on the master 'main' branch.

Chris Miner

unread,
May 6, 2022, 6:49:30 PM5/6/22
to antlr-discussion
weird.... I did a fresh clone and it worked beautifully.  Alright!  problem solved.  (except for the little detail of why it didn't work in the first place.  learning opportunity!)
Reply all
Reply to author
Forward
0 new messages