Walt and Kenneth,
Your help with this problem is appreciated, though the problem still
persists.
What versions of java do you guys have installed? What does "eselect
java-vm list" show on your machines?
I'm on AMD64, what architectures are you running?
Looking around, /usr/bin/java is a symlink to run-java-tool which is
working. For example "java -version" displays an appropriate value.
Output from multiple tests of eselect, java-config, and emerge is
attached. To summarize the attachment:
/usr/lib/jvm reports icedtea6 and sun-jdk-1.6.0.20
"eselect java-vm list" shows sun-jdk as active
"eix -e --nocolor ant-core" shows ant-core installed
"eselect java-vm set system 1" successfully changes to icedtea6
"emerge -qv ant-junit" fails because ant-junit isn't found
"eselect java-vm set system 2" successfully changes to sun-jdk-1.6.0.20
"emerge -qv ant-junit" fails because ant-junit isn't found
notice that both icedtea6 and sun-jdk-1.6.0.20 have been tried and "emerge
ant-junit" fails with both
On a related note,
"java-config -S" only works for user 'root'. It doesn't work for an
individual user, e.g. 'relson'
"eselect java-vm set" allows system-wide setting of the vm and also has a
per-user option.
Also, eselect includes an unnecessary (but harmless) / in the sym-link, i.e.
eselect: current-system-vm -> /usr/lib/jvm//icedtea6
java-config: current-system-vm -> /usr/lib/jvm/icedtea6
On Sat, 22 May 2010 20:41:19 -0700
walt wrote:
> On 05/22/2010 01:10 PM, David Relson wrote:
> >
> > * Unable to determine VM for building from dependencies:
> > * Failed to determine VM for building.
>
> Well, I've seen those error messages more than once. If I were
> half-a-bottle more sober, I'm sure I could remember how I fixed
> the problem.
>
> Gentoo offers two (competing?) ways to specify the system-vm.
>
> #eselect java-vm
> Usage: eselect java-vm <action> <options>
> Extra actions:
> list List Available Virtual Machines
> set Set a new system or user vm
> show Show the current vm
>
> #java-config
> Usage: java-config [options]
> -L, --list-available-vms
> List available Java Virtual Machines
> -S VM, --set-system-vm=VM
> Set the default Java VM for the system
>
> I seem to recall that the important things changed by these two
> gizmos are some symlinks like, for example:
>
> /etc/java-config-2/current-system-vm -> /usr/lib/jvm//sun-jdk-1.6/
> /usr/bin/java -> run-java-tool
>
> Maybe I can remember more details tomorrow.
>
>
>
/usr/lib/jvm has:
lrwxrwxrwx 1 root root 17 May 22 23:44 icedtea6 -> /usr/lib/icedtea6
lrwxrwxrwx 1 root root 21 May 22 21:29 sun-jdk-1.6 -> /opt/sun-jdk-1.6.0.20
"eselect java-vm list" reports:
Available Java Virtual Machines:
[1] icedtea6
[2] sun-jdk-1.6 system-vm
"eselect java-vm set system 1" runs without complaint, after which "eselect
java-vm list" reports:
Available Java Virtual Machines:
[1] icedtea6 system-vm
[2] sun-jdk-1.6
"eix -e --nocolor ant-core" reports:
[I] dev-java/ant-core
Available versions: 1.7.1-r4{tbz2} ~1.7.1-r5 ~1.8.0-r1 ~1.8.0-r2
~1.8.1 {doc elibc_FreeBSD source}
Installed versions: 1.7.1-r4{tbz2}(08:02:48 AM 03/08/2010)(-doc
-elibc_FreeBSD -source)
Homepage: http://ant.apache.org/
Description: Java-based build tool similar to 'make' that uses
XML configuration files.
"emerge -qv ant-junit" fails because ant-junit isn't found
* CPV: dev-java/ant-junit-1.7.1
* REPO: gentoo
* USE: amd64 elibc_glibc kernel_linux multilib userland_GNU
!!! ERROR: Package ant-junit was not found!
* Unable to determine VM for building from dependencies:
NV_DEPEND: dev-java/junit:0 >=dev-java/java-config-2.1.9-r1
>=sys-apps/portage-2.1.2.7
>=sys-apps/portage-2.1.2.7
>=dev-java/javatoolkit-0.3.0-r2 >=virtual/jdk-1.4
>=virtual/jre-1.4
~dev-java/ant-core-1.7.1
!dev-java/ant-tasks
r...@osage tmp # eselect java-vm set system 2
r...@osage tmp # eselect java-vm list
Available Java Virtual Machines:
[1] icedtea6
[2] sun-jdk-1.6 system-vm
!!! Warning: VMs marked as Build Only may contain Security Vulnerabilities
and/or be EOL.
!!! Warning: Gentoo recommends not setting these VMs as either your System or
User VM.
!!! Warning: Please see http://www.gentoo.org/doc/en/java.xml#build-only for
more information.
r...@osage tmp # emerge -qv ant-junit
* CPV: dev-java/ant-junit-1.7.1
* REPO: gentoo
* USE: amd64 elibc_glibc kernel_linux multilib userland_GNU
!!! ERROR: Package ant-junit was not found!
* Unable to determine VM for building from dependencies:
NV_DEPEND: dev-java/junit:0 >=dev-java/java-config-2.1.9-r1
>=sys-apps/portage-2.1.2.7
>=sys-apps/portage-2.1.2.7
>=dev-java/javatoolkit-0.3.0-r2 >=virtual/jdk-1.4
>=virtual/jre-1.4
~dev-java/ant-core-1.7.1
!dev-java/ant-tasks
* ERROR: dev-java/ant-junit-1.7.1 failed:
* Failed to determine VM for building.
*
* Call stack:
* ebuild.sh, line 48: Called pkg_setup
* ebuild.sh, line 1346: Called java-pkg-2_pkg_setup
* java-pkg-2.eclass, line 63: Called java-pkg_init
* java-utils-2.eclass, line 2126: Called java-pkg_switch-vm
* java-utils-2.eclass, line 2550: Called die
* The specific snippet of code:
* die "Failed to determine VM for building."
*
* If you need support, post the output of 'emerge --info
=dev-java/ant-junit-1.7.1',
* the complete build log and the output of 'emerge -pqv
=dev-java/ant-junit-1.7.1'.
!!! When you file a bug report, please include the following information:
GENTOO_VM= CLASSPATH="" JAVA_HOME=""
JAVACFLAGS="" COMPILER=""
and of course, the output of emerge --info
* The complete build log is located at
'/var/log/portage/dev-java:ant-junit-1.7.1:20100523-125743.log'.
* The ebuild environment file is located at
'/var/tmp/portage/dev-java/ant-junit-1.7.1/temp/die.env'.
* S: '/var/tmp/portage/dev-java/ant-junit-1.7.1/work/apache-ant-1.7.1'
* IMPORTANT: 1 news items need reading for repository 'gentoo'.
* Use eselect news to read news items.