[vtkusers] Problems building VTK with Python Wrappings and Carbon on Mac OSX Darwin 7.9.0

Jens Thomas j.m.h.thomas at dl.ac.uk
Mon Jul 10 08:37:20 EDT 2006


Hi,

I'd just thought I'd share my experiences of building VTK 5 from a CVS 
checkout on a Powerbook G4 on Mac OS X 10.3.9 Darwin 7.9.0, as I hit a 
problem that doesn't appear to have been mentioned before in the email 
archives.

I configured the build to include the Tk/Python Wrappings, and the build 
failed with the following error message:

Building object file vtkCarbonRenderWindowInteractorPython.o...
c++ -o vtkCarbonRenderWindowInteractorPython.o 
-DvtkRenderingPythonD_EXPORTS   -Wno-deprecated -no-cpp-precomp -fPIC  
-I.. -I../Utilities -I../VolumeRendering -I../Rendering 
-I../../VTK/VolumeRendering -I../../VTK/Hybrid -I../../VTK/Widgets 
-I../../VTK/Rendering -I../../VTK/Rendering/Testing/Cxx -I../../VTK/IO 
-I../../VTK/Imaging -I../../VTK/Graphics -I../../VTK/GenericFiltering 
-I../../VTK/Filtering -I../../VTK/Common -I../../VTK/Utilities 
-I../../VTK/Common/Testing/Cxx -I../Utilities/DICOMParser 
-I../../VTK/Utilities/DICOMParser -I../Utilities/vtkfreetype/include 
-I../../VTK/Utilities/vtkfreetype/include -I../Utilities/vtknetcdf 
-I../../VTK/Utilities/vtknetcdf -I../Utilities/vtkexodus2/include 
-I../../VTK/Utilities/vtkexodus2/include -I../Utilities/MaterialLibrary 
-I../../VTK/Utilities/MaterialLibrary -I../../VTK/Utilities/ftgl/src 
-I../Utilities/ftgl -I../../VTK/Utilities/TclTk/internals/tk8.4 
-I/Library/Frameworks/Tcl.framework/Versions/8.4/Headers 
-I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3 
-I/Library/Frameworks/Tk.framework/Versions/8.4/Headers   -DVTK_IN_VTK  
-c ./vtkCarbonRenderWindowInteractorPython.cxx
In file included from 
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:165,
                 from 
/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21, 

                 from 
/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:20,
                 from 
../../VTK/Rendering/vtkCarbonRenderWindowInteractor.h:27,
                 from vtkCarbonRenderWindowInteractorPython.cxx :6:
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/fp.h: 
In
   function `long double scalbl(long double, long int)':
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/fp.h:1896: 
error: `
   scalb' undeclared (first use this function)
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/fp.h:1896: 
error: (Each
   undeclared identifier is reported only once for each function it appears
   in.)
make[3]: *** [vtkCarbonRenderWindowInteractorPython.o] Error 1
make[2]: *** [default_target] Error 2
make[1]: *** [default_target_Rendering] Error 2
make: *** [default_target] Error 2

 From a post on the wxPython mailing list at:

http://lists.wxwidgets.org/archive/wxPython-mac/msg00629.html

it appears that this is a bug with the Mac OSX headers. The guy who 
replied to the above query submitted the following patch, which seems to 
have fixed things for me.

File to patch:
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/fp.h

--- fp.h.orig   2003-06-23 13:17:16.000000000 -0700
+++ fp.h        2003-06-23 13:51:46.000000000 -0700
@@ -1893,7 +1893,7 @@
 extern long double  scalbl(long double x, long n);
 #if TYPE_LONGDOUBLE_IS_DOUBLE
   #ifdef __cplusplus
-    inline long double scalbl(long double x, long n) { return (long 
double) scalb((double)(x), (n)); }
+    inline long double scalbl(long double x, long n) { return (long 
double) scalbl((double)(x), (n)); }
   #else
     #define scalbl(x, n) ((long double) scalb((double)(x), (n)))
   #endif

Best wishes,

Jens



More information about the vtkusers mailing list