View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009777CMakeModulespublic2009-10-26 05:002009-10-30 11:56
ReporterMathieu Malaterre 
Assigned ToMathieu Malaterre 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0009777: FindJNI update not found in FindJava / CMakeDetermineJavaCompiler
DescriptionThere has been much work on FindJNI (see Bug 0009611). But those changes have not been propagated to the following modules:
- FindJava.cmake
- CMakeDetermineJavaCompiler.cmake

Thanks
TagsNo tags attached.
Attached Files

 Relationships
related to 0009611closedMathieu Malaterre Arch independent FindJNI.cmake on Linux (supports Sun Java, OpenJDK, Kaffe and GCJ paths) 
parent of 0009476closedBill Hoffman FindJNI.cmake is missing a lot of ARCH 

  Notes
(0018233)
Modestas Vainius (reporter)
2009-10-26 05:35

What is wrong with those? They search for binaries so they do not need {libarch} hack. Maybe:

* $ENV{JAVA_HOME}/bin could be added to CMakeDetermineJavaCompiler.cmake
* /usr/lib/jvm/java-6-openjdk/bin and /usr/lib/jvm/default-java/bin paths could be added to both.

But since they look in /usr/bin already, that's not a big deal (at least on Debian).
(0018234)
Mathieu Malaterre (developer)
2009-10-26 05:58

That's what I do not like. Let say I have on my machine (which I do):
- sun java
- openjdk
- gcj

The expected behavior of setting JAVA_HOME would be that in the end

JAVA_RUNTIME and JAVA_COMPILER be set to the proper java / javac located *underneath* JAVA_HOME

See debian bug: http://bugs.debian.org/536102 [^]
It allows me to quickly reproduce issues on a particular java implementation without update-alternatives trickeries (simply changing JAVA_HOME).

Cheers
(0018235)
Modestas Vainius (reporter)
2009-10-26 06:12

That's my point 1.
(0018300)
Mathieu Malaterre (developer)
2009-10-30 11:56

Index: Modules/CMakeDetermineJavaCompiler.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeDetermineJavaCompiler.cmake,v
retrieving revision 1.15
diff -u -r1.15 CMakeDetermineJavaCompiler.cmake
--- Modules/CMakeDetermineJavaCompiler.cmake 28 Sep 2009 15:46:47 -0000 1.15
+++ Modules/CMakeDetermineJavaCompiler.cmake 30 Oct 2009 15:54:40 -0000
@@ -51,14 +51,18 @@
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.5;JavaHome]/bin"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.4;JavaHome]/bin"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\1.3;JavaHome]/bin"
+ $ENV{JAVA_HOME}/bin
     /usr/bin
     /usr/lib/java/bin
     /usr/share/java/bin
     /usr/local/bin
     /usr/local/java/bin
+ /usr/local/java/share/bin
     /usr/java/j2sdk1.4.2_04
     /usr/lib/j2sdk1.4-sun/bin
+ /usr/java/j2sdk1.4.2_09/bin
     /usr/lib/j2sdk1.5-sun/bin
+ /opt/sun-jdk-1.5.0.04/bin
     )
   # if no compiler has been specified yet, then look for one
   IF(CMAKE_Java_COMPILER_INIT)
(0018301)
Mathieu Malaterre (developer)
2009-10-30 11:56

$ cvs ci -m"ENH: FIX 0009777. This should sync FindJava and CMakeDetermineJavaCompiler.cmake now" CMakeDetermineJavaCompiler.cmake
Committer: Mathieu Malaterre <mathieu.malaterre@kitware.com>
/cvsroot/CMake/CMake/Modules/CMakeDetermineJavaCompiler.cmake,v <-- CMakeDetermineJavaCompiler.cmake
new revision: 1.16; previous revision: 1.15

 Issue History
Date Modified Username Field Change
2009-10-26 05:00 Mathieu Malaterre New Issue
2009-10-26 05:01 Mathieu Malaterre Relationship added related to 0009611
2009-10-26 05:02 Mathieu Malaterre Relationship added parent of 0009476
2009-10-26 05:35 Modestas Vainius Note Added: 0018233
2009-10-26 05:58 Mathieu Malaterre Note Added: 0018234
2009-10-26 06:12 Modestas Vainius Note Added: 0018235
2009-10-27 16:24 Alex Neundorf Category CMake => Modules
2009-10-30 11:51 Mathieu Malaterre Status new => assigned
2009-10-30 11:51 Mathieu Malaterre Assigned To => Mathieu Malaterre
2009-10-30 11:56 Mathieu Malaterre Note Added: 0018300
2009-10-30 11:56 Mathieu Malaterre Note Added: 0018301
2009-10-30 11:56 Mathieu Malaterre Status assigned => closed
2009-10-30 11:56 Mathieu Malaterre Resolution open => fixed


Copyright © 2000 - 2018 MantisBT Team