[vtkusers] Mac OS X, Java guru needed, please.

Mike Jackson mike.jackson at imts.us
Wed Jan 17 10:51:35 EST 2007


I build VTK 5.0.2 all the time with out any problems on both PPC and  
Intel Macs. For a Plain build of VTK (No Java/Tcl wrapping) I do the  
following:

Carbon ON: This is because I use Qt for GUI front ends and Qt is  
written with Carbon.
Make sure X-Windows is OFF: (Carbon/Cocoa/X are mutually exclusive)
Turn on the advanced mode (using the 'T' key) and make sure that  
nothing is linking against the X-Window libs.

I think those are the only things I check. I build using a couple  
threads (depending on the number of processors/cores) and away I go.

Setting RPATH or On or OFF becomes a deep rooted problem. The basics  
are: If you turn ON rpath then you CAN NOT move any of the built  
products as the paths to each library are HARD CODED in the library  
itself. If you turn OFF rpath then you can do a "make install" which  
will install everything be default into /usr/local/ at which point  
you have to make sure your DYLD_LIBRARY_PATH has /usr/local/lib  
appended to it. If you are building an app to pass out to people then  
you might want to inquire about hacks to CMake to create embedded  
libraries for a .app package.

Also when you do finally get the java wrapping working I believe  
there are lots of other settings that need to be set. There was a  
thread last year where some one actually wrote down all the steps  
necessary to build Vtk with Java on OS X. You might want to start  
searching the archives.

Good Luck.
-- 
Mike Jackson   Senior Research Engineer
Innovative Management & Technology Services


On Jan 17, 2007, at 8:44 AM, Bernard Giroux wrote:

> Kenneth Sloan a écrit :
>> On Jan 16, 2007, at 5:11 PM, David E DeMarle wrote:
>>> It's likely that your CLASSPATH or LD_LIBRARY_PATH (or whatever the
>>> Mac uses to say where shared libs are) is missing the jre's awt lib.
>> OK.  A little research shows that under Mac OS X the  
>> LD_LIBRARY_PATH is called DYLD_LIBRARY_PATH.
>> Alas, I can't find the jre's awt lib.  Java is installed, and I  
>> have many working Java programs that have been built on this  
>> machine.  But...some of the files are hidden away in strange  
>> places (usually involving "Framework"...).  I'm afraid normal *nix  
>> experience doesn't help here - we need a Mac OS X wizard.
>
> Hi Kenneth,
>
> I don't remeber having you problem to build vtk 5 on my ppc OSX  
> system.  Which version of CMake are you using, latest?  Anyway,  
> here's what is found in  my  CMakeCache.txt file (note that I had  
> previously installed java 5 and selected it as default on my  
> system).  Also, I remember I had to turn carbon off and coca on,  
> but I don't know if it still really matters.
>
>
> JAVACOMMAND:FILEPATH=/System/Library/Frameworks/JavaVM.framework/ 
> Versions/1.5/Commands/java
> JAVA_ARCHIVE:FILEPATH=/System/Library/Frameworks/JavaVM.framework/ 
> Versions/1.5/Commands/jar
> JAVA_AWT_INCLUDE_PATH:PATH=/System/Library/Frameworks/ 
> JavaEmbedding.framework/Headers
> JAVA_AWT_LIBRARY:FILEPATH=-framework JavaVM -framework JavaEmbedding
> JAVA_COMPILE:FILEPATH=/System/Library/Frameworks/JavaVM.framework/ 
> Versions/1.5/Commands/javac
> JAVA_INCLUDE_PATH:PATH=/System/Library/Frameworks/JavaVM.framework/ 
> Headers
> JAVA_INCLUDE_PATH2:PATH=/System/Library/Frameworks/JavaVM.framework/ 
> Headers
> JAVA_RUNTIME:FILEPATH=/System/Library/Frameworks/JavaVM.framework/ 
> Versions/1.5/Commands/java
>
> And BTW, I really don't pretend to be any sort of guru...  :-)
>
>
> -- 
> Bernard Giroux, ing., Ph.D.
> Associé de recherche
>
> http://geo.polymtl.ca/~giroux
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/ 
> Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers



-- 
Mike Jackson   Senior Research Engineer
Innovative Management & Technology Services






More information about the vtkusers mailing list