I'm lost with all those java virtual machines, so somone's going to have to lead my hand in troubleshooting this. All I know is: # java-config -f blackdown-jre-1.4.2
Created attachment 112062 [details] build log
It looks like you don't have a jdk in your active profile, just the jre (maybe a bug in the virtual/java-jdk resolution?)
What do you suggest here? I know next to nothing about java...
I'm a perl guy myself :) can you eselect/java-config to set the jdk as the default? I'll need to think of a way to test this in the ebuild (or ask, gasp, the java folks how best to do it)
Ok, I found the issue - as you mentioned, I had blackdown-jre set as system VM, and as it's not a JDK, it doesn't provide necessary files. As soon as I chose sun-jdk for system VM, the perl module installs and passes all tests. I can't mark it stable, though, until the ebuild checks for this - many users are only using a JRE and will be caught by this. Perhaps just bluntly checking for existence of /etc/java-config-2/bin/javac would do, assuming that if it's there, the system VM is set up properly and is a JDK. I'll leave it up to you. :)
(In reply to comment #2) > It looks like you don't have a jdk in your active profile, just the jre (maybe > a bug in the virtual/java-jdk resolution?) Just for sake of completeness - I have sun-jdk installed, it just wasn't set as system VM.
(In reply to comment #6) > (In reply to comment #2) > > It looks like you don't have a jdk in your active profile, just the jre (maybe > > a bug in the virtual/java-jdk resolution?) > > Just for sake of completeness - I have sun-jdk installed, it just wasn't set as > system VM. A way could be calling $(eselect java-vm show system), parse the output for JDK and skip tests if unsuccessful.
Except we never get as far as tests - the module fails to build because it's missing tools provided by a JDK.
inherit java-utils-2.eclass and set JAVA_PKG_FORCE_VM to the JDK you want (you have to go through a list of all possible implementations with has_version and set the variable accordingly). http://www.gentoo.org/proj/en/java/java-devel.xml#doc_chap2 "Build-Time VM Switching"
that shouldn't be used within an ebuild (according to the notes around it in the eclass and the link you provided). However, there seem to be no qualms about calling java-config, so that's the route I went once I found a call that was worthy. All set.