i found it.<br><br>Linking CXX executable ../../bin/VTKJavaExecutable<br>/usr/bin/ld: warning: libmawt.so, needed by /usr/lib/jvm/java-6-sun/jre/lib/i386/libjawt.so, not found (try using -rpath or -rpath-link)<br>/usr/lib/jvm/java-6-sun/jre/lib/i386/libjawt.so: undefined reference to `awt_GetDrawingSurface@SUNWprivate_1.1'<br>
/usr/lib/jvm/java-6-sun/jre/lib/i386/libjawt.so: undefined reference to `awt_FreeDrawingSurface@SUNWprivate_1.1'<br>/usr/lib/jvm/java-6-sun/jre/lib/i386/libjawt.so: undefined reference to `awt_GetComponent@SUNWprivate_1.1'<br>
/usr/lib/jvm/java-6-sun/jre/lib/i386/libjawt.so: undefined reference to `awt_Lock@SUNWprivate_1.1'<br>/usr/lib/jvm/java-6-sun/jre/lib/i386/libjawt.so: undefined reference to `awt_Unlock@SUNWprivate_1.1'<br>collect2: ld returned 1 exit status<br>
make[2]: *** [bin/VTKJavaExecutable] Error 1<br>make[1]: *** [Wrapping/Java/CMakeFiles/VTKJavaExecutable.dir/all] Error 2<br>make: *** [all] Error 2<br><br>seems i'm not the first person to get here:<br>this guy: <a href="http://public.kitware.com/pipermail/vtkusers/2003-November/070622.html">http://public.kitware.com/pipermail/vtkusers/2003-November/070622.html</a> <br>
had the same problem but not sure if he ever fixed it. <br><br>I dont know why make can't find libmawt.so it's there in the motif21 sub-dir. Though ii seemed a bit dodgy i copied that .so up one dir so it was in the same ../jre/lib dir as libjawt.so and:<br>
<br>[100%] Building CXX object Widgets/Testing/Cxx/CMakeFiles/WidgetsCxxTests.dir/TestImageTracerWidget.o <br>Linking CXX executable ../../../bin/WidgetsCxxTests<br>[100%] Built target WidgetsCxxTests<br><br>great!!!<br><br>
i wonder why libmawt wasn't found. There was a JAVA_JVM_LIBRARY option that wasn't set... maybe it was to do with that... i'm not everyone who tries to compile vtk on linux has this problem. <br><br>well, i never imagined it would take day to compile vtk but hey now i can start using it.<br>
<br>thanks for you help.<br><br><br>If anyone has any good references for using the java wrapper people let me know,<br><br>Liam<br><br><br><br><br><br><br><br><br><div class="gmail_quote">On Fri, Apr 18, 2008 at 5:36 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">All of those java library and header items must be set or the compile will fail.<br>
<br>
E.g. for awt, give the full path to "libjawt.so".<br>
<br>
You'll just have to search through your java installation to find each<br>
item. On Ubuntu, /usr/lib/jvm is where to start looking.<br>
<br>
I don't know of any documentation on this.<br>
<font color="#888888"><br>
David<br>
</font><div><div></div><div class="Wj3C7c"><br>
<br>
<br>
On Fri, Apr 18, 2008 at 12:27 PM, Liam K <<a href="mailto:quantum.leaf@googlemail.com">quantum.leaf@googlemail.com</a>> wrote:<br>
> so close....<br>
><br>
> [ 97%] Building CXX object<br>
> Wrapping/Java/CMakeFiles/VTKJavaExecutable.dir/VTKJava.o<br>
> Linking CXX executable ../../bin/VTKJavaExecutable<br>
> /usr/local/VTK/bin/libvtkRenderingJava.so: undefined reference to<br>
> `JAWT_GetAWT'<br>
> collect2: ld returned 1 exit status<br>
> make[2]: *** [bin/VTKJavaExecutable] Error 1<br>
> make[1]: *** [Wrapping/Java/CMakeFiles/VTKJavaExecutable.dir/all] Error 2<br>
> make: *** [all] Error 2<br>
><br>
> i'm wondering if this is to due with the cmake option JAVA_AWT_LIBRARY not<br>
> being set. I'm sure ive got it somewhere in the jdk but i'm not sure what<br>
> the option once. Is there documentation somewhere which says what each<br>
> option needs to point to?<br>
><br>
><br>
> Liam<br>
><br>
><br>
> ps:> i mean to send the msg below to the whole list, but just hit reply<br>
> without thinking:<br>
><br>
><br>
> On Fri, Apr 18, 2008 at 5:20 PM, Liam K <<a href="mailto:quantum.leaf@googlemail.com">quantum.leaf@googlemail.com</a>> wrote:<br>
><br>
> > Thanks David,<br>
> ><br>
> > So far so good. It's compiling at 50%.<br>
> > Seems the problem was some missing packages.<br>
> ><br>
> > I'd like to know how i was supposed to know i would need them, I wonder if<br>
> i've missed a key bit of documentation. Isnt it cmakes job to make sure<br>
> everything is available before make starts?<br>
> ><br>
> > anyway, hopefully it's working now,<br>
> ><br>
> > thanks for your help,<br>
> ><br>
> > Liam<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > On Fri, Apr 18, 2008 at 4:50 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>><br>
> wrote:<br>
> ><br>
> > > You should not need any special compiler flags. It is more likely<br>
> > > that you are missing some important dev packages. I have ubuntu 6.06,<br>
> > > so the version numbers might be different for you, but make sure you<br>
> > > have these or the equivalents:<br>
> > ><br>
> > > libstdc++6-4.0-dev<br>
> > > libc6-dev<br>
> > > libX11-dev<br>
> > > libgl1-mesa-dev<br>
> > > libglu1-mesa-dev<br>
> > > tcl8.4-dev<br>
> > > tk8.4-dev<br>
> > > sun-java6-jdk<br>
> > ><br>
> > > After installing these you should delete your old CMakeCache.txt (or<br>
> > > even the whole VTK binary directory, to be safe) so that the cmake<br>
> > > autodetection will properly catch all the header files that VTK uses.<br>
> > ><br>
> > > Note that when you get to the java stage, cmake will not automatically<br>
> > > find the java headers or libraries. You will have to enter all the<br>
> > > java related CMake flags manually under "advanced"<br>
> > ><br>
> > > David<br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > On Fri, Apr 18, 2008 at 11:29 AM, Liam K <<a href="mailto:quantum.leaf@googlemail.com">quantum.leaf@googlemail.com</a>><br>
> wrote:<br>
> > > > (sorry for previous blank post)<br>
> > > ><br>
> > > ><br>
> > > > Hi,<br>
> > > ><br>
> > > > Thanks for the replies.<br>
> > > ><br>
> > > > Indeed, i am hoping to use VTK with the java wrappers, but at the<br>
> moment the<br>
> > > > problem i'm having is compiling the binaries. I get the same errors<br>
> even if<br>
> > > > i disable to java wrapper option in cmake.<br>
> > > > I'm sure this must be a compiler flag option or something similar...<br>
> > > ><br>
> > > > Liam<br>
> > > ><br>
> > > ><br>
> > > ><br>
> > > > On Fri, Apr 18, 2008 at 4:28 PM, Liam K <<a href="mailto:quantum.leaf@googlemail.com">quantum.leaf@googlemail.com</a>><br>
> wrote:<br>
> > > ><br>
> > > > ><br>
> > > > ><br>
> > > > ><br>
> > > > ><br>
> > > > > On Fri, Apr 18, 2008 at 3:17 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>><br>
> > > > wrote:<br>
> > > > ><br>
> > > > ><br>
> > > > ><br>
> > > > ><br>
> > > > > > AFAIK the debian distribution of VTK does not come with java<br>
> support,<br>
> > > > > > so switching away from Ubuntu is not going to help Liam at all.<br>
> > > > > ><br>
> > > > > > Ubuntu may not come with VTK binaries, but it has all of the VTK<br>
> > > > > > dependencies. Liam will have to install all of the sun-java6<br>
> packages<br>
> > > > > > as well as cmake and the dev packages for tcl, tk, etc. but the<br>
> > > > > > process should be straightforward once all the dev packages are<br>
> there.<br>
> > > > > ><br>
> > > > > > Anyone out there with experience specifically in installing<br>
> VTK-java<br>
> > > > > > on ubuntu? The last time that I did it was a couple years ago, so<br>
> I'm<br>
> > > > > > a little rusty.<br>
> > > > > ><br>
> > > > > > David<br>
> > > > > ><br>
> > > > > ><br>
> > > > > ><br>
> > > > > ><br>
> > > > > ><br>
> > > > > > On Fri, Apr 18, 2008 at 10:00 AM, Oleksandr Dzyubak<br>
> <<a href="mailto:adzyubak@gmail.com">adzyubak@gmail.com</a>><br>
> > > > wrote:<br>
> > > > > > > Hi Liam,<br>
> > > > > > ><br>
> > > > > > > Ubuntu is based on and derived from Debian.<br>
> > > > > > > Since you are using Ubuntu anyway, I would recommend you<br>
> > > > > > > to install Debian Lenny on your Linux box.<br>
> > > > > > > Lenny has Cmake, Make, ITK, VTK, wxWidgets, FLTK, QT(3/4),<br>
> Perl,<br>
> > > > Tcl/Tk<br>
> > > > > > > and all what you might need for your development in their<br>
> repository<br>
> > > > as<br>
> > > > > > > binary pre-built packages thus it works right out of the box.<br>
> > > > > > > Since you are Ubuntu (meaning Debian) user<br>
> > > > > > > you know how to install needed packages and satisfy all<br>
> dependencies.<br>
> > > > > > ><br>
> > > > > > > The good thing is that if you do that, it will save you a lot<br>
> of time<br>
> > > > and<br>
> > > > > > > efforts<br>
> > > > > > > you might spent on first compiling the distribution packages<br>
> > > > themselves,<br>
> > > > > > > latter examples, and finally "dependency hell" when you will<br>
> start<br>
> > > > > > > "putting all together" in your own application.<br>
> > > > > > ><br>
> > > > > > > Hope it helps,<br>
> > > > > > ><br>
> > > > > > > Alex<br>
> > > > > > ><br>
> > > > > > ><br>
> > > > > > > Liam K wrote:<br>
> > > > > > ><br>
> > > > > > > ><br>
> > > > > > > ><br>
> > > > > > > ><br>
> > > > > > > > Hi,<br>
> > > > > > > ><br>
> > > > > > > > I'm looking for some help in compiling VTK+. I'm hoping to use<br>
> it<br>
> > > > with the<br>
> > > > > > > java wrapping for a medical data visualisation project.<br>
> > > > > > > ><br>
> > > > > > > > I'm finding just compiling VTK on my linux box (ubuntu) to be<br>
> much<br>
> > > > more<br>
> > > > > > > difficult than i expect.<br>
> > > > > > > > So far i have install cmake and set various option and<br>
> generated the<br>
> > > > make<br>
> > > > > > > file.<br>
> > > > > > > ><br>
> > > > > > > > When I run the make file however i get:<br>
> > > > > > > ><br>
> > > > > > > > zoizoi@mangoNupheus:/usr/local/VTK$ make<br>
> > > > > > > > [ 0%] Built target vtkParseJava<br>
> > > > > > > > [ 0%] Built target vtkWrapJava<br>
> > > > > > > > [ 0%] Built target vtksys<br>
> > > > > > > > [ 0%] Building CXX object<br>
> > > > > > > Common/CMakeFiles/vtkCommon.dir/vtkDataArraySelection.o<br>
> > > > > > > > /usr/local/VTK/Common/vtkDataArraySelection.cxx:27: error: ISO<br>
> C++<br>
> > > > forbids<br>
> > > > > > > declaration of 'vector' with no type<br>
> > > > > > > > /usr/local/VTK/Common/vtkDataArraySelection.cxx:27: error:<br>
> invalid<br>
> > > > use of<br>
> > > > > > > '::'<br>
> > > > > > > > /usr/local/VTK/Common/vtkDataArraySelection.cxx:27: error:<br>
> expected<br>
> > > > ';'<br>
> > > > > > > before '<' token<br>
> > > > > > > ><br>
> > > > > > > > ...and then a long long list of errors which it's probably not<br>
> worth<br>
> > > > > > > posting. This is VTK 5.0.4<br>
> > > > > > > ><br>
> > > > > > > > i have no idea what's causing this as my knowledge of C++ is<br>
> pretty<br>
> > > > > > > limited. Is there some configure option i need to set to get the<br>
> > > > compiler to<br>
> > > > > > > be less stringent or something?<br>
> > > > > > > ><br>
> > > > > > > > hope someone can help as i need to get working on this project<br>
> asap.<br>
> > > > > > > ><br>
> > > > > > > > Liam<br>
> > > > > > > ><br>
> > > > > > > ><br>
> > > ><br>
> ------------------------------------------------------------------------<br>
> > > > > > > ><br>
> > > > > > > > _______________________________________________<br>
> > > > > > > > This is the private VTK discussion list.<br>
> > > > > > > > Please keep messages on-topic. Check the FAQ at:<br>
> > > > > > > <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
> > > > > > > > Follow this link to subscribe/unsubscribe:<br>
> > > > > > > > <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
> > > > > > > ><br>
> > > > > > > ><br>
> > > > > > ><br>
> > > > > > > _______________________________________________<br>
> > > > > > > This is the private VTK discussion list.<br>
> > > > > > > Please keep messages on-topic. Check the FAQ at:<br>
> > > > > > > <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
> > > > > > > Follow this link to subscribe/unsubscribe:<br>
> > > > > > > <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
> > > > > > ><br>
> > > > > ><br>
> > > > ><br>
> > > > ><br>
> > > ><br>
> > > ><br>
> > > > _______________________________________________<br>
> > > > This is the private VTK discussion list.<br>
> > > > Please keep messages on-topic. Check the FAQ at:<br>
> > > > <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
> > > > Follow this link to subscribe/unsubscribe:<br>
> > > > <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
> > > ><br>
> > > ><br>
> > ><br>
> ><br>
> ><br>
><br>
><br>
> _______________________________________________<br>
> This is the private VTK discussion list.<br>
> Please keep messages on-topic. Check the FAQ at:<br>
> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
><br>
</div></div></blockquote></div><br>