[Pythonmac-SIG] wxPython build issue
Kevin Ollivier
kevino at theolliviers.com
Sat Feb 4 01:22:58 CET 2006
Hi Bill,
On Feb 3, 2006, at 3:57 PM, Bill Northcott wrote:
>>> 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?
I would suspect the right place is in the wx headers, probably in
somewhere like setup.h. For the moment, could you write a hard-coded
#undef _POSIX_C_SOURCE in your setup.h (or setup.h.in) and see if it
resolves the matter? If so, it'll just be a matter of writing a
proper test before undefining it, either in configure.in or setup.h.in.
> If _POSIX_C_SOURCE is undefed does that bring back the strcasecmp
> issue?
So long as the undefine is done before string.h gets included in wx,
this should actually be a very simple solution to the problem.
Thanks,
Kevin
> Cheers
> Bill
>
More information about the Pythonmac-SIG
mailing list