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@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

Reply via email to