Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 72785 - Ebuild dev-java/ant-tasks fails due to classpath problems, using jikes
Summary: Ebuild dev-java/ant-tasks fails due to classpath problems, using jikes
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-28 20:25 UTC by Philippe Van Deyck
Modified: 2005-01-15 16:59 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Van Deyck 2004-11-28 20:25:01 UTC
Emerging ant-tasks (1.6.2-r5), using jikes as java-compiler, produces error while compiling ant classes.
The error says my classpath is incorrect, but that's not the case. The ebuild changes it incorrectly. Jikes (1.22) needs the $JAVA_HOME/jre/lib/rt.jar in its classpath, but the ant-tasks ebuild changes it to "." (on line 68).

Reproducible: Always
Steps to Reproduce:
1.emerge ant-tasks
2.
3.

Actual Results:  
Calculating dependencies ...done!
>>> emerge (1 of 1) dev-java/ant-tasks-1.6.2-r5 to /
>>> md5 src_uri ;-) apache-ant-1.6.2-src.tar.bz2
>>> Unpacking source...
>>> Unpacking apache-ant-1.6.2-src.tar.bz2 to /var/tmp/portage/ant-tasks-1.6.2-
r5/work
tar: A lone zero block at 34226
>>> Source unpacked.
javamail
... Bootstrapping Ant Distribution
... Compiling Ant Classes

Found 1 system error:

*** Semantic Error: You need to modify your classpath, sourcepath, 
bootclasspath, and/or extdirs setup. Jikes could not find package "java.lang" 
in:
                build/classes
                src/main
                lib/xercesImpl.jar
                lib/xml-apis.jar
                .
                /opt/blackdown-jdk-1.4.2/lib/tools.jar
                .

... Failed compiling Ant classes !

Expected Results:  
No error.

When i change the classpath in the ebuild on line 68, from:
CLASSPATH="." ./build.sh -Ddist.dir=${D}/usr/share/ant-core -lib ${libs} || die 
"build failed"

to:
CLASSPATH=".:$JAVA_HOME/jre/lib/rt.jar" ./build.sh -Ddist.dir=${D}/usr/share/
ant-core -lib ${libs} || die "build failed"

The ebuild finishes succesfully. Don't know if it's the correct solution, but it 
works.
Comment 1 Saleem Abdulrasool (RETIRED) gentoo-dev 2005-01-15 16:38:19 UTC
Please include the output of 'emerge info' as an attachment as well as the jdk being used.  Please reopen when the required information has been attached.
Comment 2 Petteri Räty (RETIRED) gentoo-dev 2005-01-15 16:59:33 UTC
I tested for this and found nothing wrong. I used blackdown-jdk-1.4.2.01. 

Here's how I did it:
qpkg -I -nc dev-java | xargs emerge -C 
USE="jikes" emerge ant-tasks