wxPython compilation fails on OpenBSD 3.3

Hello,

I'm posting this for a friend that couldn't compile wxPython, any fix or ideas ? here's the report:

···

-----
Syntax error compiling wxPython 2.4.2.4 on OpenBSD 3.3
n-users@lists.wxwindows.org

-----
system:
OpenBSD tosh.zouh.org 3.3 GENERIC#44 i386
gcc 2.95.3 (from std openbsd -base)
python-2.2.1p1 (from std openbsd ports)
wxgtk-2.2.9 (from std openbsd ports)
gtk 1.2.10 (from std openbsd ports)

------

10:27cd wxPythonSrc-2.4.2.4/wxPython
10:27python setup.py build
WX_CONFIG not specified and wxgtk-2.4-config not found on $PATH defaulting to
"wx-config"
Preparing CORE...
Preparing GLCANVAS...
Preparing OGL...
Preparing STC...
Preparing XRC...
Preparing GIZMOS...
Preparing DLLWIDGET...
running build
running build_py
copying wxPython/__version__.py -> build/lib.openbsd-3.3-i386-2.2/wxPython
running build_ext
building 'wxc' extension
cc -DNDEBUG -O2 -pipe -DTHREAD_STACK_SIZE=0x20000 -fPIC -fPIC -DSWIG_GLOBAL
-DHAVE_CONFIG_H -DWXP_USE_THREAD=1 -UNDEBUG -Isrc
-I/usr/local/include/python2.2 -c src/helpers.cpp -o
build/temp.openbsd-3.3-i386-2.2/src/helpers.o
-I/usr/local/lib/wx/include/gtk-2.2 -I/usr/local/include -DGTK_NO_CHECK_CASTS
-D__WXGTK__ -D_REENTRANT -I/usr/local/include/gtk-1.2
-I/usr/local/include/glib-1.2 -I/usr/X11R6/include
In file included from src/helpers.cpp:16:
src/helpers.h:96: syntax error before `*'
src/helpers.h:284: syntax error before `*'
In file included from src/helpers.cpp:17:
src/pyistream.h: In method `bool wxPyInputStream::CanRead()':
src/pyistream.h:59: no matching function for call to `wxInputStream::CanRead
()'
src/helpers.cpp: In method `int wxPyApp::MainLoop()':
src/helpers.cpp:127: `Later' undeclared (first use this function)
src/helpers.cpp:127: (Each undeclared identifier is reported only once
src/helpers.cpp:127: for each function it appears in.)
src/helpers.cpp:128: `Yes' undeclared (first use this function)
src/helpers.cpp: In function `void __wxPreStart(PyObject *)':
src/helpers.cpp:390: implicit declaration of function `int
wxBuildOptions(...)'
src/helpers.cpp:390: no method `wxApp::CheckBuildOptions'
src/helpers.cpp: In function `struct PyObject * wxPyMake_wxObject(wxObject *,
bool = 1)':
src/helpers.cpp:679: no matching function for call to
`wxEvtHandler::GetClientObject ()'
src/helpers.cpp:694: passing `const char *' as argument 1 of
`wxClassInfo::FindClass(char *)' discards qualifiers
src/helpers.cpp:700: no matching function for call to
`wxEvtHandler::SetClientObject (wxPyOORClientData *)'
src/helpers.cpp: In function `struct PyObject * wxPyMake_wxSizer(wxSizer *)':
src/helpers.cpp:723: no matching function for call to
`wxSizer::GetClientObject ()'
src/helpers.cpp:732: no matching function for call to
`wxSizer::SetClientObject (wxPyOORClientData *)'
src/helpers.cpp: In function `long unsigned int wxPyGetCurrentThreadId()':
src/helpers.cpp:804: no method `wxThread::GetCurrentId'
src/helpers.cpp: In method `struct PyObject * wxPyInputStream::read(int =
-1)':
src/helpers.cpp:930: syntax error before `;'
src/helpers.cpp:943: no matching function for call to `wxInputStream::CanRead
()'
src/helpers.cpp:944: `buf' undeclared (first use this function)
src/helpers.cpp: In method `struct PyObject * wxPyInputStream::readline(int =
-1)':
src/helpers.cpp:970: syntax error before `;'
src/helpers.cpp:983: no matching function for call to `wxInputStream::CanRead
()'
src/helpers.cpp: In method `struct PyObject * wxPyInputStream::readlines(int =
-1)':
src/helpers.cpp:1026: no matching function for call to `wxInputStream::CanRead
()'
src/helpers.cpp: In function `bool wxColour_helper(PyObject *, wxColour **)':
src/helpers.cpp:2292: no matching function for call to `wxString::ToLong (long
int *, int)'
/usr/local/include/wx/string.h:666: candidates are: bool wxString::ToLong(long
int *) const
src/helpers.cpp:2293: no matching function for call to `wxString::ToLong (long
int *, int)'
/usr/local/include/wx/string.h:666: candidates are: bool wxString::ToLong(long
int *) const
src/helpers.cpp:2294: no matching function for call to `wxString::ToLong (long
int *, int)'
/usr/local/include/wx/string.h:666: candidates are: bool wxString::ToLong(long
int *) const
src/helpers.cpp: At top level:
src/helpers.cpp:2330: syntax error before `*'
src/helpers.cpp: In function `bool wxPoint2DDouble_helper(...)':
src/helpers.cpp:2332: `source' undeclared (first use this function)
src/helpers.cpp:2333: `wxPoint2DDouble' undeclared (first use this function)
src/helpers.cpp:2333: `ptr' undeclared (first use this function)

--
David JL <izi@izi.dyndns.org>

David JL wrote:

Hello,

I'm posting this for a friend that couldn't compile wxPython, any fix or ideas ? here's the report:

-----
Syntax error compiling wxPython 2.4.2.4 on OpenBSD 3.3
n-users@lists.wxwindows.org

----- system:
OpenBSD tosh.zouh.org 3.3 GENERIC#44 i386
gcc 2.95.3 (from std openbsd -base)
python-2.2.1p1 (from std openbsd ports)
wxgtk-2.2.9 (from std openbsd ports)
gtk 1.2.10 (from std openbsd ports)

You have to have the same version of wxGTK as the wxPython you are building. The easiest way to do that is to build the wxGTK located in the wxPythonSrc tarball.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!