[Pythonmac-SIG] wxPython build issue

Bill Northcott w.northcott at unsw.edu.au
Sat Feb 4 00:57:43 CET 2006


>> PS  I still have the issue from my other posting which Adriano  
>> posted in September.
>
> Could you give me a thread to look up so that I can follow up?

I spent a bit more time on this, but I have to quit now.

The problem here is that if <math.h> is included with _POSIX_C_SOURCE  
defined, the gamma(), rinttol() and roundtol() functions among others  
are not declared.  wx/mac/private.h, which is included from  
helpers.cpp, includes <Carbon/carbon.h> .  The carbon header  
eventually includes fp.h.  The #ifdef on line 124 of fp.h prevents  
the declarations of gamma() etc being used from fp.h.  Hence the errors:

gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- 
madd -fPIC -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict- 
prototypes -DSWIG_TYPE_TABLE=_wxPython_table -DHAVE_CONFIG_H - 
DWXP_USE_THREAD=1 -UNDEBUG -D__WXMAC__ -D_FILE_OFFSET_BITS=64 - 
D_LARGE_FILES -DNO_GCC_PRAGMA -Iinclude -Isrc -I/usr/local/lib/wx/ 
include/mac-ansi-release-2.6 -I/usr/local/include/wx-2.6 -I/Library/ 
Frameworks/Python.framework/Versions/2.4/include/python2.4 -c src/ 
helpers.cpp -o build/temp.darwin-8.4.0-Power_Macintosh-2.4/src/ 
helpers.o -O3
cc1plus: warning: command line option "-Wstrict-prototypes" is valid  
for C/ObjC but not for C++
/System/Library/Frameworks/CoreServices.framework/Frameworks/ 
CarbonCore.framework/Headers/fp.h: In function 'long double gammal 
(long double)':
/System/Library/Frameworks/CoreServices.framework/Frameworks/ 
CarbonCore.framework/Headers/fp.h:2031: error: 'gamma' was not  
declared in this scope
/System/Library/Frameworks/CoreServices.framework/Frameworks/ 
CarbonCore.framework/Headers/fp.h: In function 'long int rinttoll 
(long double)':
/System/Library/Frameworks/CoreServices.framework/Frameworks/ 
CarbonCore.framework/Headers/fp.h:2145: error: 'rinttol' was not  
declared in this scope
/System/Library/Frameworks/CoreServices.framework/Frameworks/ 
CarbonCore.framework/Headers/fp.h: In function 'long int roundtoll 
(long double)':
/System/Library/Frameworks/CoreServices.framework/Frameworks/ 
CarbonCore.framework/Headers/fp.h:2183: error: 'roundtol' was not  
declared in this scope

This leaves me with questions:
Is the Carbon framework POSIX C compliant?
I suspect that it is not.  So how and where should _POSIX_C_SOURCE be  
undefined?
If _POSIX_C_SOURCE is undefed does that bring back the strcasecmp issue?

Cheers
Bill



More information about the Pythonmac-SIG mailing list