Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 556984

Summary: dev-java/antlr-3.1.3-r3 fails to compile with Java 8: "building v3 grammars failed"
Product: Gentoo Linux Reporter: Sebastian Pipping <sping>
Component: Current packagesAssignee: Java team <java>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 552764    
Attachments: Build log

Description Sebastian Pipping gentoo-dev 2015-08-07 22:31:25 UTC
Created attachment 408502 [details]
Build log

[..]
 * ERROR: dev-java/antlr-3.1.3-r3::gentoo failed (compile phase):
 *   building v3 grammars failed
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called src_compile
 *   environment, line 3926:  Called antlr3 'tool/src/main/antlr/org/antlr/grammar/v3//ActionAnalysis.g' 'tool/src/main/antlr/org/antlr/grammar/v3//ActionTranslator.g' 'tool/src/main/antlr/org/antlr/grammar/v3//ANTLRv3.g' 'tool/src/main/antlr/org/antlr/grammar/v3//ANTLRv3Tree.g'
[..]
Comment 1 Sebastian Pipping gentoo-dev 2015-08-08 00:22:45 UTC
The problem is know upstream and related to use of Java 8:
https://github.com/antlr/antlr3/issues/151

So for a workaround, forcing compilation to use oracle-jdk-bin-1.7 makes it compile (e.g. JAVA_PKG_FORCE_VM=...).

Something like https://github.com/antlr/antlr3/commit/e88907c259c43d42fa5e9f5ad0e486a2c1e004bb could work for us, but to my current understanding it would need to be applied against antlr:0 since that is called to generate v3 grammars.  I could try to making a patch for antlr:0.
Comment 2 Sebastian Pipping gentoo-dev 2015-08-08 00:26:17 UTC
PS: We could also add a check for

  $(java-pkg_get-vm-version) == 1.8

if there is need for a different solution.
Comment 3 Sebastian Pipping gentoo-dev 2015-08-08 01:56:33 UTC

*** This bug has been marked as a duplicate of bug 506678 ***