setup.py failed to complete compilation (building wxpython ansi)

5 views
Skip to first unread message

Faizol

unread,
Oct 31, 2009, 3:36:59 AM10/31/09
to wxPython-users
hi everyone.

I tried to post to this mailing group through nabble forum but I'm not
sure if the first post went through or not. If it did, I'm sorry for
this redundant post of the same problem.

platform: Fedora 11
path: /usr/local/bin

since Fedora 11 doesn't have python2.5, I downloaded the source and
compiled it with --disable-unicode flag (application requirement).
After that I've successfully compiled wxPython (unicode=0) and got it
installed. However I couldn't get setup.py in wxPython to compile
properly;

here's a snippet from the compilation;

/usr/local/bin/python setup.py build_ext --inplace UNICODE=0
WX_CONFIG=/usr/local/bin/wx-config
WARNING: WXWIN not set in environment. Assuming
'..'
Preparing
CORE...
Preparing
GLCANVAS...
Preparing
STC...
running
build_ext
building '_core_'
extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -
Wstrict-prototypes -fPIC -DSWIG_TYPE_TABLE=_wxPython_table -
DSWIG_PYTHON_OUTPUT_TUPLE -DWXP_USE_THREAD=1 -UNDEBUG -
D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -Iinclude -Isrc -I/
usr/local/lib/wx/include/gtk2-ansi-release-2.8 -I/usr/local/include/
wx-2.8 -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/
include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/
include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1
-I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/local/include/
python2.5 -c src/helpers.cpp -o build-gtk2/temp.linux-x86_64-2.5/src/
helpers.o -pthread -
O3
cc1plus: warning: command line option "-Wstrict-prototypes" is valid
for Ada/C/ObjC but not for C+
+
cc1plus: warning: command line option "-Wstrict-prototypes" is valid
for Ada/C/ObjC but not for C+
+
src/helpers.cpp: In member function ‘void wxPyApp::_BootstrapApp
()’:
src/helpers.cpp:421: warning: deprecated conversion from string
constant to
‘char*’
src/helpers.cpp:422: warning: deprecated conversion from string
constant to
‘char*’
src/helpers.cpp: In function ‘PyObject* __wxPySetDictionary(PyObject*,
PyObject*)’:
src/helpers.cpp:643: warning: deprecated conversion from string
constant to ‘char*’
src/helpers.cpp:648: warning: deprecated conversion from string
constant to ‘char*’
src/helpers.cpp: In function ‘void wxPyOORClientData_dtor
(wxPyOORClientData*)’:
src/helpers.cpp:811: warning: deprecated conversion from string
constant to ‘char*’
src/helpers.cpp: In static member function ‘static wxPyCBInputStream*
wxPyCBInputStream::create(PyObject*, bool)’:
src/helpers.cpp:1291: warning: deprecated conversion from string
constant to ‘char*’
src/helpers.cpp:1292: warning: deprecated conversion from string
constant to ‘char*’
src/helpers.cpp:1293: warning: deprecated conversion from string
constant to ‘char*’
src/helpers.cpp: In static member function ‘static wxPyCBOutputStream*
wxPyCBOutputStream::create(PyObject*, bool)’:
src/helpers.cpp:1486: warning: deprecated conversion from string
constant to ‘char*’
src/helpers.cpp:1487: warning: deprecated conversion from string
constant to ‘char*’
src/helpers.cpp:1488: warning: deprecated conversion from string
constant to ‘char*’
src/helpers.cpp: In member function ‘void wxPyCallback::EventThunker
(wxEvent&)’:
src/helpers.cpp:1689: warning: deprecated conversion from string
constant to ‘char*’
src/helpers.cpp:1689: warning: deprecated conversion from string
constant to ‘char*’
src/helpers.cpp: In destructor ‘wxPyEvtSelfRef::~wxPyEvtSelfRef()’:
src/helpers.cpp:1947: warning: suggest explicit braces to avoid
ambiguous ‘else’
src/helpers.cpp: In member function ‘void wxPyEvtSelfRef::SetSelf
(PyObject*, bool)’:
src/helpers.cpp:1954: warning: suggest explicit braces to avoid
ambiguous ‘else’
src/helpers.cpp: In function ‘wxString* wxString_in_helper
(PyObject*)’:
src/helpers.cpp:2061: error: ‘PyUnicode_AsEncodedString’ was not
declared in this scope
src/helpers.cpp:2072: warning: suggest explicit braces to avoid
ambiguous ‘else’
src/helpers.cpp: In function ‘wxString Py2wxString(PyObject*)’:
src/helpers.cpp:2115: error: ‘PyUnicode_AsEncodedString’ was not
declared in this scope
src/helpers.cpp:2132: warning: suggest explicit braces to avoid
ambiguous ‘else’
src/helpers.cpp: In function ‘wxPoint* wxPoint_LIST_helper(PyObject*,
int*)’:
src/helpers.cpp:2385: warning: suggest explicit braces to avoid
ambiguous ‘else’
src/helpers.cpp:2394: warning: suggest explicit braces to avoid
ambiguous ‘else’
src/helpers.cpp: In function ‘wxPoint2D* wxPoint2D_LIST_helper
(PyObject*, size_t*)’:
src/helpers.cpp:2468: warning: suggest explicit braces to avoid
ambiguous ‘else’
src/helpers.cpp:2477: warning: suggest explicit braces to avoid
ambiguous ‘else’
error: command 'gcc' failed with exit status 1

what should I do to properly setup wxPython? I need python2.5 and ansi
version of wxPython coz of the application requirement.

Any help is really appreciated.

TIA.

best regards,
Faizol

Robin Dunn

unread,
Nov 3, 2009, 12:15:27 PM11/3/09
to wxpytho...@googlegroups.com
On 10/31/09 12:36 AM, Faizol wrote:
>
> hi everyone.
>
> I tried to post to this mailing group through nabble forum but I'm not
> sure if the first post went through or not. If it did, I'm sorry for
> this redundant post of the same problem.
>
> platform: Fedora 11
> path: /usr/local/bin
>
> since Fedora 11 doesn't have python2.5, I downloaded the source and
> compiled it with --disable-unicode flag (application requirement).
> After that I've successfully compiled wxPython (unicode=0) and got it
> installed. However I couldn't get setup.py in wxPython to compile
> properly;

>


> what should I do to properly setup wxPython? I need python2.5 and ansi
> version of wxPython coz of the application requirement.

Build Python with unicode enabled. You can still use the ansi version
of wxPython with it, but wxPython needs to be able to convert unicode
objects to an ansi wxString so it needs the Python unicode APIs. See
http://wiki.wxpython.org/UnicodeBuild for more details about what is a
"Unicode build" of wxPython.

--
Robin Dunn
Software Craftsman
http://wxPython.org

Reply all
Reply to author
Forward
0 new messages