[Vv] VV : A recently tested and working build
Matthieu Dondey
m.dondey at gmail.com
Mon Apr 18 17:16:26 CEST 2016
Dear VV users,
I want to thank every person that has helped me finally build VV properly
on my workstation by sharing my experience, the problems I came across and
how they were solved.
The build I describe here is still a development version build using new
VTK and ITK versions but it's working fine for me (and I had problem
installing the older versions ^^). This said, a little bird told me that a
new release should be expected soon enough.
*Build versions*
I'm working on a Ubuntu 14.04.1 computer and Qt5 was already installed so
what was left to do was to install :
VTK → ITK → VV
Versions of the installed packages :
- VTK 7.0.0 → *VTK-7.0.0.tar.gz
<http://www.vtk.org/files/release/7.0/VTK-7.0.0.tar.gz>*
- ITK 4.9.1 → *InsightToolkit-4.9.1.tar.gz (hosted at Sourceforge)*
<http://sourceforge.net/projects/itk/files/itk/4.9/InsightToolkit-4.9.1.tar.gz/download>
- VV new version available on git and compatible with VTK>6 and Qt5 →
snapshot
<https://git.creatis.insa-lyon.fr/pubgit/?p=clitk.git;a=snapshot;h=refs/heads/VTK6_Qt5;sf=tgz>
(the VV tarball is called “clitk-VTK6_Qt5-8a0e0dd.tar.gz” but it is
actually the VV archived source folder)
And : gcc 4.8.2 / g++ 4.8.2 / cmake 2.8.12.2
In case you're missing g++, gcc or cmake you can find them on repositories :
sudo apt-cache search ThePackageYoureLookingFor,
sudo apt-get install TheExactNameOfThePackageYouWantToInstall
For VTK, ITK and VV you have to install them from the source (links
provided above).
*first, VTK **build and install** :*
- Create a folder locally for instance : home/myPrograms/VTK
- Put your tarball *VTK-7.0.0.tar.gz
<http://www.vtk.org/files/release/7.0/VTK-7.0.0.tar.gz> * in this folder
and extract it the source folder contained inside by typing the command
> tar xvf VTK-7.0.0.tar.gz
- create a VTK-build folder along the source folder that you just extracted
(> mkdir VTK-build)
- go in your freshly created VTK-build folder (cd VTK-build)
- and start the build with cmake : > sudo ccmake ../VTK-7.0.0 (
../VTK-7.0.0 is the relative path to the source folder that you've just
extracted and that you are going to build)
This is the window you should have :
[image: Images intégrées 1]
Be sure to have the following build options set-up :
- CMAKE_BUILD_TYPE : Release
- BUILD_SHARED_LIBS : on
- VTK_Group_Qt : on
- VTK_QT_VERSION : 5
- VTK_RENDERING_BACKEND OpenGL (be careful not to have OpenGL2)
And to have all the paths for Qt correctly linked (you shouldn't have
« dir_not_found »)
Note for using cmake : to edit a configuration option, move towards it
using the up and down keyboard arrows, press enter to edit and enter again
to validate then « c » to configure.
After each configuration (« c »), new options can be available and if so,
they will show up at the top of all the options. Make sure that you're
happy with them before going on. Once everything is set as you wish, press
« g » to generate.
Once you've pressed « g » you'll see that a bunch of files have been
generated in your build folder.
The next step is to build :
> sudo make -j”number of cores” → sudo make -j4 if you have a quad core cpu
The terminal command on ubuntu to know the number of cores you have on your
computer is
> nproc or > lscpu if you want more information.
Once the build is over (100%) and hopefully with no errors, all that's left
to do is to install:
> sudo make install
That's it, VTK is now installed :)
*Now, on to ITK :* the building / installing procedure is the same as for
VTK
- Create a folder locally for instance : home/myPrograms/ITK
- Put your tarball *InsightToolkit-4.9.1.tar.gz*
<http://sourceforge.net/projects/itk/files/itk/4.9/InsightToolkit-4.9.1.tar.gz/download>
in
this folder and extract it the source folder contained inside by typing the
command
> tar xvf InsightToolkit-4.9.1.tar.gz
- create a ITK-build folder along the source folder that you just extracted
(> mkdir ITK-build)
- go in your freshly created ITK-build folder (cd ITK-build)
- and start the build with cmake : > sudo ccmake ../InsightToolkit-4.9.1(../
InsightToolkit-4.9.1 is the relative path to the source folder that you've
just extracted and that you are going to build)
This is the window you should have :
[image: Images intégrées 2]
Be sure to have the following build options set-up :
- BUILD_SHARED_LIBS : on
- VTK_DIR : your path to your VTK directory (mine was
/usr/local/lib/cmake/vtk-7.0)
- module_itk_review : on (you need to press “t” to go into advanced mode to
have access to this)
- module_ITKVTKGlue : on (you need to press “t” to go into advanced mode to
have access to this)
Once everything is set, generate with “g” and build with:
> sudo make -j”number of cores”
Then install : > sudo make install
*And finally, building and installing VV* :
- Create a folder locally for instance : home/myPrograms/VV
- Put your tarball *clitk-VTK6_Qt5-8a0e0dd.tar.gz
<https://git.creatis.insa-lyon.fr/pubgit/?p=clitk.git;a=snapshot;h=refs/heads/VTK6_Qt5;sf=tgz>*
in
this folder and extract it the source folder contained inside by typing the
command
> tar xvf clitk-VTK6_Qt5-8a0e0dd.tar.gz
- create a VV-build folder along the source folder that you just extracted
(> mkdir VV-build)
- go in your freshly created VV-build folder (cd VV-build)
- and start the build with cmake : > sudo ccmake ../clitk-VTK6_Qt5-8a0e0dd/
(../clitk-VTK6_Qt5-8a0e0dd/ is the relative path to the source folder that
you've just extracted and that you are going to build)
This is the window you should have :
[image: Images intégrées 3]
Be sure to have the following build option set-up :
- ITK_DIR : your path to your ITK directory (mine was
/usr/local/lib/cmake/ITK-4.9)
and all your paths to Qt directories
Note : I had an error with a source file used for a function in VV that
gives you information on your memory consumption when I tried to build with
this configuration.
make[2]: ***
[tools/CMakeFiles/clitkCropImageLib.dir/clitkCropImageGenericFilter.cxx.o]
Erreur 1
>
> make[1]: *** [tools/CMakeFiles/clitkCropImageLib.dir/all] Erreur 2
>
> /home/myplace/mesProgs/vv/vv-src/common/clitkMemoryUsage.cxx:48:38: error:
> cannot convert ?int*? to ?size_t* {aka long unsigned int*}? for argument
> ?1? to ?sg_process_stats* sg_get_process_stats(size_t*)? make[2]: ***
> [common/CMakeFiles/clitkCommon.dir/clitkMemoryUsage.cxx.o] Erreur 1
>
> make[1]: *** [common/CMakeFiles/clitkCommon.dir/all] Erreur 2
>
> and it stops at around 28 % with
>
> Linking CXX static library ../lib/libclitkAffineRegistrationLib.a
>
> [ 28%] Built target clitkAffineRegistrationLib
As the memory information wasn't vital for me and as it is optional, I was
able to get rid of this error by setting it off doing : (after generating
the build options (“g”) and before the actual build)
> cmake -DCLITK_MEMORY_INFO=OFF ../clitk-VTK6_Qt5-8a0e0dd
Then build : > sudo make -j”number of cores”
Then install : > sudo make install
That's it : you should now have a working vv installation and should be
able to start it by typing the command > vv
If you had any errors while building any of the 3 softwares, make sure to
“clean” all your directories by removing files that have been created
before rebuilding (for instance in /usr/)
A good way to search for a possible origin of the error is to :
- read the error (no kidding :)
- look for linking problems or missing libraries when you're setting up
your build options with ccmake. (look for “dir_not_found”)
That's all folks, I hope this is useful for other person like me that have
been struggling to install VV.
Cheers.
Matthieu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.creatis.insa-lyon.fr/pipermail/vv/attachments/20160418/e8a66985/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 2400978 bytes
Desc: not available
URL: <http://www.creatis.insa-lyon.fr/pipermail/vv/attachments/20160418/e8a66985/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 1625791 bytes
Desc: not available
URL: <http://www.creatis.insa-lyon.fr/pipermail/vv/attachments/20160418/e8a66985/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 2899809 bytes
Desc: not available
URL: <http://www.creatis.insa-lyon.fr/pipermail/vv/attachments/20160418/e8a66985/attachment-0005.png>
More information about the vv
mailing list