installation problem on MacOS X

hi there,

I just tried to install wxPython version 2.4.1.2 on MacOS X 10.2.6
Following the build instructions for macosx, I first installed
MacPython (version 2.3.1) which seems to work properly.

Building and installing wxMac was no problem, but when I try to

python setup.py build install

I get the following compiler error:

harold@picabia:~/down/wxPythonSrc-2.4.1.2/wxPython> python setup.py build install
WX_CONFIG not specified and wxmac-2.4-config not found on $PATH defaulting to "wx-config"
Preparing CORE...
Preparing GLCANVAS...
Preparing OGL...
Preparing STC...
Preparing XRC...
Preparing GIZMOS...
running build
running build_py
copying wxPython/__version__.py -> build/lib.darwin-6.6-Power_Macintosh-2.2/wxPython
running build_ext
building 'wxc' extension
gcc -DNDEBUG -O3 -Wall -Wstrict-prototypes -DSWIG_GLOBAL -DHAVE_CONFIG_H -DWXP_USE_THREAD=1 -UNDEBUG -Isrc -I/sw/include/python2.2 -c src/mac/controls2.cpp -o build/temp.darwin-6.6-Power_Macintosh-2.2/src/mac/controls2.o -I/lib/wx/include/macd-2.4 -I/include -D__WXDEBUG__ -D__WXMAC__ -DWXMAKINGDLL -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
src/mac/controls2.cpp: In function `PyObject*
    _wrap_wxTreeEvent_SetItem(PyObject*, PyObject*, PyObject*)':
src/mac/controls2.cpp:6390: no matching function for call to `wxTreeEvent::
    SetItem(wxTreeItemId&)'
src/mac/controls2.cpp: In function `PyObject*
    _wrap_wxTreeEvent_SetOldItem(PyObject*, PyObject*, PyObject*)':
src/mac/controls2.cpp:6426: no matching function for call to `wxTreeEvent::
    SetOldItem(wxTreeItemId&)'
src/mac/controls2.cpp: In function `PyObject*
    _wrap_wxTreeEvent_SetPoint(PyObject*, PyObject*, PyObject*)':
src/mac/controls2.cpp:6462: no matching function for call to `wxTreeEvent::
    SetPoint(wxPoint&)'
src/mac/controls2.cpp: In function `PyObject*
    _wrap_wxTreeEvent_SetKeyEvent(PyObject*, PyObject*, PyObject*)':
src/mac/controls2.cpp:6498: no matching function for call to `wxTreeEvent::
    SetKeyEvent(wxKeyEvent&)'
src/mac/controls2.cpp: In function `PyObject*
    _wrap_wxTreeEvent_SetLabel(PyObject*, PyObject*, PyObject*)':
src/mac/controls2.cpp:6533: no matching function for call to `wxTreeEvent::
    SetLabel(wxString&)'
src/mac/controls2.cpp: In function `PyObject*
    _wrap_wxTreeEvent_SetEditCanceled(PyObject*, PyObject*, PyObject*)':
src/mac/controls2.cpp:6568: no matching function for call to `wxTreeEvent::
    SetEditCanceled(bool&)'
error: command 'gcc' failed with exit status 1

Has anyone an idea how to solve my problem?

Thanks,

- harold fellermann -

···

--
Reality is for people who lack imagination.

harold fellermann wrote:

hi there,

I just tried to install wxPython version 2.4.1.2 on MacOS X 10.2.6
Following the build instructions for macosx, I first installed
MacPython (version 2.3.1) which seems to work properly.

You must be using a time machine since there is no Python 2.3.1 yet. 2.3(.0) was just released last week. :wink:

BTW, there is really no reason to build your own MacPython any longer, unless you need to use the CVS version for some reason. Just get the MacPython 2.3 for OSX from MacPython Website and install that instead.

Building and installing wxMac was no problem, but when I try to

python setup.py build install

I get the following compiler error:

harold@picabia:~/down/wxPythonSrc-2.4.1.2/wxPython> python setup.py build install
WX_CONFIG not specified and wxmac-2.4-config not found on $PATH defaulting to "wx-config"
Preparing CORE...
Preparing GLCANVAS...
Preparing OGL...
Preparing STC...
Preparing XRC...
Preparing GIZMOS...
running build
running build_py
copying wxPython/__version__.py -> build/lib.darwin-6.6-Power_Macintosh-2.2/wxPython
running build_ext
building 'wxc' extension
gcc -DNDEBUG -O3 -Wall -Wstrict-prototypes -DSWIG_GLOBAL -DHAVE_CONFIG_H -DWXP_USE_THREAD=1 -UNDEBUG -Isrc -I/sw/include/python2.2 -c src/mac/controls2.cpp -o build/temp.darwin-6.6-Power_Macintosh-2.2/src/mac/controls2.o -I/lib/wx/include/macd-2.4 -I/include -D__WXDEBUG__ -D__WXMAC__ -DWXMAKINGDLL -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES

I see a couple problems here.

1. You are using Python 2.2 (probably the Jaguar build of unix python in /usr/bin) to run setup.py, but you are wanting to use it with MacPython 2.3. You need to run setup.py with the same version of Python that you want to use wxPython with so use "/usr/local/bin/python setup.py build install" instead.

2. Did you really configure wxMac with --prefix=/ ?

src/mac/controls2.cpp: In function `PyObject*
   _wrap_wxTreeEvent_SetItem(PyObject*, PyObject*, PyObject*)':
src/mac/controls2.cpp:6390: no matching function for call to `wxTreeEvent::
   SetItem(wxTreeItemId&)'

3. You probably used a different version of wxMac, right? You need to either use the version in the wxPythonSrc tarball, or use the CVS version (from the WX_2_4_BRANCH tag) with a couple extra patches applied.

If you did use the version from the tarball then you probably have an old version still installed and setup.py is finding that one instead of the one you just installed. Check where on the PATH that the wx-config script is found and enusre that it is the one you just installed.

···

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

Just a slight added note:

Robin Dunn wrote:

You need to run setup.py with the same version of Python that you
want to use wxPython with so use "/usr/local/bin/python setup.py build
install" instead.

YOu can probalby do :

python2.3 setup.py build

as well.

You can also put:

#!/usr/bin/env python2.3

at the top of your sciprt to make sure the correct pyton is used.

···

--
Christopher Barker, Ph.D.
Oceanographer
                                        
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Chris Barker wrote:

Just a slight added note:

Robin Dunn wrote:

You need to run setup.py with the same version of Python that you
want to use wxPython with so use "/usr/local/bin/python setup.py build
install" instead.

YOu can probalby do :

python2.3 setup.py build

as well.

Yep, that is actually what I do as well, but it is burried in a shell script and so I always forget about it. :wink:

···

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