install problem on SuSe 7.0

Hi all,
  I've successfully installed several versions of wxPython on various windows
and linux platforms, but I've run into a problem on SuSe, that I can't
figure out.

  We have Python 2.0 installed (originally we had installed 2.1b1, but backed
down to 2.0 hoping that might solve this issue -- it didn't). wxGTK-2.2.5
is installed (from source), and wxGTK-gl-2.2.5-1 is installed (from rpm --
couldn't find source for that one). When trying the command "python
setup.py build" it chugs along pleasantly for a few screens full of
information, and then barfs with the following output:

building 'glcanvasc' extension
gcc -g -O2 -Wall -Wstrict-prototypes -fpic -DSWIG_GLOBAL -DHAVE_CONFIG_H -DW
XP_USE_THREAD=1 -Isrc -I/usr/local/include/python2.0 -c
contrib/glcanvas/gtk/glcanvas.cpp -o
build/temp.linux-i586-2.0/contrib/glcanvas/gtk/glcanvas.o -I/usr/lib/glib/in
clude -I/usr/X11R6/include
In file included from /usr/X11R6/include/wx/defs.h:224,
                 from /usr/X11R6/include/wx/wx.h:15,
                 from src/helpers.h:16,
                 from src/export.h:21,
                 from contrib/glcanvas/gtk/glcanvas.cpp:58:
/usr/X11R6/include/wx/setup.h:15: #error No __WXxxx__ define set! Please
define one of
__WXBASE__,__WXGTK__,__WXMSW__,__WXMOTIF__,__WXMAC__,__WXQT__,__WXPM__,__WXS
TUBS__

Thank you very much for your time,
    ~c

I've successfully installed several versions of wxPython on various

windows

and linux platforms, but I've run into a problem on SuSe, that I can't
figure out.

We have Python 2.0 installed (originally we had installed 2.1b1, but

backed

down to 2.0 hoping that might solve this issue -- it didn't). wxGTK-2.2.5
is installed (from source), and wxGTK-gl-2.2.5-1 is installed (from rpm --
couldn't find source for that one).

It's in the main source package. If you specify --with-opengl and configure
finds the GL or Mesa headers and libs then it will be built and installed
along with the main library. It's in a separate RPM because of its
additional dependencies.

When trying the command "python
setup.py build" it chugs along pleasantly for a few screens full of
information, and then barfs with the following output:

building 'glcanvasc' extension

gcc -g -O2 -Wall -Wstrict-prototypes -fpic -DSWIG_GLOBAL -DHAVE_CONFIG_H -DW

XP_USE_THREAD=1 -Isrc -I/usr/local/include/python2.0 -c
contrib/glcanvas/gtk/glcanvas.cpp -o

build/temp.linux-i586-2.0/contrib/glcanvas/gtk/glcanvas.o -I/usr/lib/glib/in

clude -I/usr/X11R6/include
In file included from /usr/X11R6/include/wx/defs.h:224,
                 from /usr/X11R6/include/wx/wx.h:15,
                 from src/helpers.h:16,
                 from src/export.h:21,
                 from contrib/glcanvas/gtk/glcanvas.cpp:58:
/usr/X11R6/include/wx/setup.h:15: #error No __WXxxx__ define set! Please
define one of

__WXBASE__,__WXGTK__,__WXMSW__,__WXMOTIF__,__WXMAC__,__WXQT__,__WXPM__,__WXS

TUBS__

It looks like it is not getting the output of "wx-config --cflags" Did you
install wxGTK? (Run "make install") From the above it looks as if you did
since it's finding the headers in /usr/X11R6 (assuming you set --prefix for
configure.) If so, make sure wx-config is on your PATH and is executable.

BTW, is this the first thing it is trying to compile? If so then there may
be some flags in setup.py that are set wrong as it should be building the
core first and it would have the same problem. You probably want the flags
set like this:

BUILD_GLCANVAS = 1
BUILD_OGL = 1
BUILD_STC = 1
CORE_ONLY = 0
GL_ONLY = 0
USE_SWIG = 0
IN_CVS_TREE = 0

···

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

Thank you very much Robin. It appears that my big mistake was using "su"
instead of "su -". This meant my path wasn't getting set properly. I
rebuilt wxGTK using the --with-open-gl as you suggested and now wxPython is
builds happilly until this:

src/gtk/calendar.cpp:107: warning: `char * wxStringErrorMsg' defined but not
used
gcc -shared build/temp.linux-i586-2.0/src/gtk/calendar.o -o
build/lib.linux-i586-2.0/wxPython/calendarc.so -L/usr/local/lib -lwx_gtk -L/
usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lgthread -lglib -l
pthread -ldl -lXi -lXext -lX11 -lm -ldl -lpthread -lm
building 'glcanvasc' extension
creating build/temp.linux-i586-2.0/contrib
creating build/temp.linux-i586-2.0/contrib/glcanvas
creating build/temp.linux-i586-2.0/contrib/glcanvas/gtk
gcc -g -O2 -Wall -Wstrict-prototypes -fpic -DSWIG_GLOBAL -DHAVE_CONFIG_H -DW
XP_USE_THREAD=1 -Isrc -I/usr/local/include/python2.0 -c
contrib/glcanvas/gtk/glcanvas.cpp -o
build/temp.linux-i586-2.0/contrib/glcanvas/gtk/glcanvas.o -I/usr/local/inclu
de -I/usr/local/lib/wx/include -D__USE_WXCONFIG__ -DGTK_NO_CHECK_CASTS -D__W
XGTK__ -I/usr/lib/glib/include -I/usr/X11R6/include
contrib/glcanvas/gtk/glcanvas.cpp: In function `struct PyObject *
_wrap_new_wxGLContext(PyObject *, PyObject *, PyObject *)':
contrib/glcanvas/gtk/glcanvas.cpp:114: `wxGLContext' undeclared (first use
this function)
contrib/glcanvas/gtk/glcanvas.cpp:114: (Each undeclared identifier is
reported only once
contrib/glcanvas/gtk/glcanvas.cpp:114: for each function it appears in.)
contrib/glcanvas/gtk/glcanvas.cpp:114: `_result' undeclared (first use this
function)
contrib/glcanvas/gtk/glcanvas.cpp:116: `wxGLCanvas' undeclared (first use
this function)
contrib/glcanvas/gtk/glcanvas.cpp:116: `_arg1' undeclared (first use this
function)
contrib/glcanvas/gtk/glcanvas.cpp:144: parse error before `)'
contrib/glcanvas/gtk/glcanvas.cpp:144: parse error before `('
contrib/glcanvas/gtk/glcanvas.cpp: In function `struct PyObject *
_wrap_delete_wxGLContext(PyObject *, PyObject *, PyObject *)':
contrib/glcanvas/gtk/glcanvas.cpp:160: `_arg0' undeclared (first use this
function)
contrib/glcanvas/gtk/glcanvas.cpp: In function `struct PyObject *
_wrap_wxGLContext_GetPalette(PyObject *, PyObject *, PyObject *)':
contrib/glcanvas/gtk/glcanvas.cpp:361: warning: `class wxPalette * _result'
might be used uninitialized in this function
contrib/glcanvas/gtk/glcanvas.cpp: In function `struct PyObject *
_wrap_wxGLContext_GetWindow(PyObject *, PyObject *, PyObject *)':
contrib/glcanvas/gtk/glcanvas.cpp:395: warning: `class wxWindow * _result'
might be used uninitialized in this function
contrib/glcanvas/gtk/glcanvas.cpp: In function `void *
SwigwxGLCanvasTowxScrolledWindow(void *)':
contrib/glcanvas/gtk/glcanvas.cpp:427: `src' undeclared (first use this
function)
contrib/glcanvas/gtk/glcanvas.cpp:429: parse error before `)'
contrib/glcanvas/gtk/glcanvas.cpp:428: warning: `class wxScrolledWindow *
dest' might be used uninitialized in this function
contrib/glcanvas/gtk/glcanvas.cpp: In function `void *
SwigwxGLCanvasTowxPanel(void *)':
contrib/glcanvas/gtk/glcanvas.cpp:437: parse error before `)'
contrib/glcanvas/gtk/glcanvas.cpp:436: warning: `class wxPanel * dest' might
be used uninitialized in this function
contrib/glcanvas/gtk/glcanvas.cpp: In function `void *
SwigwxGLCanvasTowxWindow(void *)':
contrib/glcanvas/gtk/glcanvas.cpp:445: parse error before `)'
contrib/glcanvas/gtk/glcanvas.cpp:444: warning: `class wxWindow * dest'
might be used uninitialized in this function
contrib/glcanvas/gtk/glcanvas.cpp: In function `void *
SwigwxGLCanvasTowxEvtHandler(void *)':
contrib/glcanvas/gtk/glcanvas.cpp:453: parse error before `)'
contrib/glcanvas/gtk/glcanvas.cpp:452: warning: `class wxEvtHandler * dest'
might be used uninitialized in this function
contrib/glcanvas/gtk/glcanvas.cpp: In function `struct PyObject *
_wrap_new_wxGLCanvas(PyObject *, PyObject *, PyObject *)':
contrib/glcanvas/gtk/glcanvas.cpp:525: parse error before `)'
contrib/glcanvas/gtk/glcanvas.cpp:525: parse error before `('
contrib/glcanvas/gtk/glcanvas.cpp: In function `struct PyObject *
_wrap_wxGLCanvas_GetContext(PyObject *, PyObject *, PyObject *)':
contrib/glcanvas/gtk/glcanvas.cpp:644: parse error before `)'
contrib/glcanvas/gtk/glcanvas.cpp: At top level:
contrib/glcanvas/gtk/glcanvas.cpp:61: warning: `struct PyObject *
l_output_helper(PyObject *, PyObject *)' defined but not used
contrib/glcanvas/gtk/glcanvas.cpp:81: warning: `struct PyObject *
t_output_helper(PyObject *, PyObject *)' defined but not used
contrib/glcanvas/gtk/glcanvas.cpp:107: warning: `char * wxStringErrorMsg'
defined but not used
error: command 'gcc' failed with exit status 1
snagnbytz:/installs/wxPython-2.2.5 # wx-config --cflags
-I/usr/local/include -I/usr/local/lib/wx/include -D__USE_WXCONFIG__ -DGTK_NO
_CHECK_CASTS -D__WXGTK__
snagnbytz:/installs/wxPython-2.2.5 #

as you can see, wx-config is in the PATH and it is executable

  thanx again,
      ~c