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

Brendan Simon (eTRIX) brendan.simon at etrix.com.au
Tue Feb 8 12:55:14 CET 2011


I'm still stuck on this.  Has anyone got any suggestions to help solve
the ABI compatibility issue with wx ??

I think it's something to do with building on 10.6 Intel, and trying to
run on 10.4 PPC.  It seems to work ok when run on 10.4 Intel.

My 10.4 Intel box has Apple python 2.3.1 (/usr/bin/python) and wx
2.5.3.1 installed, and python.org 2.5.1 (/usr/local/bin/python) and wx
2.8 (i think).

My 10.4 PPC box has Apple python 2.3.1 (/usr/bin/python) and wx 2.5.3.1
installed.

It really shouldn't matter what I have installed if py2app is truly
packaging up all libraries and dependencies (assuming they are universal
builds).

Thanks, Brendan.


On 6/02/11 8:47 PM, Brendan Simon (eTRIX) wrote:
> On 26/01/11 4:06 AM, Christopher Barker wrote:
>> 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
> 
> As others have informed me, the C++ ABI changed from gcc-3.3 to gcc-3.4
> (and beyond).
> 
>> 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.
> 
> 
> It's not Apple's python.  It is 2.5.4 from Python.org.
> 
> 
>>> 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?
> 
> 
> I have more info now.  The app is being run on a PPC Mac with 10.4.11
> (Tiger).  Tiger should be fine in terms of ABI compatibility for
> wxPython and Python.
> 
> I now have a 10.4.11 PowerPC Mac and can replicate the problem, though
> it was a 10.2 (Jaguar) system that I upgraded to 10.4 (Tiger).  i.e.
> it's not a fresh install of Tiger.
> 
> $ file /Applications/MyApp.app/Contents/MyApp
> MyApp: Mach-O fat file with 2 architectures
> MyApp (for architecture ppc):    Mach-O executable ppc
> MyApp (for architecture i386):   Mach-O executable i386
> 
> $ /Applications/MyApp.app/Contents/MacOS/MyApp
> Fatal Error: Mismatch between the program and library build versions
> detected.
> The library used 2.8 (debug,Unicode,compiler with C++ ABI 1002,wx
> containers,compatible with 2.6)
> and wxPython used 2.8 (debug,Unicode,compiler with C++ ABI 102,wx
> containers,compatible with 2.6)
> Abort
> 
> $ /Applications/MyApp.app/Contents/MacOS/python
> Could not find platform independent libraries <exec_prefix>
> Consider setting $PYTHONPATH to <prefix>[:<exec_prefix>]
> 'import site' failed; use -v for traceback
> Python 2.5.4 (r254:67917, Dec 23 2008, 14:57:27)
> [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
> 
>>>> import sys
>>>> for l in sys.path: print l
> ...
> 
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python25.zip
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/lib-scriptpackages
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk
> /Library/Frameworks/Python.framework/Versions/2.5/lib/lib-dynload
>>>>
> 
> $ ls -l /Library/Frameworks/
> $
> 
> No output from above command, but it shouldn't matter right, as all
> libraries should be in the app bundle, right ??
> 
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
> 



More information about the Pythonmac-SIG mailing list