Building wxPython Progress

Hello All,

I have jumped through many hoops trying to build this and I think I've made
progress, getting the proper versions of SWIG and libxml2 and building and
installing those. I believe I have successfully re-built the swig generated
source and it has changed from that in the tarball (for what reasons I do not
know)--using the recommended version of SWIG of 1.3.27.

My new issue, if anyone knows, is that I am getting the error below when
building wxpython. I believe this has to do with my using the wrong version
of gcc. Does anyone know which version of gcc will build wxpython
successfully?

I have tried gcc 3.4.2 and gcc 4.0.1 with the same error. I will attempt the
newest version of gcc, but I fear the results.

Thank you for any help.

James

···

==
running build_ext
building '_core_' extension
creating build-gtk2/temp.linux-i686-2.5
creating build-gtk2/temp.linux-i686-2.5/src
creating build-gtk2/temp.linux-i686-2.5/src/gtk
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
-I/data10/users/jstroud/Programs/include
-I/data10/users/jstroud/Programs/qt/include -I/usr/include
-I/data10/users/jstroud/Programs/include/freetype2/freetype -fPIC
-DSWIG_TYPE_TABLE=_wxPython_table -DHAVE_CONFIG_H -DWXP_USE_THREAD=1 -UNDEBUG
-DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
-D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -Iinclude -Isrc
-I/data10/users/jstroud/Programs/lib/wx/include/gtk2-ansi-release-2.6
-I/data10/users/jstroud/Programs/include/wx-2.6
-I/data10/users/jstroud/Programs/include/gtk-2.0
-I/data10/users/jstroud/Programs/lib/gtk-2.0/include
-I/data10/users/jstroud/Programs/include/atk-1.0
-I/data10/users/jstroud/Programs/include/cairo
-I/data10/users/jstroud/Programs/include/pango-1.0
-I/data10/users/jstroud/Programs/include/glib-2.0
-I/data10/users/jstroud/Programs/lib/glib-2.0/include
-I/data10/users/jstroud/Programs/include/python2.5 -c src/helpers.cpp -o
build-gtk2/temp.linux-i686-2.5/src/helpers.o -O3
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
src/helpers.cpp: In destructor ‘wxPyCBInputStream::~wxPyCBInputStream()’:
src/helpers.cpp:1388: warning: ‘blocked’ may be used uninitialized in this
function
src/helpers.cpp: In destructor ‘virtual
wxPyCBInputStream::~wxPyCBInputStream()’:
src/helpers.cpp:1388: warning: ‘blocked’ may be used uninitialized in this
function
src/helpers.cpp: In destructor ‘virtual
wxPyCBInputStream::~wxPyCBInputStream()’:
src/helpers.cpp:1388: warning: ‘blocked’ may be used uninitialized in this
function
src/helpers.cpp: In static member function ‘static wxPyCBInputStream*
wxPyCBInputStream::create(PyObject*, bool)’:
src/helpers.cpp:1398: warning: ‘blocked’ may be used uninitialized in this
function
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
-I/data10/users/jstroud/Programs/include
-I/data10/users/jstroud/Programs/qt/include -I/usr/include
-I/data10/users/jstroud/Programs/include/freetype2/freetype -fPIC
-DSWIG_TYPE_TABLE=_wxPython_table -DHAVE_CONFIG_H -DWXP_USE_THREAD=1 -UNDEBUG
-DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
-D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -Iinclude -Isrc
-I/data10/users/jstroud/Programs/lib/wx/include/gtk2-ansi-release-2.6
-I/data10/users/jstroud/Programs/include/wx-2.6
-I/data10/users/jstroud/Programs/include/gtk-2.0
-I/data10/users/jstroud/Programs/lib/gtk-2.0/include
-I/data10/users/jstroud/Programs/include/atk-1.0
-I/data10/users/jstroud/Programs/include/cairo
-I/data10/users/jstroud/Programs/include/pango-1.0
-I/data10/users/jstroud/Programs/include/glib-2.0
-I/data10/users/jstroud/Programs/lib/glib-2.0/include
-I/data10/users/jstroud/Programs/include/python2.5 -c src/gtk/_core_wrap.cpp
-o build-gtk2/temp.linux-i686-2.5/src/gtk/_core_wrap.o -O3
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
src/gtk/_core_wrap.cpp: In function ‘int SWIG_Python_ConvertPtr(PyObject*,
void**, swig_type_info*, int)’:
src/gtk/_core_wrap.cpp:1231: error: invalid conversion from ‘const char*’ to
‘char*’
src/gtk/_core_wrap.cpp: In function ‘void SWIG_Python_FixMethods(PyMethodDef*,
swig_const_info*, swig_type_info**, swig_type_info**)’:
src/gtk/_core_wrap.cpp:49058: error: invalid conversion from ‘const char*’ to
‘char*’
error: command 'gcc' failed with exit status 1

--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com

James Stroud wrote:

Hello All,

I have jumped through many hoops trying to build this and I think I've made progress, getting the proper versions of SWIG and libxml2 and building and installing those. I believe I have successfully re-built the swig generated source and it has changed from that in the tarball (for what reasons I do not know)--using the recommended version of SWIG of 1.3.27.

There should be no need to tun SWIG, unless you are planning on making changes to the .i files or making your own extension modules.

My new issue, if anyone knows, is that I am getting the error below when building wxpython. I believe this has to do with my using the wrong version of gcc. Does anyone know which version of gcc will build wxpython successfully?

I have tried gcc 3.4.2 and gcc 4.0.1 with the same error. I will attempt the newest version of gcc, but I fear the results.

-I/data10/users/jstroud/Programs/include/python2.5 -c src/gtk/_core_wrap.cpp -o build-gtk2/temp.linux-i686-2.5/src/gtk/_core_wrap.o -O3
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
src/gtk/_core_wrap.cpp: In function ‘int SWIG_Python_ConvertPtr(PyObject*, void**, swig_type_info*, int)’:
src/gtk/_core_wrap.cpp:1231: error: invalid conversion from ‘const char*’ to ‘char*’
src/gtk/_core_wrap.cpp: In function ‘void SWIG_Python_FixMethods(PyMethodDef*, swig_const_info*, swig_type_info**, swig_type_info**)’:
src/gtk/_core_wrap.cpp:49058: error: invalid conversion from ‘const char*’ to ‘char*’

It's not a GCC problem. It's a change in the Python 2.5 header files that makes the code generated by SWIG have this error. I've got a new version of my SWIG patch in CVS that deals with this.

http://cvs.wxwidgets.org/viewcvs.cgi/*checkout*/wxWidgets/wxPython/SWIG/swig-1.3.27.patch?rev=1.1.2.4

···

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

Hi Robin,

After manually adjusting all of the offending "char *" to "const *" (surmising
that it was the 2.5 header files), I got back to my original error. Please,
If you have any thoughts on how to fix this, I would greatly appreciate it.

James

···

On Thursday 28 September 2006 10:44, Robin Dunn wrote:

It's not a GCC problem. It's a change in the Python 2.5 header files
that makes the code generated by SWIG have this error. I've got a new
version of my SWIG patch in CVS that deals with this.

http://cvs.wxwidgets.org/viewcvs.cgi/*checkout*/wxWidgets/wxPython/SWIG/swi
g-1.3.27.patch?rev=1.1.2.4

===
building '_stc' extension
creating build-gtk2/temp.linux-i686-2.5/contrib/stc
creating build-gtk2/temp.linux-i686-2.5/contrib/stc/gtk
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
-fPIC -DSWIG_TYPE_TABLE=_wxPython_table -DHAVE_CONFIG_H -DWXP_USE_THREAD=1
-UNDEBUG -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64
-D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -Iinclude -Isrc
-I/data10/users/jstroud/Programs/lib/wx/include/gtk2-ansi-release-2.6
-I/data10/users/jstroud/Programs/include/wx-2.6
-I/data10/users/jstroud/Programs/include/gtk-2.0
-I/data10/users/jstroud/Programs/lib/gtk-2.0/include
-I/data10/users/jstroud/Programs/include/atk-1.0
-I/data10/users/jstroud/Programs/include/cairo
-I/data10/users/jstroud/Programs/include/pango-1.0
-I/data10/users/jstroud/Programs/include/glib-2.0
-I/data10/users/jstroud/Programs/lib/glib-2.0/include
-I/data10/users/jstroud/Programs/include/python2.5 -c
contrib/stc/gtk/stc_wrap.cpp -o
build-gtk2/temp.linux-i686-2.5/contrib/stc/gtk/stc_wrap.o -O3
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
C/ObjC but not for C++
contrib/stc/gtk/stc_wrap.cpp: In function `PyObject*
_wrap_StyledTextCtrl_MarkerAddSet(PyObject*, PyObject*, PyObject*)':
contrib/stc/gtk/stc_wrap.cpp:3654: error: 'class wxStyledTextCtrl' has no
member named 'MarkerAddSet'
contrib/stc/gtk/stc_wrap.cpp: In function `PyObject*
_wrap_StyledTextCtrl_AutoCompSetMaxWidth(PyObject*, PyObject*, PyObject*)':
contrib/stc/gtk/stc_wrap.cpp:6176: error: 'class wxStyledTextCtrl' has no
member named 'AutoCompSetMaxWidth'
contrib/stc/gtk/stc_wrap.cpp: In function `PyObject*
_wrap_StyledTextCtrl_AutoCompGetMaxWidth(PyObject*, PyObject*, PyObject*)':
contrib/stc/gtk/stc_wrap.cpp:6202: error: 'class wxStyledTextCtrl' has no
member named 'AutoCompGetMaxWidth'
contrib/stc/gtk/stc_wrap.cpp: In function `PyObject*
_wrap_StyledTextCtrl_AutoCompSetMaxHeight(PyObject*, PyObject*, PyObject*)':
contrib/stc/gtk/stc_wrap.cpp:6235: error: 'class wxStyledTextCtrl' has no
member named 'AutoCompSetMaxHeight'
contrib/stc/gtk/stc_wrap.cpp: In function `PyObject*
_wrap_StyledTextCtrl_AutoCompGetMaxHeight(PyObject*, PyObject*, PyObject*)':
contrib/stc/gtk/stc_wrap.cpp:6261: error: 'class wxStyledTextCtrl' has no
member named 'AutoCompGetMaxHeight'
contrib/stc/gtk/stc_wrap.cpp: In function `PyObject*
_wrap_StyledTextCtrl_WrapCount(PyObject*, PyObject*, PyObject*)':
contrib/stc/gtk/stc_wrap.cpp:8907: error: 'class wxStyledTextCtrl' has no
member named 'WrapCount'
contrib/stc/gtk/stc_wrap.cpp: In function `PyObject*
_wrap_StyledTextCtrl_GetCaretSticky(PyObject*, PyObject*, PyObject*)':
contrib/stc/gtk/stc_wrap.cpp:14562: error: 'class wxStyledTextCtrl' has no
member named 'GetCaretSticky'
contrib/stc/gtk/stc_wrap.cpp: In function `PyObject*
_wrap_StyledTextCtrl_SetCaretSticky(PyObject*, PyObject*, PyObject*)':
contrib/stc/gtk/stc_wrap.cpp:14595: error: 'class wxStyledTextCtrl' has no
member named 'SetCaretSticky'
contrib/stc/gtk/stc_wrap.cpp: In function `PyObject*
_wrap_StyledTextCtrl_ToggleCaretSticky(PyObject*, PyObject*, PyObject*)':
contrib/stc/gtk/stc_wrap.cpp:14620: error: 'class wxStyledTextCtrl' has no
member named 'ToggleCaretSticky'
contrib/stc/gtk/stc_wrap.cpp: In function `PyObject*
_wrap_StyledTextCtrl_SetPasteConvertEndings(PyObject*, PyObject*,
PyObject*)':
contrib/stc/gtk/stc_wrap.cpp:14651: error: 'class wxStyledTextCtrl' has no
member named 'SetPasteConvertEndings'
contrib/stc/gtk/stc_wrap.cpp: In function `PyObject*
_wrap_StyledTextCtrl_GetPasteConvertEndings(PyObject*, PyObject*,
PyObject*)':
contrib/stc/gtk/stc_wrap.cpp:14677: error: 'class wxStyledTextCtrl' has no
member named 'GetPasteConvertEndings'
contrib/stc/gtk/stc_wrap.cpp: In function `PyObject*
_wrap_StyledTextCtrl_SelectionDuplicate(PyObject*, PyObject*, PyObject*)':
contrib/stc/gtk/stc_wrap.cpp:14704: error: 'class wxStyledTextCtrl' has no
member named 'SelectionDuplicate'
contrib/stc/gtk/stc_wrap.cpp: In function `PyObject*
_wrap_StyledTextCtrl_GetProperty(PyObject*, PyObject*, PyObject*)':
contrib/stc/gtk/stc_wrap.cpp:15029: error: 'class wxStyledTextCtrl' has no
member named 'GetProperty'
contrib/stc/gtk/stc_wrap.cpp: In function `PyObject*
_wrap_StyledTextCtrl_GetPropertyExpanded(PyObject*, PyObject*, PyObject*)':
contrib/stc/gtk/stc_wrap.cpp:15077: error: 'class wxStyledTextCtrl' has no
member named 'GetPropertyExpanded'
contrib/stc/gtk/stc_wrap.cpp: In function `PyObject*
_wrap_StyledTextCtrl_GetPropertyInt(PyObject*, PyObject*, PyObject*)':
contrib/stc/gtk/stc_wrap.cpp:15125: error: 'class wxStyledTextCtrl' has no
member named 'GetPropertyInt'
contrib/stc/gtk/stc_wrap.cpp: In function `PyObject*
_wrap_StyledTextCtrl_GetStyleBitsNeeded(PyObject*, PyObject*, PyObject*)':
contrib/stc/gtk/stc_wrap.cpp:15161: error: 'class wxStyledTextCtrl' has no
member named 'GetStyleBitsNeeded'
contrib/stc/gtk/stc_wrap.cpp: In function `void init_stc()':
contrib/stc/gtk/stc_wrap.cpp:23553: error: `wxEVT_STC_AUTOCOMP_SELECTION'
undeclared (first use this function)
contrib/stc/gtk/stc_wrap.cpp:23553: error: (Each undeclared identifier is
reported only once for each function it appears in.)
error: command 'gcc' failed with exit status 1

--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com

James Stroud wrote:

···

On Thursday 28 September 2006 10:44, Robin Dunn wrote:

It's not a GCC problem. It's a change in the Python 2.5 header files
that makes the code generated by SWIG have this error. I've got a new
version of my SWIG patch in CVS that deals with this.

http://cvs.wxwidgets.org/viewcvs.cgi/*checkout*/wxWidgets/wxPython/SWIG/swi
g-1.3.27.patch?rev=1.1.2.4

Hi Robin,

After manually adjusting all of the offending "char *" to "const *" (surmising that it was the 2.5 header files), I got back to my original error. Please, If you have any thoughts on how to fix this, I would greatly appreciate it.

My guess is that you didn't build and/or install the new stc library, and so when the Python module for it is being built the headers for an older version are being found. See step #2 at http://wxpython.org/builddoc.php

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

Hi Robin,

The instructions were splendid--full working wxPython built from scratch.

Thank you!

James

···

On Thursday 28 September 2006 12:43, Robin Dunn wrote:

My guess is that you didn't build and/or install the new stc library,
and so when the Python module for it is being built the headers for an
older version are being found. See step #2 at
http://wxpython.org/builddoc.php

--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com