Bug 755325
Summary: | ant cannot find ant-antlr | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jerry James <loganjerry> |
Component: | ant | Assignee: | Jaromír Cápík <jcapik> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 16 | CC: | akurtako, java-sig-commits, mmatejov, ovasik, pcheung, sochotni, tradej |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-03-07 11:58:04 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jerry James
2011-11-20 17:44:02 UTC
I'll look into it. Thanks, Tomas. This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component. Jerry, could you please provide more data on what project you are building etc.? Antlr and ant-antlr are different projects, so the problem is probably somewhere else. Just a wild quess since I didn't look into this that much. Do you by any chance set "OPT_JAR_LIST" environment variable? If so, then ant will ignore anything that is set in /etc/ant.d/*. Name of file in /etc/ant.d/ has absolutely no meaning, though I agree it should be named after the package so ant-antlr here. As for the contents: "ant-antlr ant/ant-antlr" means ant will try to put 2 jar files on classpath by running build-classpath on "ant-antlr" and "ant/ant-anlr". It will fail with the first since there is no ant-antlr.jar in any directory used by build-classpath. Hmmm, I'm probably just terminally confused. I'm trying to build jReality, which has a bunch of other dependencies. If you look at http://jjames.fedorapeople.org/, you can find all of them, except for jinput, which is still under review. I do not have OPT_JAR_LIST set in my environment, nor in the spec file, and a grep through the jReality sources doesn't turn it up either. What I do know is that I get the build failure in comment 1 with the stock Fedora RPMs installed, and that adding the new file I mentioned allowed the project to build. Given comment 5, I don't know why that helped, but it did. What happens when you do this before running ant: export CLASSPATH="`build-classpath ant/ant-antlr antlr`" ? That build completes successfully after adding that to the spec file. OK, I believe I found the bug(s): 1. For some reason /usr/bin/ant will skip building classpath if the dependency in the file is a substring of the filename in ant.d (i.e. if the /etc/ant.d/antlr file contains "*antlr*" it will not do build-classpath on it. I wonder how come this hasn't been discovered sooner, so there might be some weird reason for it... For details look at line 180 of /usr/bin/ant (commenting it out should make everything work) 2. ant-antlr3 ant.d file probably misses stringtemplate in the contents. This is unrelated to this bug, just found it while testing A small correction in 1. point. Ant will skip the dependency if it thinks it's already present in OPT_JAR_LIST. So if you have "antlr ant/ant-antlr" both will get on classpath, but if you do "ant/ant-antlr antlr", the check will fail on second dependency (because OPT_JAR_LIST already contains "antlr" substring) and thus it will not get on classpath. This seems to be to prevent duplicating jars on classpath, but to me it looks like it's causing more troubles than it's solving. Great work! Thanks for tracking this down. I made a patch that removes the test and contacted upstream: https://issues.apache.org/bugzilla/show_bug.cgi?id=52556 Upstream accepted the patch, so I'll push the updated version of the package in the repo on Monday. The patched version was built successfully (v1.8.2-9), please try it once it gets in rawhide (http://koji.fedoraproject.org/koji/taskinfo?taskID=3769495). Thank you. Will do. Thanks, Tomas and Stanislav! Closing the bug. |