Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 161622 - java-config should look into the deptree when deciding wich vm to use
Summary: java-config should look into the deptree when deciding wich vm to use
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
: 233908 248250 278189 278966 (view as bug list)
Depends on:
Blocks: 162285 271449 276083
  Show dependency tree
 
Reported: 2007-01-11 21:10 UTC by Petteri Räty (RETIRED)
Modified: 2010-10-10 07:54 UTC (History)
5 users (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 Petteri Räty (RETIRED) gentoo-dev 2007-01-11 21:10:20 UTC
dev-util/checkstyle has:

# Uses antlr and as such needs ant-tasks
# Tests only pass with 1.5 but I think that
# is a problem with the test classes so running
# with 1.6 should be fine
DEPEND="
		!test? ( >=virtual/jdk-1.4 )
		test? ( =virtual/jdk-1.5* )

ok so it works fine but when trying to emerge checkstyle with jdk.conf:
*=sun-jdk-1.4

pena proxool # devebuild proxool-0.8.3-r1.ebuild clean compile
 * proxool-0.8.3-source.tar.gz MD5 ;-) ...                                                                                                                                                             [ ok ]
 * proxool-0.8.3-source.tar.gz RMD160 ;-) ...                                                                                                                                                          [ ok ]
 * proxool-0.8.3-source.tar.gz SHA1 ;-) ...                                                                                                                                                            [ ok ]
 * proxool-0.8.3-source.tar.gz SHA256 ;-) ...                                                                                                                                                          [ ok ]
 * proxool-0.8.3-source.tar.gz size ;-) ...                                                                                                                                                            [ ok ]
 * Using: sun-jdk-1.4
>>> Unpacking source...
>>> Unpacking proxool-0.8.3-source.tar.gz to /var/tmp/portage/dev-java/proxool-0.8.3-r1/work
tar: A lone zero block at 37060
removed `avalon-excalibur-4.1.jar'
removed `avalon-framework-4.1.2.jar'
removed `cglib2.jar'
removed `checkstyle-all-2.4.jar'
removed `commons-collections.jar'
removed `commons-lang.jar'
removed `commons-logging.jar'
removed `crimson.jar'
removed `dom4j.jar'
removed `ehcache.jar'
removed `hibernate2.jar'
removed `hsqldb.jar'
removed `jdbc2_0-stdext.jar'
removed `jmxri.jar'
removed `jsdk23.jar'
removed `jta.jar'
removed `junit.jar'
removed `log4j.jar'
removed `logkit.jar'
removed `xalan.jar'
removed `xml-apis.jar'
>>> Source unpacked.
Rewriting source attributes
Using Sax to rewrite the build.xml files
Rewriting ./build.xml
Rewriting target attributes
Using Sax to rewrite the build.xml files
Rewriting ./build.xml
Searching for bundled jars:
None found.
>>> Compiling source in /var/tmp/portage/dev-java/proxool-0.8.3-r1/work/proxool-0.8.3 ...
 * Disabling system classpath for ant
Buildfile: build.xml

BUILD FAILED
java.lang.UnsupportedClassVersionError: com/puppycrawl/tools/checkstyle/CheckStyleTask (Unsupported major.minor version 49.0)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at org.apache.tools.ant.AntClassLoader.findBaseClass(AntClassLoader.java:1197)
        at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:973)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:219)
        at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
        at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:142)
        at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:91)
        at org.apache.tools.ant.Main.runBuild(Main.java:653)
        at org.apache.tools.ant.Main.startAnt(Main.java:187)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

Total time: 0 seconds
java.lang.UnsupportedClassVersionError: com/puppycrawl/tools/checkstyle/CheckStyleTask (Unsupported major.minor version 49.0)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at org.apache.tools.ant.AntClassLoader.findBaseClass(AntClassLoader.java:1197)
        at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:973)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:219)
        at org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
        at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:142)
        at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:91)
        at org.apache.tools.ant.Main.runBuild(Main.java:653)
        at org.apache.tools.ant.Main.startAnt(Main.java:187)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
com/puppycrawl/tools/checkstyle/CheckStyleTask (Unsupported major.minor version 49.0)

!!! ERROR: dev-java/proxool-0.8.3-r1 failed.
Call stack:
  ebuild.sh, line 1593:   Called dyn_compile
  ebuild.sh, line 951:   Called src_compile
  ebuild.sh, line 1282:   Called java-pkg-2_src_compile
  java-pkg-2.eclass, line 68:   Called eant 'build-jar' '-f' 'build.xml'
  java-utils-2.eclass, line 1383:   Called die

!!! eant failed
!!! If you need support, post the topmost build error, and the call stack if relevant.

!!! When you file a bug report, please include the following information:
GENTOO_VM=sun-jdk-1.4  CLASSPATH="" JAVA_HOME="/opt/sun-jdk-1.4.2.12"
JAVACFLAGS="-source 1.4 -target 1.4" COMPILER="javac"
and of course, the output of emerge --info

So we should look into the deptree to see if there is something compiled to 1.5 bytecode and then refuse to use 1.4*
Comment 1 Petteri Räty (RETIRED) gentoo-dev 2007-01-11 21:13:35 UTC
This probably needs a decision if we want to actively prevent the user from trying VMs that do not work or let him shoot himself in the foot. In this case *=sun-jdk should always select 1.5.
Comment 2 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-01-12 13:04:31 UTC
Yeah java-config could be that smart, but it won't help portage with DEPEND which would still be >=1.4 so in theory there could be only 1.4 JDK merged, and then it would fail that it can't select any useable VM. And with current state, if user doesn't alter jdk.conf, he will get 1.4 selected only when there's no 1.5+ merged, which is exactly the same situation :)

I can't see any systematic solution to this atm, but I think dev-util/checkstyle should build 1.4 bytecode even with 1.5 VM, using the evil JAVA_PKG_WANT_{SOURCE,TARGET} variables. 
Comment 3 Petteri Räty (RETIRED) gentoo-dev 2007-01-12 14:35:17 UTC
(In reply to comment #2)
> 
> I can't see any systematic solution to this atm, but I think
> dev-util/checkstyle should build 1.4 bytecode even with 1.5 VM, using the evil
> JAVA_PKG_WANT_{SOURCE,TARGET} variables. 
> 

If the user does not change jdk.conf the atoms will bring in 1.5 and there will not be a problem as I think java-config will never use in that case so this problem is more a of a case of a user shooting himself in the foot with bad settings.
Comment 4 Petteri Räty (RETIRED) gentoo-dev 2007-01-15 20:56:26 UTC
Ok found a valid case for this. Version bumping dev-java/hessian-3.0.20 uses 1.5 features. Then again burlap that depends on hessian has =virtual/jdk-1.4 set which of course then just dies with class version issues. Of course these kind of issues should never get to users if the devs do their work probably but that never works.
Comment 5 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-01-15 23:35:25 UTC
(In reply to comment #4)
> Then again burlap that depends on hessian has =virtual/jdk-1.4

So how exactly would looking into deptree help here? A smarter java-config would just find out that there's no VM it can select, and die, just somewhat earlier than dying during compile.
Comment 6 Petteri Räty (RETIRED) gentoo-dev 2007-01-16 15:04:38 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Then again burlap that depends on hessian has =virtual/jdk-1.4
> 
> So how exactly would looking into deptree help here? A smarter java-config
> would just find out that there's no VM it can select, and die, just somewhat
> earlier than dying during compile.
> 

Yeah pretty much. This would help greatly when stuff is launched using for example kde menu entries. Now I think it would just silently die if something in the deptree broke like this instead we could show the user a graphical error dialog.
Comment 7 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2007-01-16 15:19:54 UTC
(In reply to comment #6)
> Yeah pretty much. This would help greatly when stuff is launched using for
> example kde menu entries. Now I think it would just silently die if something
> in the deptree broke like this instead we could show the user a graphical error
> dialog.

Ah, I thought this was about selecting the VM to compile package in the eclass, not in the launcher. For launchers this makes more sense, yeah.
Comment 8 Petteri Räty (RETIRED) gentoo-dev 2007-01-16 21:21:22 UTC
(In reply to comment #7)
> 
> Ah, I thought this was about selecting the VM to compile package in the eclass,
> not in the launcher. For launchers this makes more sense, yeah.
> 

Both ultimately execute the same code under the hood to select the vm.
Comment 9 Petteri Räty (RETIRED) gentoo-dev 2008-11-29 14:17:55 UTC
*** Bug 248250 has been marked as a duplicate of this bug. ***
Comment 10 Petteri Räty (RETIRED) gentoo-dev 2009-02-11 16:00:26 UTC
*** Bug 233908 has been marked as a duplicate of this bug. ***
Comment 11 Martin von Gagern 2009-05-04 12:41:53 UTC
Bit me again with dev-java/swarmcache-1.0_pre20050106-r1 failing to emerge with dev-java/jgroups-2.7.0:

    [javac] /var/tmp/portage/dev-java/swarmcache-1.0_pre20050106-r1/work/swarmcache-1.0_pre20050106/src/net/sf/swarmcache/JavaGroupsCommunicator.java:17: cannot access org.jgroups.blocks.NotificationBus
    [javac] bad class file: /var/tmp/portage/dev-java/swarmcache-1.0_pre20050106-r1/work/swarmcache-1.0_pre20050106/lib/jgroups-core.jar(org/jgroups/blocks/NotificationBus.class)
    [javac] class file has wrong version 49.0, should be 48.0

Calling emerge with JAVA_PKG_FORCE_VM=sun-jdk-1.5 set works well enough.
Comment 12 Martin von Gagern 2009-05-29 20:48:13 UTC
Again, trying to compile dev-java/bytelist-1.0.2 against dev-java/jcodings-1.0.2.
Comment 13 Petteri Räty (RETIRED) gentoo-dev 2009-07-21 12:43:11 UTC
*** Bug 278189 has been marked as a duplicate of this bug. ***
Comment 14 Petteri Räty (RETIRED) gentoo-dev 2009-07-25 09:01:23 UTC
*** Bug 278966 has been marked as a duplicate of this bug. ***
Comment 15 Martin von Gagern 2009-09-23 11:25:37 UTC
Again, trying to compile dev-java/cglib-2.2 against dev-java/asm-3.1.
Comment 16 Alistair Bush (RETIRED) gentoo-dev 2009-10-11 08:19:21 UTC
Thoughts on this error message please.

# ebuild cglib-2.2.ebuild clean install
 * cglib-src-2.2.jar RMD160 SHA1 SHA256 size ;-) ...                                                                                                         [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                         [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                        [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                       [ ok ]
 * checking cglib-src-2.2.jar ;-) ...                                                                                                                        [ ok ]
!!! ERROR: Couldn't find a suitable VM due to dependency asm-3 having a required target of 1.5
 * Unable to determine VM for building from dependencies:
NV_DEPEND: >=virtual/jdk-1.4
        app-arch/unzip
        test? ( dev-java/junit )
        dev-java/asm:3
        >=dev-java/ant-core-1.7.0  >=dev-java/java-config-2.1.6  source? ( app-arch/zip )  >=dev-java/ant-core-1.7.0


        >=dev-java/javatoolkit-0.3.0-r2
 *
 * ERROR: dev-java/cglib-2.2 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called pkg_setup
 *               ebuild.sh, line 1273:  Called java-pkg-2_pkg_setup
 *       java-pkg-2.eclass, line   61:  Called java-pkg_init
 *     java-utils-2.eclass, line 2079:  Called java-pkg_switch-vm
 *     java-utils-2.eclass, line 2503:  Called die
 * The specific snippet of code:
 *                              die "Failed to determine VM for building."
 *  The die message:
 *   Failed to determine VM for building.
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-java/cglib-2.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-java/cglib-2.2/temp/die.env'.
 *
!!! 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
Comment 17 Petteri Räty (RETIRED) gentoo-dev 2009-10-11 10:25:57 UTC
(In reply to comment #16)
> Thoughts on this error message please.
> 

It shouldn't error out but instead switch the VM to something that can build it with an ewarn if wanted.
Comment 18 Petteri Räty (RETIRED) gentoo-dev 2009-10-11 10:27:30 UTC
(In reply to comment #17)
> (In reply to comment #16)
> > Thoughts on this error message please.
> > 
> 
> It shouldn't error out but instead switch the VM to something that can build it
> with an ewarn if wanted.
> 

Of course this is not possible if we have something =virtual/jdk-1.4* depending on something that needs >=virtual/jdk-1.5 but hopefully we don't have that many of those cases in the tree.
Comment 19 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2009-10-12 13:15:29 UTC
(In reply to comment #17)
> (In reply to comment #16)
> > Thoughts on this error message please.
> > 
> 
> It shouldn't error out but instead switch the VM to something that can build it
> with an ewarn if wanted.
> 

I assume that this is what it does, take into account VM package.env entry of dependencies, and switch to a proper VM. No warning needed in such case IMO.
So I assume the error message means there really is no such VM? Either because it's not installed, or the combination of =1.4* package with >=1.5 dep you mention.
Comment 20 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2009-11-23 23:01:07 UTC
ali_bush: could we prioritize this bug please and get it done? Is comment 19 right? I looked in the source a bit and think it is.

The only improvement I can think of is to reword the error message a bit and extend it (on another line after the current one) depending on the two possibilities:

!!! ERROR: Couldn't find a suitable VM due to dependency asm-3 requiring a VM version of 1.5 or higher

a) "This package can however only be built with a lower version. Please see if this package has USE flags such as javaX to allow it to be built with higher version. If not, please file a bug."

b) "Such VM is however not installed. Please install virtual/jdk-1.5 or higher."
Comment 21 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2009-11-25 23:38:45 UTC
Mmm it doesn't seem to work.

$ depend-java-query --get-vm='dev-java/jruby >=virtual/jdk-1.4 '
blackdown-jdk-1.4.2

jruby built with java6 flag, it should select a 1.6 VM
Comment 22 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2009-11-26 22:56:06 UTC
Another failure:

!!! ERROR: Couldn't find a suitable VM due to dependency xmldb having a required target of 1.4                                                                               !!! ERROR: Couldn't find a suitable VM due to dependency javamail having a required target of 1.4       

The package (jsr173) has deps like >=jdk-1.3, so where's the problem.
Comment 23 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2009-11-26 23:29:38 UTC
Ah, there was a commit meanwhile. Updated, comment 22 does not occur again, comment 21 still does.
Comment 24 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2009-11-26 23:49:53 UTC
More on the problem with comment 22.

I realized that jruby's package.env contains:

VM="=virtual/jre-1.5*"
TARGET="1.6"
SOURCE="1.6"

looks like the VM creation does not take into account USE flag properly, because the ebuild (merged with USE=java6") says

RDEPEND="${CDEPEND}
        !java6? ( =virtual/jre-1.5* )
        java6? ( >=virtual/jre-1.6 )"

And if the deptree is checked for VM (I assume) this makes it not work. So that's a separate problem.

So I used hsqldb (USE=java6) which has a proper java6 package.env, probably since its order of java6? and !java6 RDEPENDs is reversed and the first occurence is used? (that means it would be wrong with USE="-java6", oh damn).

So the results with hsqldb and java-config trunk r7988, jdk.conf set to try the lowest possible VM:
*=blackdown-jdk-1.4.2 sun-jdk-1.5

$ depend-java-query --get-vm=' dev-db/hsqldb >=virtual/jdk-1.4* '
sun-jdk-1.7

(fine)

$ depend-java-query --get-vm=' dev-db/hsqldb =virtual/jdk-1.4* '
!!! ERROR: Couldn't find suitable VM. Possible invalid dependency string.

- this should give me the more meaningful error message that a dependency X needs higher VM Y?

$ depend-java-query --get-vm=' app-office/openoffice >=virtual/jdk-1.5 '
sun-jdk-1.5

- openoffice depends on hsqldb, I should be getting a 1.6+ VM
Comment 25 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2009-12-02 22:00:46 UTC
The current state looks find to me now, except the error messages.
Comment 26 Alistair Bush (RETIRED) gentoo-dev 2009-12-03 11:17:21 UTC
(In reply to comment #25)
> The current state looks find to me now, except the error messages.
> 

How about

$ ./src/depend-java-query --get-vm='dev-db/hsqldb || ( =virtual/jdk-1.5* =virtual/jdk-1.4* )'
!!! ERROR: Couldn't find suitable VM. Possible invalid dependency string.
           Due to hsqldb requiring a target of 1.6 but the virtual machines constrained by =virtual/jdk-1.5* =virtual/jdk-1.4*

and

$ ./src/depend-java-query --get-vm='java-virtuals/blah =virtual/jdk-1.4* '!!! ERROR: Couldn't find suitable VM. Possible invalid dependency string.
           Due to this package requiring virtual(s) blah
Comment 27 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2009-12-22 23:24:13 UTC
Released in 2.1.10 so hopefully fixed
Comment 28 Jacob Martin 2010-02-14 17:45:47 UTC
Bit me when compiling jgroups-2.7.0.

Works when emerging with JAVA_PKG_FORCE_VM=sun-jdk-1.6

>>> Emerging (1 of 1) dev-java/jgroups-2.7.0
 * JGroups-2.7.0.GA.src.zip RMD160 SHA1 SHA256 size ;-) ...                                                             [ ok ]
 * checking ebuild checksums ;-) ...                                                                                    [ ok ]
 * checking auxfile checksums ;-) ...                                                                                   [ ok ]
 * checking miscfile checksums ;-) ...                                                                                  [ ok ]
 * CPV:  dev-java/jgroups-2.7.0                                                                                               
 * REPO: gentoo                                                                                                               
 * USE:  amd64 elibc_glibc kernel_linux multilib userland_GNU                                                                 
!!! ERROR: Package instance has no attribute 'get_available_vms'                                                              
 * Unable to determine VM for building from dependencies:                                                                     
NV_DEPEND: >=virtual/jdk-1.5                                                                                                  
        >=virtual/jre-1.5                                                                                                     
        dev-java/bsh:0                                                                                                        
        dev-java/commons-logging:0                                                                                            
        java-virtuals/jmx                                                                                                     
        app-arch/unzip  >=dev-java/java-config-2.1.9-r1  source? ( app-arch/zip )  >=dev-java/ant-core-1.7.0                  


        >=dev-java/javatoolkit-0.3.0-r2
 * ERROR: dev-java/jgroups-2.7.0 failed:
 *   Failed to determine VM for building.
 *
 * Call stack:
 *             ebuild.sh, line   54:  Called pkg_setup
 *             ebuild.sh, line 1347:  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/jgroups-2.7.0',
 * the complete build log and the output of 'emerge -pqv =dev-java/jgroups-2.7.0'.
!!! 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/tmp/portage/dev-java/jgroups-2.7.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-java/jgroups-2.7.0/temp/die.env'.
 * S: '/var/tmp/portage/dev-java/jgroups-2.7.0/work/JGroups-2.7.0.GA.src'


--------------------------------------
emerge --info =dev-java/jgroups-2.7.0
--------------------------------------
Portage 2.1.7.16 (default/linux/amd64/10.0/desktop, gcc-4.3.4, glibc-2.10.1-r1, 2.6.31-gentoo-r6 x86_64)
=================================================================                                       
                        System Settings                                                                 
=================================================================                                       
System uname: Linux-2.6.31-gentoo-r6-x86_64-Dual_Core_AMD_Opteron-tm-_Processor_275-with-gentoo-1.12.13 
Timestamp of tree: Sat, 13 Feb 2010 02:30:01 +0000                                                      
ccache version 2.4 [disabled]                                                                           
app-shells/bash:     4.0_p35                                                                            
dev-java/java-config: 1.3.7-r1, 2.1.10                                                                  
dev-lang/python:     2.4.6, 2.5.4-r4, 2.6.4                                                             
dev-python/pycrypto: 2.1.0_beta1                                                                        
dev-util/ccache:     2.4-r7                                                                             
dev-util/cmake:      2.8.0-r2                                                                           
sys-apps/baselayout: 1.12.13                                                                            
sys-apps/sandbox:    1.6-r2                                                                             
sys-devel/autoconf:  2.13, 2.63-r1                                                                      
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2                           
sys-devel/binutils:  2.16.1-r3, 2.17-r1, 2.18-r3                                                        
sys-devel/gcc:       3.4.5, 3.4.6-r2, 4.1.1-r3, 4.1.2, 4.3.2-r3, 4.3.4                                  
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=opteron -mtune=opteron -O2 -pipe -msse -msse2 -funit-at-a-time -fomit-frame-pointer -frename-registers -fweb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=opteron -mtune=opteron -O2 -pipe -msse -msse2 -funit-at-a-time -fomit-frame-pointer -frename-registers -fweb"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X Xaw3d a52 aac acl acpi alsa amd amd64 apache2 arts audiofile berkdb binfilter bl blas bluetooth boost branding bzip2 cairo cdb cdda cddb cdr cli consolekit cpudetection cracklib crypt cups curl custom-optimization cxx dbus designer-plugin dia directfb disk-partition dri dts dv dvb dvd dvdnav dvdr dvdread eds emboss encode evo fam firefox flac fortran fts3 gd gdbm gif gimpprint git glitz gnome gnutls gpm graphviz gstreamer gtk gtkhtml hal hou htmlhandbook iconv inkjar ipv6 ithreads java jbig jpeg jpeg2k kde kpathsea lapack latex lcms ldap libnotify libsamplerate lm_sensors lzo mad math mikmod mjpeg mmx mmxext mng modplug modules moonlight mozcalendar mozilla mozsvg mp2 mp3 mp4 mp4live mpeg mpeg2 mpi mplayer mudflap multilib multislot musepack mysql mysqli nas ncurses network nls nptl nptlonly nsplugin octave ogg openexr opengl openmp pam paste64 pcre pdf perl php plasma plotutils png postscript ppds pppd python qt3support qt4 quicktime readline redland reflection restrict-javascript samba sdl secure-delete semantic-desktop sensord session slp smp socks5 sou spell spl sql sse sse2 ssl startup-notification svg sysfs tcpd tetex theora threads thunar tiff tivo tk toolbar tools truetype tta udev unicode usb utempter v4l virtualbox vorbis wavpack webdav webkit wma wmf x264 xanim xcomposite xine xinerama xml xorg xulrunner xv xvid zlib" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" NETBEANS_MODULES="nb cnd ide identity profiler visualweb java" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


-----------------------------------------
complete build log
-----------------------------------------
 ^[[32;01m*^[[0m CPV:  dev-java/jgroups-2.7.0
 ^[[32;01m*^[[0m REPO: gentoo
 ^[[32;01m*^[[0m USE:  amd64 elibc_glibc kernel_linux multilib userland_GNU
^[[01m^[[31;06m!!! ERROR: Package instance has no attribute 'get_available_vms'^[[0m
 ^[[31;01m*^[[0m Unable to determine VM for building from dependencies:
NV_DEPEND: >=virtual/jdk-1.5
        >=virtual/jre-1.5
        dev-java/bsh:0
        dev-java/commons-logging:0
        java-virtuals/jmx
        app-arch/unzip  >=dev-java/java-config-2.1.9-r1  source? ( app-arch/zip )  >=dev-java/ant-core-1.7.0


        >=dev-java/javatoolkit-0.3.0-r2
 ^[[31;01m*^[[0m ERROR: dev-java/jgroups-2.7.0 failed:
 ^[[31;01m*^[[0m   Failed to determine VM for building.
 ^[[31;01m*^[[0m
 ^[[31;01m*^[[0m Call stack:
 ^[[31;01m*^[[0m             ebuild.sh, line   54:  Called pkg_setup
 ^[[31;01m*^[[0m             ebuild.sh, line 1347:  Called java-pkg-2_pkg_setup
 ^[[31;01m*^[[0m     java-pkg-2.eclass, line   63:  Called java-pkg_init
 ^[[31;01m*^[[0m   java-utils-2.eclass, line 2126:  Called java-pkg_switch-vm
 ^[[31;01m*^[[0m   java-utils-2.eclass, line 2550:  Called die
 ^[[31;01m*^[[0m The specific snippet of code:
 ^[[31;01m*^[[0m                                die "Failed to determine VM for building."
 ^[[31;01m*^[[0m
 ^[[31;01m*^[[0m If you need support, post the output of 'emerge --info =dev-java/jgroups-2.7.0',
 ^[[31;01m*^[[0m the complete build log and the output of 'emerge -pqv =dev-java/jgroups-2.7.0'.
!!! 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
 ^[[31;01m*^[[0m The complete build log is located at '/var/tmp/portage/dev-java/jgroups-2.7.0/temp/build.log'.
 ^[[31;01m*^[[0m The ebuild environment file is located at '/var/tmp/portage/dev-java/jgroups-2.7.0/temp/die.env'.
 ^[[31;01m*^[[0m S: '/var/tmp/portage/dev-java/jgroups-2.7.0/work/JGroups-2.7.0.GA.src'

Comment 29 Jacob Martin 2010-02-14 17:46:53 UTC
Also, I had run python updater, and also re-emerged java-config and javatoolkit before obtaining this error, so those packages weren't the problem.
Comment 30 Martin von Gagern 2010-10-09 18:57:40 UTC
Doesn't look completely fixed to me: dev-java/jython-2.2.1-r1 failed with sun-jdk-1.5 due to dev-java/jdbc-mysql-5.1.11 requiring java 1.6:

/var/tmp/portage/dev-java/jython-2.2.1-r1/work/build.xml:199:
java.lang.UnsupportedClassVersionError:
Bad version number in .class file

Is this some different problem, although it looks the same, is some part of my system still affected from times before this fix, or is it really not fixed?
Comment 31 Petteri Räty (RETIRED) gentoo-dev 2010-10-10 07:54:33 UTC
(In reply to comment #30)
> 
> Is this some different problem, although it looks the same, is some part of my
> system still affected from times before this fix, or is it really not fixed?
> 

In any case we will not be opening this bug that's been closed for nearly a year (if you think there's a bug in our current ebuilds then open a new bug). I can't say with certainty that there wouldn't be any bugs in java-config but the former is as well possible. Probably should add a class version verifier in java-check-environment.