[wxPython] RE: [SciPy-dev] Announce: First installable version of Chaco plotting toolkit is now available

Skip Montanaro skip at pobox.com
Mon Sep 23 14:57:26 CDT 2002

    Skip> export WXPREF=/usr/local
    Skip> ../configure --with-gtk --prefix=$WXPREF --enable-rpath=$WXPREF/lib \
    Skip> --with-opengl --enable-optimise --enable-debug_flag \
    Skip> --with-libjpeg=builtin --with-libpng=builtin --with-libtiff=builtin \
    Skip> --with-zlib=builtin

    Robin> If you're going to install wxWindows into /usr/local then there's
    Robin> no real reason to follow the directions for the private wx, but
    Robin> it should still work like this...

That's what I figured, but I also figured it was marginally better to be
pedantic in case WXPREF was used somewhere other than via the command line.

    Skip> I poked around for "__ti7wxEvent".  All I found were a couple undefined
    Skip> references:
    Skip> ./wxPython/build/temp.linux-i686-2.3/helpers.o
    Skip> U __ti7wxEvent
    Skip> ./wxPython/build/temp.linux-i686-2.3/dynamicsash.o
    Skip> U __ti7wxEvent

    Robin> I've just tried exactly what you did above on my Mandrake 8.2
    Robin> system with Python 2.2 and it works fine.

What file defines wxEvent?  You must surely have a .o file which defines it
as an exportable symbol.

    Robin> One possibility -- since the wxPython build gets its compiler
    Robin> flags and etc. from Python's build via distutils -- is that there
    Robin> is some flag conflicting with wxGTK's build that has changed with
    Robin> Python 2.3.  I'd be interested in seeing a copy of a compile
    Robin> commandline for one of the sources from the wxGTK build and
    Robin> another one from the wxPython build.

An example from (wxPython's internal) wxGTK with the no_rtti and
no_exceptions flags set:

    c++ -c   -I./lib/wx/include/gtkd-2.3 -I../include -I../src/zlib \
    -I../src/png -I../src/jpeg -I../src/tiff -I/usr/include/gtk-1.2 \
    -I/usr/include/glib-1.2 -I/usr/lib/glib/include -D_REENTRANT \
    -I/usr/X11R6/include -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES \
    -D__WXGTK__ -D__WXDEBUG__ -fno-rtti -fno-exceptions -O2 -MMD -pthread \
    -Wall -fPIC -o brush.o ../src/gtk/brush.cpp 

Here's one from wxPython:

    -Isrc -I/usr/local/include/python2.3 -c contrib/dllwidget/dllwidget.cpp \
    -o build/temp.linux-i686-2.3/dllwidget.o \
    -I/usr/local/lib/wx/include/gtkd-2.3 -D__WXDEBUG__ -D__WXGTK__ \
    -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -fno-rtti -fno-exceptions \
    -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include \
    -I/usr/X11R6/include -UNDEBUG

    Robin> Another possibility is that it may be fixed simply by disabling
    Robin> rtti and/or exceptions in the wxGTK build.  You can try adding
    Robin> the following flags and then rebuilding all of wxGTK and
    Robin> wxPython:

    Robin>      --enable-no_rtti
    Robin>      --enable-no_exceptions

Just tried that.  Running wxPython/demo/demo.py now yields:

    Traceback (most recent call last):
      File "demo.py", line 3, in ?
        import Main
      File "Main.py", line 15, in ?
        from   wxPython.wx import *
      File "/usr/local/lib/python2.3/site-packages/wxPython/__init__.py", line 20, in ?
        import wxc
    ImportError: /usr/local/lib/python2.3/site-packages/wxPython/wxc.so:
    undefined symbol: Eof__C13wxInputStream

which c++filt reports as

    wxInputStream::Eof(void) const

The original __ti7wxEvent symbol is no longer to be found anywhere (defined
or referenced).  Eof__C13wxInputStream is referenced from

Ah, wait a minute.  I see a likely candidate for the screwup:

    % type c++
    c++ is /usr/local/bin/c++
    % c++ --version
    % type gcc
    gcc is /usr/bin/gcc
    % gcc --version

Does mix-n-match across GCC versions strike you as a plausible reason for
the errors?  I am rebuilding while I await your reply...


More information about the Scipy-dev mailing list