|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004605||CMake||CMake||public||2007-03-15 11:38||2007-05-24 17:39|
|Assigned To||Bill Hoffman|
|Target Version||Fixed in Version|
|Summary||0004605: CMake sometimes uses JavaEmbedding.framework, but should never|
|Description||Two of my VTK dashboards are failing:|
Both are running 10.4.9, one is PPC one is Intel. Both are using CMake from CVS of 2007-03-15.
The problem is JavaEmbedding.framework. This framework is deprecated and basically should never be used. On a 10.4 system the framework still exists, but is ppc only:
lipo -info /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/JavaEmbedding.framework/Versions/A/JavaEmbedding
Non-fat file: /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/JavaEmbedding.framework/Versions/A/JavaEmbedding is architecture: ppc
Apple has said it will never be Intel native. Thus no intel build can ever link against it.
Now I'm not a java expert by any stretch, but my understanding (mostly thanks to David Cole and others on the VTK list) is as follows...
The bug is probably in CMake's FindJNI.cmake or FindJava.cmake. It should never be picking "-framework JavaEmbedding", but sometimes it still does.
The thing that finds it and sets it into the JAVA_AWT_INCLUDE_PATH is a search for the header file "jawt.h" -- if that header file is there, then it sets the include path variable, but it does not set JAVA_AWT_LIBRARY. So everything compiles fine, but then there's nothing to link to.
Where is the jawt.h header?
find /Developer/SDKs/MacOSX10.4u.sdk -name jawt.h
find /Developer/SDKs/MacOSX10.3.9.sdk -name jawt.h
So perhaps it is a simple as CMake needing to hardcode an exception to never use the one in JavaEmbedding.framework.
|Tags||No tags attached.|
|Attached Files||FindJNI.cmake [^] (5,065 bytes) 1969-12-31 19:00|
David Cole (manager)
|I tried the attached patch (FindJNI.cmake) on caladan and it correctly avoids picking up "JavaEmbedding" using this patch on that PPC Mac. I'm fairly confident it will address the issue on Intel macs, too, but have not tried it... Not sure if this is the ideal way to fix this issue, but it does allow building Java wrapped VTK on the mac *by default* without making any special adjustments in ccmake or an initial cache for a script...|
Sean McBride (reporter)
I took today's CMake code, added your patch, bootstrapped CMake, then did a build of VTK that would fail without your patch.
Now it works! This was on an Intel iMac in 10.5.
Once CMake is updated, I will update our vtk dashboards, this should get rid of _all_ of the red.
Bill Hoffman (manager)
$ cvs commit -m "BUG: fix for bug 4605" FindJNI.cmake
Checking for path: /cvsroot/CMake/CMake/Modules
Unrestricted user: hoffman
/cvsroot/CMake/CMake/Modules/FindJNI.cmake,v <-- FindJNI.cmake
new revision: 1.32; previous revision: 1.31
Sean McBride (reporter)
I updated our 10.4 PPC and 10.4 Intel dashboards with the patched CMake, and now there is no more red in our vtk builds.
I'd say this can be closed, and am closing it. Thanks to all.
|Copyright © 2000 - 2018 MantisBT Team|