Compile problems on linux

OS is linux (suse 9.1), python is 2.3.3 and wxpython is 2.5.2.8 (source
archive, not from cvs).

I followed directions in http://www.wxpython.org/BUILD.html. Everything
goes OK until third step:

$ cd $WXDIR/wxPython
$ python2.3 setup.py build_ext --inplace --debug
WX_CONFIG=/usr/local/bin/wx-config UNICODE=1

[...]

building '_ogl' extension
creating build-gtk2.unicode/temp.linux-i686-2.3/contrib/ogl
creating build-gtk2.unicode/temp.linux-i686-2.3/contrib/ogl/gtk
gcc -pthread -fno-strict-aliasing -DNDEBUG -D_FILE_OFFSET_BITS=64
-DHAVE_LARGEFILE_SUPPORT -O2 -march=i586 -mcpu=i686 -fmessage-length=0
-Wall -fPIC -g -DSWIG_GLOBAL -DHAVE_CONFIG_H -DWXP_USE_THREAD=1 -UNDEBUG
-D__WXDEBUG__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
-DwxUSE_DEPRECATED=0 -Iinclude -Isrc
-I/usr/local/lib/wx/include/gtk2ud-2.5 -I/usr/local/include/wx-2.5
-I/opt/gnome/include/gtk-2.0 -I/opt/gnome/lib/gtk-2.0/include
-I/opt/gnome/include/atk-1.0 -I/opt/gnome/include/pango-1.0
-I/usr/X11R6/include -I/usr/include/freetype2
-I/usr/include/freetype2/config -I/opt/gnome/include/glib-2.0
-I/opt/gnome/lib/glib-2.0/include -Icontrib/ogl -I/usr/include/python2.3
-c contrib/ogl/gtk/ogl_wrap.cpp -o
build-gtk2.unicode/temp.linux-i686-2.3/contrib/ogl/gtk/ogl_wrap.o -g -O0
contrib/ogl/gtk/ogl_wrap.cpp: In function `PyObject*
wxPyShape_GetAttachments(wxPyShape*)':
contrib/ogl/gtk/ogl_wrap.cpp:489: error: `GetAttachments' undeclared
(first use this function)
contrib/ogl/gtk/ogl_wrap.cpp:489: error: (Each undeclared identifier is
reported only once for each function it appears in.)
contrib/ogl/gtk/ogl_wrap.cpp: In function `PyObject*
wxPyPolygonShape_GetOriginalPoints(wxPyPolygonShape*)':
contrib/ogl/gtk/ogl_wrap.cpp:624: error: `GetOriginalPoints' undeclared
(first use this function)
contrib/ogl/gtk/ogl_wrap.cpp: In function `PyObject*
_wrap_ShapeRegion_GetActualColourObject(PyObject*, PyObject*, PyObject*)':
contrib/ogl/gtk/ogl_wrap.cpp:1509: error: invalid conversion from
`wxColour*' to `long unsigned int'
contrib/ogl/gtk/ogl_wrap.cpp:1509: error: initializing argument 1 of
`wxColour::wxColour(long unsigned int)'
contrib/ogl/gtk/ogl_wrap.cpp: In function `PyObject*
_wrap_PyShape_SetRotation(PyObject*, PyObject*, PyObject*)':
contrib/ogl/gtk/ogl_wrap.cpp:7841: error: `SetRotation' undeclared
(first use this function)
contrib/ogl/gtk/ogl_wrap.cpp: In function `PyObject*
_wrap_PyRectangleShape_GetCornerRadius(PyObject*, PyObject*, PyObject*)':
contrib/ogl/gtk/ogl_wrap.cpp:10778: error: `GetCornerRadius' undeclared
(first use this function)
contrib/ogl/gtk/ogl_wrap.cpp: In function `PyObject*
_wrap_PyLineShape_GetAlignmentStart(PyObject*, PyObject*, PyObject*)':
contrib/ogl/gtk/ogl_wrap.cpp:26909: error: `GetAlignmentStart'
undeclared (first use this function)
contrib/ogl/gtk/ogl_wrap.cpp: In function `PyObject*
_wrap_PyLineShape_GetAlignmentEnd(PyObject*, PyObject*, PyObject*)':
contrib/ogl/gtk/ogl_wrap.cpp:26935: error: `GetAlignmentEnd' undeclared
(first use this function)
contrib/ogl/gtk/ogl_wrap.cpp: In function `PyObject*
_wrap_PyPolygonShape_GetOriginalWidth(PyObject*, PyObject*, PyObject*)':
contrib/ogl/gtk/ogl_wrap.cpp:28369: error: `GetOriginalWidth' undeclared
(first use this function)
contrib/ogl/gtk/ogl_wrap.cpp: In function `PyObject*
_wrap_PyPolygonShape_GetOriginalHeight(PyObject*, PyObject*, PyObject*)':
contrib/ogl/gtk/ogl_wrap.cpp:28395: error: `GetOriginalHeight'
undeclared (first use this function)
contrib/ogl/gtk/ogl_wrap.cpp: In function `PyObject*
_wrap_PyPolygonShape_SetOriginalWidth(PyObject*, PyObject*, PyObject*)':
contrib/ogl/gtk/ogl_wrap.cpp:28424: error: `SetOriginalWidth' undeclared
(first use this function)
contrib/ogl/gtk/ogl_wrap.cpp: In function `PyObject*
_wrap_PyPolygonShape_SetOriginalHeight(PyObject*, PyObject*, PyObject*)':
contrib/ogl/gtk/ogl_wrap.cpp:28453: error: `SetOriginalHeight'
undeclared (first use this function)
error: command 'gcc' failed with exit status 1

Vedran Furac wrote:

OS is linux (suse 9.1), python is 2.3.3 and wxpython is 2.5.2.8 (source
archive, not from cvs).

I followed directions in http://www.wxpython.org/BUILD.html. Everything
goes OK until third step:

$ cd $WXDIR/wxPython
$ python2.3 setup.py build_ext --inplace --debug
WX_CONFIG=/usr/local/bin/wx-config UNICODE=1

[...]

building '_ogl' extension
creating build-gtk2.unicode/temp.linux-i686-2.3/contrib/ogl
creating build-gtk2.unicode/temp.linux-i686-2.3/contrib/ogl/gtk
gcc -pthread -fno-strict-aliasing -DNDEBUG -D_FILE_OFFSET_BITS=64
-DHAVE_LARGEFILE_SUPPORT -O2 -march=i586 -mcpu=i686 -fmessage-length=0
-Wall -fPIC -g -DSWIG_GLOBAL -DHAVE_CONFIG_H -DWXP_USE_THREAD=1 -UNDEBUG
-D__WXDEBUG__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
-DwxUSE_DEPRECATED=0 -Iinclude -Isrc
-I/usr/local/lib/wx/include/gtk2ud-2.5 -I/usr/local/include/wx-2.5
-I/opt/gnome/include/gtk-2.0 -I/opt/gnome/lib/gtk-2.0/include
-I/opt/gnome/include/atk-1.0 -I/opt/gnome/include/pango-1.0
-I/usr/X11R6/include -I/usr/include/freetype2
-I/usr/include/freetype2/config -I/opt/gnome/include/glib-2.0
-I/opt/gnome/lib/glib-2.0/include -Icontrib/ogl -I/usr/include/python2.3
-c contrib/ogl/gtk/ogl_wrap.cpp -o
build-gtk2.unicode/temp.linux-i686-2.3/contrib/ogl/gtk/ogl_wrap.o -g -O0
contrib/ogl/gtk/ogl_wrap.cpp: In function `PyObject*
wxPyShape_GetAttachments(wxPyShape*)':

clipped ...
I had some similar problems to this a while back, and it was due to some header files from a different version of the libraries being found by the compiler. In my case they were somewhere in my X11 directories (SuSE 8.2). I never figured out how to get them to be ignored there, so I just deleted them. In your case, look in your ogl_wrap.cpp file to see which header files it includes. Then do a "find" on your system looking for those files.

Paul Probert

Paul Probert wrote:

clipped ...
I had some similar problems to this a while back, and it was due to some header files from a different version of the libraries being found by the compiler. In my case they were somewhere in my X11 directories (SuSE 8.2). I never figured out how to get them to be ignored there, so I just deleted them. In your case, look in your ogl_wrap.cpp file to see which header files it includes. Then do a "find" on your system looking for those files.

It includes only:

Python.h (found in /usr/include/python2.3/Python.h)
wx/wxPython/wxPython.h
wx/wxPython/pyclasses.h
oglhelpers.h (found in $WXDIR/wxPython/contrib/ogl/oglhelpers.h)
<limits.h>
<string.h>

...nothing suspicious.

Vedran Furac wrote:

Paul Probert wrote:

clipped ...
I had some similar problems to this a while back, and it was due to some header files from a different version of the libraries being found by the compiler. In my case they were somewhere in my X11 directories (SuSE 8.2). I never figured out how to get them to be ignored there, so I just deleted them. In your case, look in your ogl_wrap.cpp file to see which header files it includes. Then do a "find" on your system looking for those files.

It includes only:

Python.h (found in /usr/include/python2.3/Python.h)
wx/wxPython/wxPython.h
wx/wxPython/pyclasses.h
oglhelpers.h (found in $WXDIR/wxPython/contrib/ogl/oglhelpers.h)
<limits.h>
<string.h>

...nothing suspicious.

oglhelpers.h includes the following:

#include <wx/ogl/ogl.h>
#include <wx/ogl/basicp.h>
#include <wx/ogl/constrnt.h>
#include <wx/ogl/bmpshape.h>
#include <wx/ogl/drawn.h>

So if you didn't build and install the ogl contrib and it's finding other versions of those files then you can get errors like you had. Based on your previous message take a look in /usr/local/include/wx-2.5/wx for an ogl subdirectory to check if it was installed properly.

ยทยทยท

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