[vtkusers] problem compiling VTK 5.10.0 rc2 on a Mac

David Gobbi david.gobbi at gmail.com
Tue Apr 10 13:20:59 EDT 2012


I tested this a few weeks ago and it worked perfectly.  I started a
fresh build with 5.10rc2 just to be sure.

CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
CMAKE_OSX_ARCHITECTURES:STRING=i386
CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.5
CMAKE_OSX_SYSROOT:PATH=/Developer/SDKs/MacOSX10.5.sdk
CMAKE_USE_CARBON:BOOL=ON

This is gcc 4.2.1, xcode 3.2.6.  It should also be possible to build
with gcc 4.0, though I haven't tried since VTK 5.8.

 - David

On Tue, Apr 10, 2012 at 10:46 AM, A A <azata42 at gmail.com> wrote:
> When I build VTK 5.10.0 rc2 on a mac running OS X 10.6 with the
> default options, it builds fine. But when I set the following:
>
> CMAKE_OSX_DEPLOYMENT_TARGET  = 10.5
> CMAKE_OSX_SYSROOT = /Developer/SDKs/MacOSX10.5.sdk
>
> the following compiler error occurs:
>
> [ 97%] Building CXX object
> Charts/CMakeFiles/vtkCharts.dir/vtkAbstractContextItem.cxx.o
> /Users/test/software/vtk/vtk-5.10.0-rc2/VTK5.10.0.RC2/Charts/vtkAbstractContextItem.cxx:
> In member function ‘virtual vtkAbstractContextItem*
> vtkAbstractContextItem::GetPickedItem(const vtkContextMouseEvent&)’:
> /Users/test/software/vtk/vtk-5.10.0-rc2/VTK5.10.0.RC2/Charts/vtkAbstractContextItem.cxx:166:
> error: no match for ‘operator!=’ in ‘it != std::vector<_Tp,
> _Alloc>::rend() [with _Tp = vtkAbstractContextItem*, _Alloc =
> std::allocator<vtkAbstractContextItem*>]()’
> /Users/test/software/vtk/vtk-5.10.0-rc2/VTK5.10.0.RC2/Common/vtkWeakPointerBase.h:97:
> note: candidates are: bool operator!=(const vtkWeakPointerBase&, const
> vtkWeakPointerBase&)
> /Users/test/software/vtk/vtk-5.10.0-rc2/VTK5.10.0.RC2/Common/vtkWeakPointerBase.h:97:
> note:                 bool operator!=(vtkObjectBase*, const
> vtkWeakPointerBase&)
> /Users/test/software/vtk/vtk-5.10.0-rc2/VTK5.10.0.RC2/Common/vtkWeakPointerBase.h:97:
> note:                 bool operator!=(const vtkWeakPointerBase&,
> vtkObjectBase*)
> make[2]: *** [Charts/CMakeFiles/vtkCharts.dir/vtkAbstractContextItem.cxx.o]
> Error 1
> make[1]: *** [Charts/CMakeFiles/vtkCharts.dir/all] Error 2
> make: *** [all] Error 2
>
> Is there a way to build the new version of vtk on macs running 10.6
> and still support 10.5?



More information about the vtkusers mailing list