Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 353895 - >=dev-java/java-config-2.1.11 tries to use a JRE for building when set as system vm
Summary: >=dev-java/java-config-2.1.11 tries to use a JRE for building when set as sys...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-06 19:23 UTC by Agostino Sarubbo
Modified: 2022-04-25 15:10 UTC (History)
0 users

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 Agostino Sarubbo gentoo-dev 2011-02-06 19:23:26 UTC
* Package:    dev-java/ant-antlr-1.8.1
 * Repository: gentoo
 * Maintainer: java@gentoo.org
 * USE:  amd64 elibc_glibc kernel_linux multilib userland_GNU
!!! ERROR: The javac executable was not found in the Java path
 * Using: sun-jre-bin-1.6
 * Disabling all optional ANT_TASKS
Warning: Unable to determine tools.jar location.
  If build fails because sun.* classes could not be found,
  Make sure you are using a JDK, not JRE as your user/system VM.
  and that you have java-config version 2.0.30 or above installed.
Unable to locate tools.jar. Expected to find it in /opt/sun-jre-bin-1.6.0.22/lib/tools.jar

but i have tools.jar:

amd64box quassel # find / -iname "tools.jar"
/opt/icedtea6-bin-1.9.5/lib/tools.jar

I see that it search tools.jar "under" sun-jre-bin and not icedtea but i have also jre:

[I] dev-java/sun-jre-bin
     Available versions:  (1.6) 1.6.0.22!s ~1.6.0.23!s
        {X alsa jce nsplugin odbc}
     Installed versions:  1.6.0.22(1.6)!s(11:27:02 24/01/2011)(X alsa nsplugin -jce -odbc)



Add as a block because is a depend
     Homepage:            http://java.sun.com/javase/6/
     Description:         Sun's Java SE Runtime Environment
Comment 1 Agostino Sarubbo gentoo-dev 2011-02-06 19:24:20 UTC
sorry for final bad paste
Comment 2 Krzysztof Pawlik (RETIRED) gentoo-dev 2011-02-06 19:32:27 UTC
Looks like an issue with java-config:


java-utils-2.eclass-# variables:
java-utils-2.eclass-# EANT_GENTOO_CLASSPATH - calls java-pkg_getjars for the value and adds to the
java-utils-2.eclass-#                         gentoo.classpath property. Be sure to call
java-utils-2.eclass-#                         java-ant_rewrite-classpath in src_unpack.
java-utils-2.eclass:# EANT_NEEDS_TOOLS - add tools.jar to the gentoo.classpath. Should only be used
java-utils-2.eclass-#                    for build-time purposes, the dependency is not recorded to
java-utils-2.eclass-#                    package.env!
java-utils-2.eclass-# JAVA_PKG_NO_BUNDLED_SEARCH - Don't search for bundled jars or class files
java-utils-2.eclass-# *ANT_TASKS - used to determine ANT_TASKS before calling Ant.
--
java-utils-2.eclass-    for atom in ${gcp}; do
java-utils-2.eclass-            cp="${cp}:$(java-pkg_getjars ${getjarsarg} ${atom})"
java-utils-2.eclass-    done
java-utils-2.eclass-
java-utils-2.eclass:    [[ -n "${EANT_NEEDS_TOOLS}" ]] && cp="${cp}:$(java-config --tools)"
java-utils-2.eclass-
java-utils-2.eclass-    if [[ ${cp} ]]; then
java-utils-2.eclass-            # It seems ant does not like single quotes around ${cp}
java-utils-2.eclass-            cp=${cp#:}


Could you post the output of `java-config --tools'? For me it's:

nelchael@s-lappy .../portage/eclass$ java-config --tools
/opt/sun-jdk-1.6.0.23/lib/tools.jar
Comment 3 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2011-02-06 22:01:05 UTC
The problem is that due to changes for bug 315039, java-config now respect system vm setting for build if possible. And if it's a JRE, it will use it too, although JRE is not enough for building :/ This needs to be fixed. The workaround is to either set icedtea as system VM, or set it as preferred build vm (see http://www.gentoo.org/doc/en/java.xml )
This should not block resin though.
Comment 4 Agostino Sarubbo gentoo-dev 2011-02-07 09:20:01 UTC
(In reply to comment #2)
> Could you post the output of `java-config --tools'? For me it's:

Nothing output for me
Comment 5 Florian Schmaus gentoo-dev 2022-04-25 15:10:20 UTC
FWIW, the commit Caster mentions is https://gitweb.gentoo.org/proj/java-config.git/commit/?id=bdea532f1b4c72ebd369a4560864771bbdc25ccb

I am not sure if this still applies and I've just emerged ant-antlr with a JRE a system VM. It also appears that this bug does not attract a lot of visitors. Hence I am lowering the priority of this bug.