[Pythonmac-SIG] C++ ABI 1002/102 incompatibility with wxPython

Christopher Barker Chris.Barker at noaa.gov
Tue Jan 25 18:06:09 CET 2011


On 1/25/11 1:20 AM, Brendan Simon (eTRIX) wrote:
> I have a wxPython app that is built with py2app. A user recently
> reported the following error when trying to run the app.
>
>     Fatal Error: Mismatch between the program and library build versions
>     detected.
>     The library used 2.8 (no debug,Unicode,compiler with C++ ABI 1002,wx
>     containers,compatible with 2.6),
>     and your program used 2.8 (no debug,Unicode,compiler with C++ ABI
>     102,wx containers,compatible with 2.6).
>     Abort trap
>     logout

That looks odd to me -- as far as I can see (did I miss something?) the 
only difference is ABI 102 vs ABI 1002 -- that almost looks like a typo.

I would ask on the wxPython list -- perhaps Robin will recognize those 
ABI numbers. And I"m not sure how to get those numbers at either run 
time or otherwise -- anyone know?

Meanwhile a couple questions/thoughts:

  > It appears to be a difference in the wx libraries on the target system
> and the wx libraries on the build system.
>
> Unfortunately, at this stage, I do not know what the OS X version is on
> the target system.
>
> The app was built using Python 2.5.4, (wxPython 2.8.11.0 or 2.8.4.2 ??)
> on OS X 10.6.6.

Is that the "apple's" python? i.e. the one in:

/System/Library/Frameworks/Python.framework/Versions/2.5

If so, that is likely your problem. py2app does not bundle up everything 
if you're using Apple's python, so your python install and your users 
may be different.

> Is there anyway to fix this with a py2app setting ??

not until we figure out what's wrong...

> Doesn't py2app copy all the libraries to the app bundle ??

it should, but it won't if you are using Apple's python, and sometimes 
things go wrong. wxPython puts itself in /usr/local/, while putting 
nifty sys.path manipulations in the python installs, so things can get a 
bit confused. But it's done so that one installer can support both 
python,org and apple pythons.

 > I guess that
 > doesn't guarantee that the libraries will load on any OS.

no, it doesn't, but it should load on any version that your supporting 
libs are built for -- the standard wxPython installers are built for 
10.4 and above (maybe 10.3.9 --not sure about that), and so is the 
python,org python -- are you using any other third-party libs that 
aren't pure python?

debugging suggestions:

  -- use the python.org python if you are not already.

  -- add a "print sys.path" in your app (before importing wx) -- then 
check the console to see what it prints, both in and out of an .app 
bundle - that should give you a clue -- if you can have your user report 
what they get -- that will be best.

  -- take a look in the generated app bundle -- it's just a directory -- 
you can see what's in there, and it will give you a clue.


> What about path settings ??

py2app should take care of that, but looking at sys.path will let you 
know if it's doing it "right"


HTH,

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov


More information about the Pythonmac-SIG mailing list