Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 138281 - jikes causes error concerning the --runtime switch
Summary: jikes causes error concerning the --runtime switch
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-27 16:08 UTC by David Li
Modified: 2006-06-30 16:43 UTC (History)
0 users

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


Attachments
This is a log of emerging xjavac without jikes (log-without-jikes,2.28 KB, text/plain)
2006-06-27 16:09 UTC, David Li
Details
This is a log of emerging xjavac with jikes (log-with-jikes,3.09 KB, text/plain)
2006-06-27 16:10 UTC, David Li
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Li 2006-06-27 16:08:02 UTC
When the jikes use flag is turned on, the --runtime switch is passed to the compiler causes an error. This does not happen with the jikes useflag turned off.

This can be seen in an error such as:
[javac] Error: option --runtime not recognized
or
[xjavac] Error: option --runtime not recognized
while building in red letters (you can't miss it)

It doesn't seem to really affect the compilation process and everything continues as if it never happened.
Comment 1 David Li 2006-06-27 16:09:49 UTC
Created attachment 90319 [details]
This is a log of emerging xjavac without jikes
Comment 2 David Li 2006-06-27 16:10:43 UTC
Created attachment 90320 [details]
This is a log of emerging xjavac with jikes

Error on line 20
Comment 3 Josh Nichols (RETIRED) gentoo-dev 2006-06-28 04:35:28 UTC
What versions of jikes and java-config do you have installed? My guess is that you unmasked some of the new java stuff, but not everything.
Comment 4 David Li 2006-06-28 05:51:27 UTC
# emerge -pv jikes java-config

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] dev-java/jikes-1.22-r12  0 kB
[ebuild   R   ] dev-java/java-config-2.0.24  0 kB

Total size of downloads: 0 kB

Those are the latest versions in my portage tree at the moment
Comment 5 David Li 2006-06-30 08:49:15 UTC
Also, what's with the warnings when using jikes? Those look like they are eclass related:

*** Semantic Warning: I/O warning: "No such file or directory" while trying to open Usage.

*** Semantic Warning: I/O warning: "No such file or directory" while trying to open  java-config [ OPTIONS ] Options.

*** Semantic Warning: I/O warning: "No such file or directory" while trying to open 
 << -h arg1[,arg2,...] --help=arg1[,arg2,...] >>
List all command line options with --help , for command specific long help messages use --help=command (ex. --help=javac) or all long help messages with --help=* .

I mean, a warning about java-config? Where does that come from? How does this have to to turning on the jikes use flag?
Comment 6 Josh Nichols (RETIRED) gentoo-dev 2006-06-30 09:11:45 UTC
It is related to how the ant has adapters for using different compilers. The jikes one happens to invoke /usr/bin/jikes iirc, which in turn invokes java-config to get the runtime path.
Comment 7 David Li 2006-06-30 10:13:25 UTC
Oh, I see.

/usr/bin/jikes calls "java-config --runtime"

--runtime only works in java-config generation 2 but since most packages are generation 1, it causes an error.

Changing /usr/bin/jikes from
[[ -z ${BOOTCLASSPATH} ]] && export BOOTCLASSPATH=$(java-config --runtime)
to
[[ -z ${BOOTCLASSPATH} ]] && export BOOTCLASSPATH=$(java-config-2 --runtime)

fixes it. It's pretty ugly though
Comment 8 Josh Nichols (RETIRED) gentoo-dev 2006-06-30 16:27:36 UTC
Af, excellent observation. I will see to updating jikes's wrapper script to use java-config-2. It's not that dirty of a hack, since it does explicitly depend on java-config-2.
Comment 9 Josh Nichols (RETIRED) gentoo-dev 2006-06-30 16:43:01 UTC
Fixed in CVS, thanks for reporting! Changes should propogate to a rsync near you in a few hours.