vtkMultiThreader.cxx fails to compile on Mac OS/X 10.4.4, XCode 2.2
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
vtkMultiThreader.cxx will not compile in 64-bit mode on OS/X 10.4.4, as it includes Carbon.h. The Carbon frameworks are not available in 64-bit mode, causing a required macro (TARGET_CPU_PPC) to not be defined. This results in a number of other critical macros from being defined (CALLBACK_API_C in particular), thus resulting in a compile error in vtkMultiThreader.cxx.
A simple change to gate the include of Carbon.h, and to gate the call of the Carbon function, MPProcessors(), seems to work fine, since 10.4.4 has pthreads and sysconf() available. Instead of
#ifdef _APPLE
I was able to build with
#if defined(APPLE) && !defined(VTK_USE_PTHREADS)
assuming CMAKE_USE_PTHREADS is defined. A more robust solution is needed, though, since VTK_USE_PTHREADS need not be defined in general.
Thanks, Demian