[Pythonmac-SIG] wxPython build issue
Bill Northcott
w.northcott at unsw.edu.au
Fri Feb 3 02:34:43 CET 2006
I have been trying to build wxPython on Tiger (10.4.4 gcc--3.3/g77)
with some difficulty, which may just be me being dense.
I have the latest ActivePython and have built and installed
wxMac-2.6.2 widgets without problems.
However when I attempt to build wxPython it breaks here:
building '_core_' extension
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
In file included from /usr/local/include/wx-2.6/wx/memory.h:20,
from /usr/local/include/wx-2.6/wx/object.h:25,
from /usr/local/include/wx-2.6/wx/wx.h:16,
from include/wx/wxPython/wxPython_int.h:19,
from src/helpers.cpp:16
/usr/local/include/wx-2.6/wx/string.h: In function `int Stricmp(const
char*,
const char*)':
/usr/local/include/wx-2.6/wx/string.h:135: error: `strcasecmp'
undeclared
(first use this function)
I can't say I have much understanding of the wxWidgets/wxPython build
process but the error seems to go back to code in configure.in from
wxWidgets. On lines 1632 to 1680 of configure.in there is code which
appears to attempt to identify whether strcasecmp() is declared in
<string.h> or <strings.h>. It is erroneously concluding that
<string.h> is appropriate, and HAVE_STRCASECMP_IN_STRING.H is
defined. However in <string.h> the declaration of strcasecmp() is
conditional on #ifndef POSIX_C_SOURCE. So the wxPython compile breaks.
Apple's man page is quite clear that to use strcasecmp(), <strings.h>
is required. Indeed it says, "Their prototypes existed previously in
<string.h> before they were moved to <strings.h> for IEEE Std
1003.1-2001 (``POSIX.1'') compliance." This would also seem to be
compliant with OpenGroup standards as at: http://www.opengroup.org/
onlinepubs/007908799/xsh/strcasecmp.html. While Googling I came
across some messages from Bob on what seemed to be a closely
related issue
Is there something that I am doing wrong or does this need fixing?
If someone could give me some pointers about exactly how the
wxWidgets configuration propagates down to wxPython, then I might be
able to cook up some sort of fix. Also does anyone understand when
and where POSIX_C_SOURCE gets defined?
Bill Northcott
More information about the Pythonmac-SIG
mailing list