[vtkusers] Problem building VTK with Java 1.5 - how to link in libmawt.so?
Jarek Sacha
jarek at ieee.org
Sat Mar 6 10:22:43 EST 2004
The basic question is how to add a new system library to link to java
wrappers while building VTK?
This is probably a very silly CMake question. (It is very VTK related, I
am not sure if it is a question for VTK or for CMake list.)
I am trying to compile VTK with Java wrappers on Fedora Linux and Java
1.5.0. All the configuration goes fine. During build I am getting an error:
...
Building executable /home/local/src/VTK-build/bin/VTKJavaExecutable...
/usr/bin/ld: warning: libmawt.so, needed by
/usr/java/j2sdk1.5.0/jre/lib/i386/libjawt.so, not found (try using
-rpath or -rpath-link)
/usr/java/j2sdk1.5.0/jre/lib/i386/libjawt.so: undefined reference to
`awt_Unlock at SUNWprivate_1.1'
/usr/java/j2sdk1.5.0/jre/lib/i386/libjawt.so: undefined reference to
`awt_GetComponent at SUNWprivate_1.1'
/usr/java/j2sdk1.5.0/jre/lib/i386/libjawt.so: undefined reference to
`awt_GetDrawingSurface at SUNWprivate_1.1'
/usr/java/j2sdk1.5.0/jre/lib/i386/libjawt.so: undefined reference to
`awt_FreeDrawingSurface at SUNWprivate_1.1'
/usr/java/j2sdk1.5.0/jre/lib/i386/libjawt.so: undefined reference to
`awt_Lock at SUNWprivate_1.1'
collect2: ld returned 1 exit status
make[3]: *** [/home/local/src/VTK-build/bin/VTKJavaExecutable] Error 1
make[2]: *** [default_target] Error 2
make[1]: *** [default_target_Wrapping_Java] Error 2
make: *** [default_target] Error 2
Looks that this version of Java is using a new libmawt.so library. There
are three versions of this library in Java 1.5.0, located in:
/usr/java/j2sdk1.5.0/jre/lib/i386/xawt/libmawt.so
/usr/java/j2sdk1.5.0/jre/lib/i386/headless/libmawt.so
/usr/java/j2sdk1.5.0/jre/lib/i386/motif21/libmawt.so
How to modify VTK/Wrappers/CMakeLists.txt to add linking of Java
wrappers to an additional library? In this case the libmawt.so.
Is there a need to modify any other, for instance ,
VTK/Rendering/CMakeLists.txt?
Thanks,
Jarek
More information about the vtkusers
mailing list