This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 109212 - cnd's apt and modelimpl cannot be compiled if antlr correctly configured
Summary: cnd's apt and modelimpl cannot be compiled if antlr correctly configured
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
: 107378 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-07-10 10:05 UTC by Jaroslav Tulach
Modified: 2007-08-27 14:01 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
This is my patch (2.51 KB, patch)
2007-07-13 12:06 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2007-07-10 10:05:26 UTC
I have a version of ant with correctly configured antlr - e.g. Ant's antlr task works without specifying additional 
<classpath/>. In such configuration neither cnd/apt or cnd/modelimpl modules compile. 

This is caused by two problems:
#1 - the build scripts use <classpath> to provide own pointer to a antlr module provided by cnd pack
#2 - the official antlr 2.7.7 and the cnd's version do not seem to be the same

The reason why #1 is a problem, is that the classpath attribute is just appended to the classpath and as such the 
cnd's version is not used.

The reason why #2 is a problem (and also a reason why Petr is on CC, as I have heard that he is in charge of getting 
3rd party libraries under control) is that we will unlikely be able to create a DEB or RPM package if we cannot 
compile with regular antlr version. Plus potential licensing problems - is the source code of our modified version 
exposed to public anywhere?

I tried to replace the calls to <antlr/> task with direct call to <java classname="antlr.Tool" 
fork='true'><arg .../></java> - this works, but always overrides the output file, which is probably no good.

Anyway I have a feeling that this should be fixed, as otherwise people with correctly configured Ant will not be able 
to compile cnd cluster. Moreover these reports will be random as people with just plain version of Ant will be fine - 
means more time on support, debugging, etc.
Comment 1 Vladimir Voskresensky 2007-07-10 10:26:24 UTC
as you proposed, to solve #1 we should change use of "antlr" target in build script to direct call of our own ANTLR
generator.

#2 should not be a problem, because cnd's version is not 3rd party ANTLR. We use ANTLR "Sun-2.7.7";
We have legal approval to use ANTLR sources (with correspond licensing) in NB/CND/SunStudio, we have legal approvement
from author of ANTLR to change and distribute our own ANTLR version for NB/CND/SunStudio needs.
our ANTLR version supports several additional attributes and code generator options for Java language.
The reason of modifying ANTLR was the poor performance of generated code, the Sun-ANTLR version generates code which is
5-10x times faster for Java parsers/lexers. Our contributions are referenced from official ANTLR site as well.
We can not use official ANTLR 2.7.7 and possibly in next release we'll move on own version of ANTLR 3.0

So, I think we should solve #1 like it's done with any other call to external tools
Comment 2 Jaroslav Tulach 2007-07-13 12:06:42 UTC
Created attachment 45058 [details]
This is my patch
Comment 3 Vladimir Voskresensky 2007-07-14 05:30:30 UTC
seems OK
Comment 4 Vladimir Voskresensky 2007-08-23 16:23:11 UTC
*** Issue 107378 has been marked as a duplicate of this issue. ***
Comment 5 Vladimir Voskresensky 2007-08-23 16:27:24 UTC
fixed.

cvs log:
/shared/data/ccvs/repository/cnd/modelimpl/build.xml,v  <--  build.xml
new revision: 1.10; previous revision: 1.9
done
Checking in apt/build.xml;
/shared/data/ccvs/repository/cnd/apt/build.xml,v  <--  build.xml
new revision: 1.6; previous revision: 1.5
done
Comment 6 Jaroslav Tulach 2007-08-27 14:01:42 UTC
Thanks, looks like I can compile with "urpmi ant-antlr" now.