View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009611CMakeModulespublic2009-09-28 15:222010-11-09 22:57
ReporterModestas Vainius 
Assigned ToMathieu Malaterre 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-8 
Target VersionCMake 2.8.3Fixed in VersionCMake 2.8.3 
Summary0009611: Arch independent FindJNI.cmake on Linux (supports Sun Java, OpenJDK, Kaffe and GCJ paths)
DescriptionThis bug is an attempt to solve the same problem as in Bug 0009476 but in an arch-independent way. Rather than hardcoding numerous arches in the search path, the libarch is determined automatically. The JAVA_APPEND_LIBRARY_DIRECTORIES macro is mostly based on the OpenJDK code for Linux with additional subdirectories for kaffe. GCJ does not use libarch subdir at all. In addition, the patch adds /usr/lib/jvm/default-java/ to the search path which is a Debian specific symlink for default JVM. The patch is against current CMake CVS HEAD (2.8).
Additional InformationFeel free to make necessary adjustments to coding style etc. or implement it in a cleaner way (though I couldn't think of one as {libarch} might expand to multiple subdirs).
TagsNo tags attached.
Attached Filesdiff file icon FindJNI.cmake-arch-indep.diff [^] (4,726 bytes) 2009-09-28 15:22 [Show Content]
diff file icon FindJNI.cmake-includes-openjdk.diff [^] (1,679 bytes) 2009-09-30 14:02 [Show Content]

 Relationships
related to 0009777closedMathieu Malaterre FindJNI update not found in FindJava / CMakeDetermineJavaCompiler 

  Notes
(0017841)
Bill Hoffman (manager)
2009-09-30 09:59

cvs commit -m "Fix for bug 0009611 do not hard code archs for search paths of java, look at the machine type." FindJNI.cmake
Committer: Bill Hoffman <bill.hoffman@kitware.com>
/cvsroot/CMake/CMake/Modules/FindJNI.cmake,v <-- FindJNI.cmake
new revision: 1.43; previous revision: 1.42

Let me know if this works for you folks and I will close the bug. Thanks.
(0017842)
Bill Hoffman (manager)
2009-09-30 09:59

Either of you want to be the maintainer for this module?
(0017850)
Modestas Vainius (reporter)
2009-09-30 14:01

I have no particular interest in Java. OpenJDK is available for many architectures on Debian and I had to fix FindJNI.cmake to support them. And I typically try to make fixes as portable as possible.

What is more, I attach another patch which adds a few paths to include search and really adds OpenJDK 6 paths this time. Once you commit it, feel free to close the bug. I'll reopen if a problem on a "weird" arch arises.
(0017851)
Bill Hoffman (manager)
2009-09-30 14:15

cvs commit -m "Fix for bug 0009611, some more paths for OpenJDK." FindJNI.cmake
Committer: Bill Hoffman <bill.hoffman@kitware.com>
/cvsroot/CMake/CMake/Modules/FindJNI.cmake,v <-- FindJNI.cmake
new revision: 1.44; previous revision: 1.43
(0021140)
Modestas Vainius (reporter)
2010-06-22 18:06

I reopen the issue because apparently my previous patch was not complete. Here I link [1] another attempt which has finally worked on all debian architectures after many trail & error cases. The patch applies cleanly against 2.8.2-rc3. It has been in debian in its current state for a month without any reported regressions.

[1] http://git.debian.org/?p=collab-maint/cmake.git;a=blob;f=debian/patches/FindJNI_fix_libarch_determination.diff [^]
(0021142)
Mathieu Malaterre (developer)
2010-06-22 22:13

I volonteer to merge the change in cmake in case Modestas is not a cmake developer. The proposed changes works nicely in GDCM.
(0021570)
Mathieu Malaterre (developer)
2010-07-30 04:28

Fixed in next:

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=963921f2a86a6cfa78c86dc7127ca117f540f199 [^]
(0022174)
David Cole (manager)
2010-09-09 23:53

also merged into master... expect fix in 2.8.3

 Issue History
Date Modified Username Field Change
2009-09-28 15:22 Modestas Vainius New Issue
2009-09-28 15:22 Modestas Vainius File Added: FindJNI.cmake-arch-indep.diff
2009-09-30 09:59 Bill Hoffman Note Added: 0017841
2009-09-30 09:59 Bill Hoffman Status new => assigned
2009-09-30 09:59 Bill Hoffman Assigned To => Bill Hoffman
2009-09-30 09:59 Bill Hoffman Note Added: 0017842
2009-09-30 14:01 Modestas Vainius Note Added: 0017850
2009-09-30 14:02 Modestas Vainius File Added: FindJNI.cmake-includes-openjdk.diff
2009-09-30 14:15 Bill Hoffman Note Added: 0017851
2009-09-30 14:15 Bill Hoffman Status assigned => closed
2009-09-30 14:15 Bill Hoffman Resolution open => fixed
2009-10-26 05:01 Mathieu Malaterre Relationship added related to 0009777
2010-06-22 18:06 Modestas Vainius Note Added: 0021140
2010-06-22 18:06 Modestas Vainius Status closed => feedback
2010-06-22 18:06 Modestas Vainius Resolution fixed => reopened
2010-06-22 22:13 Mathieu Malaterre Note Added: 0021142
2010-07-29 11:36 Brad King Status feedback => assigned
2010-07-29 11:36 Brad King Assigned To Bill Hoffman => Mathieu Malaterre
2010-07-30 04:28 Mathieu Malaterre Note Added: 0021570
2010-08-28 10:19 Kovarththanan Rajaratnam Category CMake => Modules
2010-09-09 23:53 David Cole Fixed in Version => CMake 2.8.3
2010-09-09 23:53 David Cole Target Version => CMake 2.8.3
2010-09-09 23:53 David Cole Note Added: 0022174
2010-09-09 23:53 David Cole Status assigned => resolved
2010-09-09 23:53 David Cole Resolution reopened => fixed
2010-11-09 22:57 Philip Lowman Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team