CMake Error at /usr/share/cmake/Modules/FindJava.cmake:85 (MESSAGE): Error executing java -version Call Stack (most recent call first): Tests/CMakeLists.txt:1523 (INCLUDE) Cmake fails with the following error I only have IcedTea6-bin 1.7.2 [icedtea6-bin] on my system Running java -version on my own I get the following java is not available for sun-jdk-1.5 on x86_64 If I emerge sun-jdk and use it as my VM everything works fine :) So I guess you have either to add sun-jdk on cmake dependency list or check the active Java VM inside the ebuild
Looks like you had sun-jdk-1.5 emerged and set as system VM. When you unmerged it, you should have seen an ewarn about unmerging a system VM. You don't have to emerge it back, just use 'java-config -S icedtea6-bin' to fix this.
Is there a way to build CMake without this check for Java (I do not have any Java packages installed), and therefore have a -java USE flag? That's what I'm looking to do, otherwise I can't upgrade without having a VM installed.
Markos, could you please try the -r2 ebuild _from the KDE overlay_ ?! This should fix your case (but not the case where no java is installed at all).
People don't like checking overlays, I've moved your fix to tree. @OP Please try cmake-2.8.1-r2
During an emerge cmake-2.8.1-r2 was pulled in as a dependency. This is on a newly installed system, so there was no pre-existing java. icedtea6-bin is being pulled in later in the dependency tree, but at the point at which cmake is built, it has not yet been installed. I get the same 'java -version failed' error.
I'm getting the same 'java -version failed' error. dev-util/cmake-2.8.1-r2 When I run java-config -l it comes up empty. I think I did have java set up on this system at one time, but I no longer have it.... and don't need it. Any suggestions to skip the java check?
I got past the boostrap by unmerging java-config and java-config-wrapper.
(In reply to comment #7) > I got past the boostrap by unmerging java-config and java-config-wrapper. > +1
ran into this issue too. I forgot I had no VM installed, just the wrapper. This tricked cmake build script enough to think java is available and thus fail. I worked around it by renaming java and java-config away to something else, thus making cmake think it's not available. Seems like a bug of sorts but Gentoo specific where the wrappers can exist without a virtual machine. I couldn't emerge as I was in the middle of an emerge -e, feared that it would mess that history up. Not sure if it's best to make a USE flag to completely disable java for it or what... (or require dependency for a jvm)?
*** Bug 337999 has been marked as a duplicate of this bug. ***
*** Bug 338216 has been marked as a duplicate of this bug. ***
If I understand this issue correctly, cmake fails to boostrap because it gets confused with the presence of the java-config and java-config-wrapper packages and tries to determine the java version by running "java -version". @java: Are users supposed to have the java-config* packages without an installed java vm? @kde: Should we "kill" the cmake auto-detection for java?
(In reply to comment #12) > > @java: > Are users supposed to have the java-config* packages without an installed java > vm? > It's not useful without a VM but dependencies don't prevent installing just java-config. If adding a PDEPEND for || ( virtual/jdk virtual/jre ) solves this problem then we can add one.
I was having the same problem with a new installation of gentoo. When I try to install icedtea6-bin it has a dependency with cmake and cmake look for java -version but how can it be if the package that you are installing is java. MY WORKAROUND IS AS FOLLOW: I install first sun-jdk ACCEPT_LICENCE="dlj-1.1" emerge -av sun-jdk After install sun-jdk I installed icedtea6-bin emerge -av icedtea6-bin (and also it install cmake) finally remove sun-jdk.
(In reply to comment #14) > I was having the same problem with a new installation of gentoo. When I try to > install icedtea6-bin it has a dependency with cmake and cmake look for java > -version but how can it be if the package that you are installing is java. > > MY WORKAROUND IS AS FOLLOW: > > I install first sun-jdk > ACCEPT_LICENCE="dlj-1.1" emerge -av sun-jdk > > After install sun-jdk I installed icedtea6-bin > emerge -av icedtea6-bin (and also it install cmake) > finally remove sun-jdk. > There is an error in the line above the right one is ACCEPT_LICENSE="dlj-1.1" emerge -av sun-jdk
dev-java/java-config-2.1.11-r1 now PDEPENDs on virtual/jre. I checked depgraphs on stable and it seems to avoid this issue. As cmake-2.8.1-r2 is stable let's wait to get it stable before marking this as fixed.
i'll resolve it as it is stable for major archs (amd64/x86) thank you all
Hello all. Sorry for digging up this bug from its grave but the PDEPEND addition ended up having some unintended side affects, not limited to being unable to install a JRE without also installing a JDK. I would have created a new bug but I wanted to be sure that all the interested parties saw this. The problem was actually fixed in CMake within two weeks of this bug being created but the next release didn't hit Portage until after this bug was closed. http://www.cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0da537d16792ffcc38ec1fb19d518900b1fe7432 Older versions of CMake have long gone from the tree so I would simply like to remove the PDEPEND with no further action. Any objections? If I don't hear anything within the next week then I'll take that as silent agreement. :) I think the JAVA_HOME workaround added to the CMake ebuild was probably ineffective at the time and is no longer required. You could remove it but I suspect you'll be removing CMake 2 before too long anyway.
Time up! I've made the change now.