[vtkusers] compiling VTK on linux

David Gobbi david.gobbi at gmail.com
Fri Apr 18 12:36:49 EDT 2008


All of those java library and header items must be set or the compile will fail.

E.g. for awt, give the full path to "libjawt.so".

You'll just have to search through your java installation to find each
item.  On Ubuntu, /usr/lib/jvm is where to start looking.

I don't know of any documentation on this.

   David



On Fri, Apr 18, 2008 at 12:27 PM, Liam K <quantum.leaf at googlemail.com> wrote:
> so close....
>
> [ 97%] Building CXX object
> Wrapping/Java/CMakeFiles/VTKJavaExecutable.dir/VTKJava.o
> Linking CXX executable ../../bin/VTKJavaExecutable
> /usr/local/VTK/bin/libvtkRenderingJava.so: undefined reference to
> `JAWT_GetAWT'
>  collect2: ld returned 1 exit status
> make[2]: *** [bin/VTKJavaExecutable] Error 1
> make[1]: *** [Wrapping/Java/CMakeFiles/VTKJavaExecutable.dir/all] Error 2
> make: *** [all] Error 2
>
> i'm wondering if this is to due with the cmake option JAVA_AWT_LIBRARY not
> being set. I'm sure ive got it somewhere in the jdk but i'm not sure what
> the option once. Is there documentation somewhere which says what each
> option needs to point to?
>
>
> Liam
>
>
> ps:> i mean to send the msg below to the whole list, but just hit reply
> without thinking:
>
>
> On Fri, Apr 18, 2008 at 5:20 PM, Liam K <quantum.leaf at googlemail.com> wrote:
>
> > Thanks David,
> >
> > So far so good. It's compiling at 50%.
> > Seems the problem was some missing packages.
> >
> > I'd like to know how i was supposed to know i would need them, I wonder if
> i've missed a key bit of documentation. Isnt it cmakes job to make sure
> everything is available before make starts?
> >
> > anyway, hopefully it's working now,
> >
> > thanks for your help,
> >
> > Liam
> >
> >
> >
> >
> >
> >
> > On Fri, Apr 18, 2008 at 4:50 PM, David Gobbi <david.gobbi at gmail.com>
> wrote:
> >
> > > You should not need any special compiler flags.  It is more likely
> > > that you are missing some important dev packages.  I have ubuntu 6.06,
> > > so the version numbers might be different for you, but make sure you
> > > have these or the equivalents:
> > >
> > > libstdc++6-4.0-dev
> > > libc6-dev
> > > libX11-dev
> > > libgl1-mesa-dev
> > > libglu1-mesa-dev
> > > tcl8.4-dev
> > > tk8.4-dev
> > > sun-java6-jdk
> > >
> > > After installing these you should delete your old CMakeCache.txt (or
> > > even the whole VTK binary directory, to be safe) so that the cmake
> > > autodetection will properly catch all the header files that VTK uses.
> > >
> > > Note that when you get to the java stage, cmake will not automatically
> > > find the java headers or libraries.  You will have to enter all the
> > > java related CMake flags manually under "advanced"
> > >
> > >   David
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > On Fri, Apr 18, 2008 at 11:29 AM, Liam K <quantum.leaf at googlemail.com>
> wrote:
> > > > (sorry for previous blank post)
> > > >
> > > >
> > > > Hi,
> > > >
> > > > Thanks for the replies.
> > > >
> > > > Indeed, i am hoping to use VTK with the java wrappers, but at the
> moment the
> > > > problem i'm having is compiling the binaries. I get the same errors
> even if
> > > > i disable to java wrapper option in cmake.
> > > >  I'm sure this must be a compiler flag option or something similar...
> > > >
> > > > Liam
> > > >
> > > >
> > > >
> > > > On Fri, Apr 18, 2008 at 4:28 PM, Liam K <quantum.leaf at googlemail.com>
> wrote:
> > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > On Fri, Apr 18, 2008 at 3:17 PM, David Gobbi <david.gobbi at gmail.com>
> > > > wrote:
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > > AFAIK the debian distribution of VTK does not come with java
> support,
> > > > > > so switching away from Ubuntu is not going to help Liam at all.
> > > > > >
> > > > > > Ubuntu may not come with VTK binaries, but it has all of the VTK
> > > > > > dependencies.  Liam will have to install all of the sun-java6
> packages
> > > > > > as well as cmake and the dev packages for tcl, tk, etc. but the
> > > > > > process should be straightforward once all the dev packages are
> there.
> > > > > >
> > > > > > Anyone out there with experience specifically in installing
> VTK-java
> > > > > > on ubuntu?  The last time that I did it was a couple years ago, so
> I'm
> > > > > > a little rusty.
> > > > > >
> > > > > >   David
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Fri, Apr 18, 2008 at 10:00 AM, Oleksandr Dzyubak
> <adzyubak at gmail.com>
> > > > wrote:
> > > > > > > Hi Liam,
> > > > > > >
> > > > > > >  Ubuntu is based on and derived from Debian.
> > > > > > >  Since you are using Ubuntu anyway,  I would recommend you
> > > > > > >  to install Debian Lenny on your Linux box.
> > > > > > >  Lenny has Cmake, Make, ITK,  VTK,  wxWidgets, FLTK, QT(3/4),
> Perl,
> > > > Tcl/Tk
> > > > > > >  and all what you might need for your development in their
> repository
> > > > as
> > > > > > >  binary pre-built packages thus it works right out of the box.
> > > > > > >  Since you are Ubuntu (meaning Debian) user
> > > > > > >  you know how to install needed packages and satisfy all
> dependencies.
> > > > > > >
> > > > > > >  The good thing is that if you do that, it will save you a lot
> of time
> > > > and
> > > > > > > efforts
> > > > > > >  you might spent on first compiling the distribution packages
> > > > themselves,
> > > > > > >  latter examples, and finally "dependency hell" when you will
> start
> > > > > > >  "putting all together" in your own application.
> > > > > > >
> > > > > > >  Hope it helps,
> > > > > > >
> > > > > > >  Alex
> > > > > > >
> > > > > > >
> > > > > > >  Liam K wrote:
> > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > I'm looking for some help in compiling VTK+. I'm hoping to use
> it
> > > > with the
> > > > > > > java wrapping for a medical data visualisation project.
> > > > > > > >
> > > > > > > > I'm finding just compiling VTK on my linux box (ubuntu) to be
> much
> > > > more
> > > > > > > difficult than i expect.
> > > > > > > > So far i have install cmake and set various option and
> generated the
> > > > make
> > > > > > > file.
> > > > > > > >
> > > > > > > > When I run the make file however i get:
> > > > > > > >
> > > > > > > > zoizoi at mangoNupheus:/usr/local/VTK$ make
> > > > > > > > [  0%] Built target vtkParseJava
> > > > > > > > [  0%] Built target vtkWrapJava
> > > > > > > > [  0%] Built target vtksys
> > > > > > > > [  0%] Building CXX object
> > > > > > > Common/CMakeFiles/vtkCommon.dir/vtkDataArraySelection.o
> > > > > > > > /usr/local/VTK/Common/vtkDataArraySelection.cxx:27: error: ISO
> C++
> > > > forbids
> > > > > > > declaration of 'vector' with no type
> > > > > > > > /usr/local/VTK/Common/vtkDataArraySelection.cxx:27: error:
> invalid
> > > > use of
> > > > > > > '::'
> > > > > > > > /usr/local/VTK/Common/vtkDataArraySelection.cxx:27: error:
> expected
> > > > ';'
> > > > > > > before '<' token
> > > > > > > >
> > > > > > > > ...and then a long long list of errors which it's probably not
> worth
> > > > > > > posting. This is VTK 5.0.4
> > > > > > > >
> > > > > > > > i have no idea what's causing this as my knowledge of C++ is
> pretty
> > > > > > > limited. Is there some configure option i need to set to get the
> > > > compiler to
> > > > > > > be less stringent or something?
> > > > > > > >
> > > > > > > > hope someone can help as i need to get working on this project
> asap.
> > > > > > > >
> > > > > > > > Liam
> > > > > > > >
> > > > > > > >
> > > >
> ------------------------------------------------------------------------
> > > > > > > >
> > > > > > > > _______________________________________________
> > > > > > > > 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
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >  _______________________________________________
> > > > > > >  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
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > _______________________________________________
> > > >  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
> > > >
> > > >
> > >
> >
> >
>
>
> _______________________________________________
>  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
>
>



More information about the vtkusers mailing list