Compiling 2.8.10

Hello.

I'm having trouble compiling 2.8.10 on a linux Slackware system
(version 12.1).

I downloaded and installed wxPython-src-2.8.10.1.tar.bz2 then
configured it and installed it in /usr/local; I checked that it was
installed correctly.

$ wx-config --version
2.8.10

Then I su-ed to root, and went into wxPython/, and did

# python setup.py build_ext --inplace --debug
WARNING: WXWIN not set in environment. Assuming '..'
Found wx-config: /usr/local/bin/wx-config
    Using flags: --toolkit=gtk2 --unicode=yes --version=2.8
Preparing CORE...
Preparing GLCANVAS...
Preparing STC...
Preparing GIZMOS...
running build_ext
building '_gdi_' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -
Wstrict-prototypes -fPIC -g -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-unicode-release-2.8 -I/usr/local/include/
wx-2.8 -I/usr/local/include/pixman-1 -I/usr/include/gtk-2.0 -I/usr/lib/
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/lib/glib-2.0/include -
I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/
python2.6 -c src/gtk/_gdi_wrap.cpp -o build-gtk2.unicode/temp.linux-
i686-2.6/src/gtk/_gdi_wrap.o -pthread -g -O0
cc1plus: warning: command line option "-Wstrict-prototypes" is valid
for Ada/C/ObjC but not for C++
In file included from src/gtk/_gdi_wrap.cpp:2738:
include/wx/wxPython/wxPython.h: In function 'bool wxPyCoreAPI_IMPORT
()':
include/wx/wxPython/wxPython.h:39: warning: deprecated conversion from
string constant to 'char*'
include/wx/wxPython/wxPython.h:39: warning: deprecated conversion from
string constant to 'char*'
src/gtk/_gdi_wrap.cpp: In function 'wxPalette* new_wxPalette(const
wxArrayInt&, const wxArrayInt&, const wxArrayInt&)':
src/gtk/_gdi_wrap.cpp:2885: warning: comparison between signed and
unsigned integer expressions
src/gtk/_gdi_wrap.cpp:2885: warning: comparison between signed and
unsigned integer expressions
src/gtk/_gdi_wrap.cpp: In member function 'virtual bool
wxGraphicsContext::SetLogicalFunction(int)':
src/gtk/_gdi_wrap.cpp:4115: warning: no return statement in function
returning non-void
src/gtk/_gdi_wrap.cpp: In function 'PyObject*
_wrap_GraphicsRenderer_CreateBitmap(PyObject*, PyObject*, PyObject*)':
src/gtk/_gdi_wrap.cpp:31407: error: 'class wxGraphicsRenderer' has no
member named 'CreateBitmap'
src/gtk/_gdi_wrap.cpp: In function 'PyObject* _wrap_PenList_AddPen
(PyObject*, PyObject*, PyObject*)':
src/gtk/_gdi_wrap.cpp:33057: warning: 'AddPen' is deprecated (declared
at /usr/local/include/wx-2.8/wx/gdicmn.h:516)
src/gtk/_gdi_wrap.cpp: In function 'PyObject* _wrap_PenList_RemovePen
(PyObject*, PyObject*, PyObject*)':
src/gtk/_gdi_wrap.cpp:33095: warning: 'RemovePen' is deprecated
(declared at /usr/local/include/wx-2.8/wx/gdicmn.h:517)
src/gtk/_gdi_wrap.cpp: In function 'PyObject* _wrap_BrushList_AddBrush
(PyObject*, PyObject*, PyObject*)':
src/gtk/_gdi_wrap.cpp:33188: warning: 'AddBrush' is deprecated
(declared at /usr/local/include/wx-2.8/wx/gdicmn.h:526)
src/gtk/_gdi_wrap.cpp: In function 'PyObject*
_wrap_BrushList_RemoveBrush(PyObject*, PyObject*, PyObject*)':
src/gtk/_gdi_wrap.cpp:33226: warning: 'RemoveBrush' is deprecated
(declared at /usr/local/include/wx-2.8/wx/gdicmn.h:527)
src/gtk/_gdi_wrap.cpp: In function 'PyObject* _wrap_FontList_AddFont
(PyObject*, PyObject*, PyObject*)':
src/gtk/_gdi_wrap.cpp:33378: warning: 'AddFont' is deprecated
(declared at /usr/local/include/wx-2.8/wx/gdicmn.h:539)
src/gtk/_gdi_wrap.cpp: In function 'PyObject* _wrap_FontList_RemoveFont
(PyObject*, PyObject*, PyObject*)':
src/gtk/_gdi_wrap.cpp:33416: warning: 'RemoveFont' is deprecated
(declared at /usr/local/include/wx-2.8/wx/gdicmn.h:540)
error: command 'gcc' failed with exit status 1

How can I solve this? Thanks!

I ran into this problem recently. I solved it via an older post on
this group. I can't recall exactly what I did but it involved me
physically copying the line of code which declares CreateBitmap from
GraphicContext to GraphicRender (or the other way around, not 100%
sure). You can find the detailed discussion of this fix by searching
through the group discussions. I typed in 'Create Bitmap' in the
search field and it brought up two discussions. Look at the 'wxPython
build trouble' discussion.

Good luck

···

On Aug 16, 3:25 am, fdelente <delen...@gmail.com> wrote:

Hello.

I'm having trouble compiling 2.8.10 on a linux Slackware system
(version 12.1).

I downloaded and installed wxPython-src-2.8.10.1.tar.bz2 then
configured it and installed it in /usr/local; I checked that it was
installed correctly.

$ wx-config --version
2.8.10

Then I su-ed to root, and went into wxPython/, and did

# python setup.py build_ext --inplace --debug
WARNING: WXWIN not set in environment. Assuming '..'
Found wx-config: /usr/local/bin/wx-config
Using flags: --toolkit=gtk2 --unicode=yes --version=2.8
Preparing CORE...
Preparing GLCANVAS...
Preparing STC...
Preparing GIZMOS...
running build_ext
building '_gdi_' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -
Wstrict-prototypes -fPIC -g -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-unicode-release-2.8 -I/usr/local/include/
wx-2.8 -I/usr/local/include/pixman-1 -I/usr/include/gtk-2.0 -I/usr/lib/
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/lib/glib-2.0/include -
I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/
python2.6 -c src/gtk/_gdi_wrap.cpp -o build-gtk2.unicode/temp.linux-
i686-2.6/src/gtk/_gdi_wrap.o -pthread -g -O0
cc1plus: warning: command line option "-Wstrict-prototypes" is valid
for Ada/C/ObjC but not for C++
In file included from src/gtk/_gdi_wrap.cpp:2738:
include/wx/wxPython/wxPython.h: In function 'bool wxPyCoreAPI_IMPORT
()':
include/wx/wxPython/wxPython.h:39: warning: deprecated conversion from
string constant to 'char*'
include/wx/wxPython/wxPython.h:39: warning: deprecated conversion from
string constant to 'char*'
src/gtk/_gdi_wrap.cpp: In function 'wxPalette* new_wxPalette(const
wxArrayInt&, const wxArrayInt&, const wxArrayInt&)':
src/gtk/_gdi_wrap.cpp:2885: warning: comparison between signed and
unsigned integer expressions
src/gtk/_gdi_wrap.cpp:2885: warning: comparison between signed and
unsigned integer expressions
src/gtk/_gdi_wrap.cpp: In member function 'virtual bool
wxGraphicsContext::SetLogicalFunction(int)':
src/gtk/_gdi_wrap.cpp:4115: warning: no return statement in function
returning non-void
src/gtk/_gdi_wrap.cpp: In function 'PyObject*
_wrap_GraphicsRenderer_CreateBitmap(PyObject*, PyObject*, PyObject*)':
src/gtk/_gdi_wrap.cpp:31407: error: 'class wxGraphicsRenderer' has no
member named 'CreateBitmap'
src/gtk/_gdi_wrap.cpp: In function 'PyObject* _wrap_PenList_AddPen
(PyObject*, PyObject*, PyObject*)':
src/gtk/_gdi_wrap.cpp:33057: warning: 'AddPen' is deprecated (declared
at /usr/local/include/wx-2.8/wx/gdicmn.h:516)
src/gtk/_gdi_wrap.cpp: In function 'PyObject* _wrap_PenList_RemovePen
(PyObject*, PyObject*, PyObject*)':
src/gtk/_gdi_wrap.cpp:33095: warning: 'RemovePen' is deprecated
(declared at /usr/local/include/wx-2.8/wx/gdicmn.h:517)
src/gtk/_gdi_wrap.cpp: In function 'PyObject* _wrap_BrushList_AddBrush
(PyObject*, PyObject*, PyObject*)':
src/gtk/_gdi_wrap.cpp:33188: warning: 'AddBrush' is deprecated
(declared at /usr/local/include/wx-2.8/wx/gdicmn.h:526)
src/gtk/_gdi_wrap.cpp: In function 'PyObject*
_wrap_BrushList_RemoveBrush(PyObject*, PyObject*, PyObject*)':
src/gtk/_gdi_wrap.cpp:33226: warning: 'RemoveBrush' is deprecated
(declared at /usr/local/include/wx-2.8/wx/gdicmn.h:527)
src/gtk/_gdi_wrap.cpp: In function 'PyObject* _wrap_FontList_AddFont
(PyObject*, PyObject*, PyObject*)':
src/gtk/_gdi_wrap.cpp:33378: warning: 'AddFont' is deprecated
(declared at /usr/local/include/wx-2.8/wx/gdicmn.h:539)
src/gtk/_gdi_wrap.cpp: In function 'PyObject* _wrap_FontList_RemoveFont
(PyObject*, PyObject*, PyObject*)':
src/gtk/_gdi_wrap.cpp:33416: warning: 'RemoveFont' is deprecated
(declared at /usr/local/include/wx-2.8/wx/gdicmn.h:540)
error: command 'gcc' failed with exit status 1

How can I solve this? Thanks!

fdelente wrote:

Hello.

I'm having trouble compiling 2.8.10 on a linux Slackware system
(version 12.1).

I downloaded and installed wxPython-src-2.8.10.1.tar.bz2 then
configured it and installed it in /usr/local; I checked that it was
installed correctly.

$ wx-config --version
2.8.10

Then I su-ed to root, and went into wxPython/, and did

# python setup.py build_ext --inplace --debug

src/gtk/_gdi_wrap.cpp: In function 'PyObject*
_wrap_GraphicsRenderer_CreateBitmap(PyObject*, PyObject*, PyObject*)':
src/gtk/_gdi_wrap.cpp:31407: error: 'class wxGraphicsRenderer' has no
member named 'CreateBitmap'

How can I solve this? Thanks!

Either install what is needed for wxGTK to support wxGraphicsContext (probably just the cairo devel pacakge) and rebuild wxGTK, or see past discussions about this where others have described how they patched their code.

···

--
Robin Dunn
Software Craftsman