I had several issues compiling pcl with vtk 6.
I have not succeeded yet, but here is what I changed to solve some of the issues:
To resolve the compilation issues follows this [migration guide].(http://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide)
To resolve the linking errors add all vtk libraries to
CMakeLists.txt
in section set(VTK_IO_TARGET_LINK_LIBRARIES ... )
If I'm building released 6.0 using brew install vtk, I am getting this (see solution below)
...
duplicate symbol ___sincospif in:
CMakeFiles/vtktiff.dir/tif_aux.c.o
CMakeFiles/vtktiff.dir/tif_color.c.o
duplicate symbol ___sincospi in:
CMakeFiles/vtktiff.dir/tif_aux.c.o
CMakeFiles/vtktiff.dir/tif_color.c.o
duplicate symbol ___sputc in:
CMakeFiles/vtktiff.dir/tif_aux.c.o
CMakeFiles/vtktiff.dir/tif_extension.c.o
duplicate symbol ___sputc in:
CMakeFiles/vtktiff.dir/tif_aux.c.o
CMakeFiles/vtktiff.dir/tif_unix.c.o
ld: 91 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libvtktiff-6.0.1.dylib] Error 1
make[1]: *** [ThirdParty/tiff/vtktiff/CMakeFiles/vtktiff.dir/all] Error 2
If you know how to resolve this please let me know.
*EDITED
The best solution to build VTK and PCL is to go back to VTK ver 5.10.
Simply do
1) cd /usr/local/Library/Taps/homebrew-science/
2) brew versions vtk
3) git checkout 27a4327 vtk.rb
4) brew uninstall vtk && brew install vtk
I have lots of problems rebuilding hydro too. One hint, try to run brew install for all necessary libraries and programs. I basically had to almost rebuild everything. The problem now is how to build vtk and pcl.
Did you run brew upgrade ? Or did you remove stuff from brew and reinstalled them?
I think you need to relink everything, I haven't updated yet, but I have heard that `libc++` is now the default rather than `libstdc++`, which is likely to cause problems (I have not confirmed that). If you run into specific compile errors like with KDL, I would suggest filing tickets directly against them.
That's re-linkedit, not `brew link`.
What do you mean relink everything? I mean I understand, but how do I do that?
I think the easiest way is to uninstall and reinstall.
I was afraid you'd say that :(, I will give it a shot
William is right about libstdc++, that was the issue. I did brew uninstall and then brew install for most of the packages. William have you updated hombrew pcl? As far as I remember your formula was pulling binaries? Now it has to be compiled :(