wx woes

wx won't start up on my linux machine, running Fedora

    > Core 2 and a compiled-from-source wxPython 2.5.1. There
    > was some incompatability with the new GTK libraries,
    > since the wxPython rpm was comppiled on RH9. I'm guessing
    > the wx backend is having similar troubles, although I
    > compiled it from source, naturally. That's a long
    > compile, BTW! The wx backend works for me at work, under
    > Server 2003 and the same version of wx. It still leaks,
    > although I upgraded to the .60b installation binary from
    > John's website. Compiling distutil packages under windows
    > is something I've yet to master, whether with the Borland
    > compiler or the (not so new) Visual C++ Tooolkit
    > 2003. Visual Studio just isn't something I can justify,
    > even if the lab would pay for it. Especially with the VC6
    > vs VC7 funny business. At least Tk stopped leaking!

Could you send me the script that is leaking?

    > Since I have a wx that works, its not so bad. I'll still
    > work on the FC2 issues, but I can see about that toolbar
    > addition as well. I should get around to installing
    > windows again at home, I've been putting off an upgrade
    > to XP, and my old win2k pro install is useless, after a
    > mobo upgrade.

I believe this is the bug Fernando Perez was writing about which is
specific to recent releases of wx that use private GTK symbols that
are no longer present in the gtk libs in Fedora core 2. Here is a
snip from an email he sent me earlier on the subject. As far as I
know, there is nothing we can do about it on the matplotlib side,
except perhaps check the wx/wxpython list to see if it has been fixed
yet in CVS, and agitate for a fix if not.

Perhaps Fernando or some other knowledgeable wx person can comment on
the appropriate workaround if there is one.

···

From: Fernando Perez <Fernando.Perez@...76...>
Subject: Re: matplotlib, ipython and other comments
To: John Hunter <jdhunter@...17...>
Date: Wed, 09 Jun 2004 14:29:54 -0600
Organization: Applied Mathematics, University of Colorado at Boulder

...snip ...

I'll look into this later. My experience with WX and WXAgg is that
both work under linux, but WX is a bit slow and buggy. Is the problem
you are describing Fedora specific? (Sorry I can't easily read these
links now since URL cut-and-paste from my xterm on OSX laptop to my
browser window doesn't work).

No, the bug is in current WX. Here's a traceback:

In [6]: import wx
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)

/home/fperez/<console>

/usr/lib/python2.3/site-packages/wx/__init__.py
      43 __revision__ = "$Revision: 1.1.2.4 $"[11:-2]
      44
---> 45 from wxPython import wx
      46
      47 _newnames = {}

/usr/lib/python2.3/site-packages/wxPython/__init__.py
      18 # Ensure the main extension module is loaded, in case the add-on modules
      19 # (such as utils,) are used standalone.
---> 20 import wxc
      21
      22
#----------------------------------------------------------------------------

ImportError: /usr/lib/libwx_gtk2-2.4.so.0: undefined symbol:
_gtk_accel_group_detach

Apparently the WX guys chose to use _gtk_* symbols which the GTK documentation
_explicitly warned_ were private and could go away at any time. Now, in the
version of GTK shipped with Fedora they _did_ go away, so Wx broke. This just
needs to be fixed by the Wx team (maybe it already is in CVS, I'm using Wx as
shipped with Fedora). So don't worry about this, it will get fixed in time by
those responsible.

Quoting John Hunter <jdhunter@...17...>:

Perhaps Fernando or some other knowledgeable wx person can comment on
the appropriate workaround if there is one.

Currently my workaround is to use Tk :frowning:

Cheers,

f