[vtkusers] Switching backends wrecks VTK install folder
Chungzuwalla
richard at research.canon.com.au
Wed Feb 10 20:01:27 EST 2016
This is really a trap for new players.
I've been trying to build PCL 1.8 with VTK 7.0.0, using the instructions at:
http://pointclouds.org/documentation/tutorials/compiling_pcl_windows.php
My target is Visual Studio 2015.
I was able to configure, generate, build and install VTK 7.0.0 without
errors. When building PCL I got errors that led me to this post:
http://www.pcl-users.org/Building-PCL-1-8-0-issue-vtkgl-missing-td4040453.html
indicating that PCL does not support VTK with the default OpenGL2 backend.
I followed the instructions there to rebuild VTK (in a new CMake build
folder) and reinstall it.
However, things got weird when building PCL. I was getting compiler errors
(missing methods in classes etc) which were finally traced to the fact it
was still trying to include VTK OpenGL2 headers, and linker errors for
nonexistent libraries such as (the suspiciously OpenGL2-sounding)
"vtkDomainsChemistryOpenGL2.lib".
I have no prior experience with CMake, PCL or VTK, and spent a couple of
entire days working exclusively on this problem, fiddling with CMake config
files, deleting CMake caches and doing clean rebuilds of VTK and PCL several
times with different settings (an hour or so of compiler time for each).
To cut a long story short, the problem is that VTKConfig.cmake uses file
globbing to find all modules that have ever been installed in the VTK
install dir (C:\Program Files (x86)\VTK in my case), and if the dependent
software (PCL in my case) does not request specific modules using
VTK_MODULES_REQUESTED, it attempts to use all of them. As soon as I
installed the default backend, switched backends (as a result of the
abovementioned errors) and installed that too, I was utterly screwed --
nothing I did was going to work, until I thought to search for the VTK
install dir and manually delete it. The compiler errors I expect were
caused by multiple identically-named includes on the search path, for both
OpenGL and OpenGL2 backends (I didn't investigate this further). Once I
manually deleted the install dir, then rebuilt and installed VTK with the
OpenGL backend, the PCL build went without a hitch.
So I guess the question is, does this indicate a problem with the VTK CMake
system?
Perhaps it could at least check the installation folder for conflicting
modules and issue a warning?
Thanks in advance...
--
View this message in context: http://vtk.1045678.n5.nabble.com/Switching-backends-wrecks-VTK-install-folder-tp5736530.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list