[vtkusers] Successful compilation of VTK 5.2.1 and 5.4.2 on Ubuntu 9.10

ebeaudoi at ucalgary.ca ebeaudoi at ucalgary.ca
Mon Jan 18 22:35:19 EST 2010


I ran into many compilation errors trying to compile vtk 5.2.1 and vtk
5.4.2 on Ubuntu 9.10, but finally I got it to work. Here is what I
did. I write this so that it can be used as a step by step tutorial.

First I compiled CMake 2.8.0 from source. It can be downloaded at:
http://www.cmake.org/cmake/resources/software.html

Here is how I installed it:

$ tar -xzf cmake-2.8.0.tar.gz
$ cd cmake-2.8.0
$ ./configure
$ make
$ sudo make install

Then I installed a few packages with Synaptic Package Manager

$ sudo synaptic

I installed this package:
mesa-common-dev
It still did not work, so I installed this package,
xorg-dev
It still did not work, so I installed these packages,
freeglut3
freeglut3-dbg
freeglut3-dev
libgl1-mesa-dev
libglu1-mesa-dev
xlibmesa-gl-dev
It still did not work, so I installed these packages,
libgl1-mesa-dri-dbg (7.6.0-1ubuntu4)
libgl1-mesa-swx11 (7.6.0-1ubuntu4)
libgl1-mesa-swx11-dbg (7.6.0-1ubuntu4)
libgl1-mesa-swx11-dev (7.6.0-1ubuntu4)
libosmesa6 (7.6.0-1ubuntu4)
But choosing these packages made synaptic remove the following
packages (automatically):
freeglut3-dev
libgl1-mesa-dev
libgl1-mesa-glx
libglu1-mesa-dev
nvidia-glx-185
ubuntu-desktop
xlibmesa-gl-dev

It still did not work, so I installed these packages,
libglu1-mesa-dev (7.6.0-1ubuntu4)
libvtk5-dev (5.2.1-10ubuntu1)
libvtk5.2 (5.2.1-10ubuntu1)
vtk-doc (5.2.1-10ubuntu1)
vtk-examples (5.2.1-10ubuntu1)
vtk-tcl (5.2.1-10ubuntu1)
vtkdata (5.2.1-1)

Now this time it worked. I don't know exactly which package were
required, but it works with the packages that I have installed.

Here are the commands I used to actually compile vtk. The same
commands work for both vtk 5.2.1 and vtk 5.4.2.

Download vtk-5.2.1.tar.gz and vtkdata-5.2.1.tar.gz from
http://www.vtk.org/VTK/resources/software.html

Then run the following
$ tar -xzvf vtk-5.2.1.tar.gz
$ tar -xzvf vtkdata-5.2.1.tar.gz
$ cd VTK
$ ccmake .
press c for configure
press c for configure again
press g for generate and exit
$ sudo make

And now vtk is compiled!

According to me it is a bug that we need to run make with sudo, but at
least it works. For more info about this see
http://www.itk.org/Bug/view.php?id=7813

Eric Beaudoin




More information about the vtkusers mailing list