[vtkusers] Compiling VTK for 64-bit on Unix - Java wrappers
Brian Hanna
bdhanna at cmrr.umn.edu
Sun Apr 27 16:03:03 EDT 2008
Hi all,
I'm a VTK and cmake novice. I'm compiling VTK 5.0.4 for 64-bit on RHEL 5
using cmake 2.4.8. I have the 64-bit JDK installed and linked under
/usr/java/latest. (cmake was compiled for 64 bit from source to solve
another problem with TCL wrappers.)
I'd like the java wrappers for VTK. I ran into a small problem when linking:
[ 98%] Built target VTKJava
Linking CXX executable ../../bin/VTKJavaExecutable
/usr/bin/ld: warning: libmawt.so, needed by
/usr/java/latest/jre/lib/amd64/libjawt.so, not found (try using -rpath
or -rpath-link)
/usr/bin/ld: warning: libjvm.so, needed by
/usr/java/latest/jre/lib/amd64/libjawt.so, not found (try using -rpath
or -rpath-link)
The needed libraries are in /usr/java/latest/jre/lib/amd64, under the
xawt and server subdirectories.
A vtkusers mailing list entry from 2005 [1] tells me to add these to
LD_LIBRARY_PATH before make, and that works for me. But isn't there a
place in ccmake where I can specify these libraries without resorting to
LD_LIBRARY_PATH?
For libjvm.so, there appears to be a variable specifically for that:
JAVA_JVM_LIBRARY. I set it to the correct path to the library, but I
still got the link error.
For libmawt.so, there is a variable for awt library: JAVA_AWT_LIBRARY. I
tried adding the additional library onto that, but it didn't work.
Apparently that is only a single library, not a list.
Here's my ccmake variables:
> JAVACOMMAND /usr/bin/java
> JAVA_ARCHIVE /usr/bin/jar
> JAVA_AWT_INCLUDE_PATH /usr/java/latest/bin/../include
> JAVA_AWT_LIBRARY
> /usr/java/latest/jre/lib/amd64/libjawt.so
> JAVA_COMPILE /usr/bin/javac
> JAVA_INCLUDE_PATH /usr/java/latest/bin/../include
> JAVA_INCLUDE_PATH2 /usr/java/latest/bin/../include/linux
> JAVA_JVM_LIBRARY
> /usr/java/latest/jre/lib/amd64/server/libjvm.so
> JAVA_RUNTIME /usr/java/latest/bin/java
What should I be using to get cmake to find xawt/libmawt.so and
server/libjvm.so? Or is this a known problem?
Thanks,
Brian Hanna
CMRR
University of Minnesota
[1] http://www.vtk.org/pipermail/vtkusers/2005-June/080489.html
More information about the vtkusers
mailing list