MantisBT - VTK
View Issue Details
0002932VTK(No Category)public2006-03-02 14:512013-04-05 19:56
Demian Nave 
Will Schroeder 
normalminoralways
closedfixed 
 
 
0002932: vtkMultiThreader.cxx fails to compile on Mac OS/X 10.4.4, XCode 2.2
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
No tags attached.
duplicate of 0003331closed Will Schroeder Replace MPProcessors() to gain improved 64bit compatibility 
Issue History
2007-08-10 08:56David ColeRelationship addedduplicate of 0003331
2007-08-10 08:57David ColeDuplicate ID0 => 3331
2007-08-10 08:57David ColeStatustabled => @80@
2007-08-10 08:57David ColeResolutionopen => fixed
2007-08-10 08:57David ColeNote Added: 0008405
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2013-04-05 19:56Berk GeveciStatuscustomer review => closed

Notes
(0003827)
Demian Nave   
2006-03-02 14:52   
Sorry, I should have made it clear that this applies to the CVS version of VTK, as of today (Mar 2, '06).
(0006509)
Sean McBride   
2007-02-21 11:49   
This is the same as 3331, which I fixed a few weeks ago.
(0008405)
David Cole   
2007-08-10 08:57   
Fixed by Sean McBride when he fixed 3331...