[vtkusers] Problem building VTK with Java 1.5 - how to link in libmawt.so?
Jeff Lee
jeff at cdnorthamerica.com
Sun Mar 7 09:10:15 EST 2004
in jdk1.5 (on linux and solaris) there is a choice of whether to use
xawt or old motif toolkit. Xtoolkit is the default, so it should
probably point to /usr/java/j2sdk1.5.0/jre/lib/i386/xawt/libmawt.so. To
get it to go temporarily, you could just put this lib in your
LD_LIBRARY_PATH while building, but there is the bigger issue of how to
put this into cmake. This issue also exists in a solaris build that
needs libmawt.so to resolve other symbols during link.
-Jeff
Jarek Sacha wrote:
> 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
>
> _______________________________________________
> This is the private VTK discussion list. Please keep messages
> on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
More information about the vtkusers
mailing list