Re: [Pythonmac-SIG] C++ ABI 1002/102 incompatibility with wxPython on OS X

2011-03-01 Thread Christopher Barker

On 3/1/11 1:58 PM, Christopher Barker wrote:


When I look at the one in :

/usr/local/lib/wxPython-unicode-2.8.11.0/lib/
(which I got from a wxPython binary), I get:

$ cat libwx_macud-2.8.0.dylib | strings | grep ABI
2.8 (debug,Unicode,compiler with C++ ABI 102,wx containers,compatible
with 2.6)
2.8 (debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible
with 2.6)


One more note:

I just took a look at an app bundle I recently built with wx -- it has 
the right ABI versions. This is with:


Python 2.6.6 (from Python.org)
wxPython 2.8.11.0 (from wxpython.org)

So it can be done.

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


Re: [Pythonmac-SIG] C++ ABI 1002/102 incompatibility with wxPython on OS X

2011-03-01 Thread Christopher Barker

On 3/1/11 1:34 PM, Brendan Simon (eTRIX) wrote:

An app that works on PowerPC and Intel 10.4.11.

$ cat ./MyApp.app/Contents/Frameworks/libwx_macud-2.8.0.dylib | strings
| grep ABI
2.8 (debug,Unicode,compiler with C++ ABI 102,wx containers,compatible
with 2.6)
2.8 (debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible
with 2.6)


This is presumably the PPC and Intel parts of the lib.

IIRC, at one point (about two years ago), Robin did some machinations to 
build the PPC version of the binary with a different compiler version 
than the Intel version. I needed to go through the same machinations to 
build an extension that was linked against wxPython.


I think that was required to get a build that would work on 10.3.9 PPC 
and recent Intel machines. Apparently, it's required for 10.4, too. I, 
unfortunately, don't have a 10.4 machine to test on anymore, so it' a 
bit hard for me to help. HOwever, looking at my ugly build script, it 
looks like I'm essentially doing:


1) build a regular old extension
2) using lipo to remove the PPc part
3) setting ENV varibles to use gcc3.3:
# this builds the ppc version correctly
export CXX="g++-3.3 -arch ppc -DMAC_OS_X_VERSION_MAX_ALLOWED=1040"
export CC="gcc-3.3 -arch ppc -DMAC_OS_X_VERSION_MAX_ALLOWED=1040"
export MACOSX_DEPLOYMENT_TARGET=10.3
4) pull the ppc part out of that build, and add it inot the original one.

when I look at the dylib delivered with that app, I get:

$ cat libwx_macud-2.8.0.dylib | strings | grep ABI
2.8 (debug,Unicode,compiler with C++ ABI 102,wx containers,compatible 
with 2.6)
2.8 (debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible 
with 2.6)


when I look at the one in /usr/lib, which I presume was supplied by 
apple, I get:


2.8 (debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible 
with 2.6)
2.8 (debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible 
with 2.6)


(this is with OS-X 10.6).

When I look at the one in :

/usr/local/lib/wxPython-unicode-2.8.11.0/lib/
(which I got from a wxPython binary), I get:

$ cat libwx_macud-2.8.0.dylib | strings | grep ABI
2.8 (debug,Unicode,compiler with C++ ABI 102,wx containers,compatible 
with 2.6)
2.8 (debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible 
with 2.6)


Which is what you want.

I suspect that you're now using Apple's wx, by accident, or are you 
using a newer wxPython than 2.8.11 ?



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


Re: [Pythonmac-SIG] C++ ABI 1002/102 incompatibility with wxPython on OS X

2011-03-01 Thread Brendan Simon (eTRIX)


On 2/03/11 8:34 AM, Brendan Simon (eTRIX) wrote:
> On 8/02/11 10:55 PM, Brendan Simon (eTRIX) 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).
>>>
>
> It turns out that previous builds of my application DO work on PowerPC
> OS X 10.4, it's only recent builds
> that fail with the ABI compatibility error.
>
> The app bundle is built with python.org 2.5.4 using pythonw
> (/Library/Frameworks/Python.framework/Versions/2.5/bin/pythonw).  It
> contains a libwx_macud-2.8.0.dylib file which I think is the culprit. 
> I interrogated this file (strings and grep) and noted an ABI difference.
>
> An app that works on PowerPC and Intel 10.4.11.
>
> $ cat ./MyApp.app/Contents/Frameworks/libwx_macud-2.8.0.dylib |
> strings | grep ABI
> 2.8 (debug,Unicode,compiler with C++ ABI 102,wx containers,compatible
> with 2.6)
> 2.8 (debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible
> with 2.6)
>
> An app that does NOT work on PowerPC 10.4.11 but does work on Intel
> 10.4.11.
>
> $ cat ./MyApp.app/Contents/Frameworks/libwx_macud-2.8.0.dylib |
> strings | grep ABI
> 2.8 (debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible
> with 2.6)
> 2.8 (debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible
> with 2.6)
>
> The latter has TWO identical lines with ABI 1002.  i.e. it does NOT
> have the ABI 102 for some reason.
>
> A search of my filesystem reveals that none of the wx libraries appear
> to have ABI 102 in the wx libraries.
>
> $ find /usr -name "libwx_macud-2.8.0.dylib" -ls
> 1412128 lrwxr-xr-x1 root wheel  27 15 Aug 
> 2009 /usr/lib/libwx_macud-2.8.0.dylib -> libwx_macud-2.8.0.5.0.dylib
> 2271698288 lrwxr-xr-x1 root wheel  27  5 Aug 
> 2010
> /usr/local/lib/wxPython-unicode-2.8.11.0/lib/libwx_macud-2.8.0.dylib
> -> libwx_macud-2.8.0.7.0.dylib
> 24113538 lrwxr-xr-x1 root wheel  27 18 Jun 
> 2008
> /usr/local/lib/wxPython-unicode-2.8.4.0/lib/libwx_macud-2.8.0.dylib ->
> libwx_macud-2.8.0.1.1.dylib
> 24122618 lrwxr-xr-x1 root wheel  27 18 Jun 
> 2008
> /usr/local/lib/wxPython-unicode-2.8.4.2/lib/libwx_macud-2.8.0.dylib ->
> libwx_macud-2.8.0.1.1.dylib
>
> $ find /usr -name "libwx_macud-2.8.0.dylib" | xargs strings | grep ABI
> 2.8 (debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible
> with 2.6)
> 2.8 (debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible
> with 2.6)
> 2.8 (debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible
> with 2.6)
> 2.8 (debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible
> with 2.6)
>
> I'm not sure what has changed to cause this.
>
> * OS X updates
> * Code changes that use various interpreters, specified as:
>   python, pythonw,
>   /Library/Frameworks/Python.framework/Versions/2.5/bin/pythonw, etc.
> * Installs of new pythons (e.g. python 2.7, python 3.x)
> * Installs of newer wxPython ??  ANSI versus Unicode versions ??
>
>
> Any ideas as to why my wx library no longer has the ABI 102
> compatibility ??
> I'm thinking it is most likely a wxPython build or install problem.
The other possibility is that the builds that do work may have been
built on another Mac running 10.5, not my current Mac running 10.6. 
Will have dig up the old Mac and see if that makes a difference.

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] C++ ABI 1002/102 incompatibility with wxPython on OS X

2011-03-01 Thread Brendan Simon (eTRIX)
On 8/02/11 10:55 PM, Brendan Simon (eTRIX) 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).
>>

It turns out that previous builds of my application DO work on PowerPC
OS X 10.4, it's only recent builds
that fail with the ABI compatibility error.

The app bundle is built with python.org 2.5.4 using pythonw
(/Library/Frameworks/Python.framework/Versions/2.5/bin/pythonw).  It
contains a libwx_macud-2.8.0.dylib file which I think is the culprit.  I
interrogated this file (strings and grep) and noted an ABI difference.

An app that works on PowerPC and Intel 10.4.11.

$ cat ./MyApp.app/Contents/Frameworks/libwx_macud-2.8.0.dylib | strings
| grep ABI
2.8 (debug,Unicode,compiler with C++ ABI 102,wx containers,compatible
with 2.6)
2.8 (debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible
with 2.6)

An app that does NOT work on PowerPC 10.4.11 but does work on Intel 10.4.11.

$ cat ./MyApp.app/Contents/Frameworks/libwx_macud-2.8.0.dylib | strings
| grep ABI
2.8 (debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible
with 2.6)
2.8 (debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible
with 2.6)

The latter has TWO identical lines with ABI 1002.  i.e. it does NOT have
the ABI 102 for some reason.

A search of my filesystem reveals that none of the wx libraries appear
to have ABI 102 in the wx libraries.

$ find /usr -name "libwx_macud-2.8.0.dylib" -ls
1412128 lrwxr-xr-x1 root wheel  27 15 Aug  2009
/usr/lib/libwx_macud-2.8.0.dylib -> libwx_macud-2.8.0.5.0.dylib
2271698288 lrwxr-xr-x1 root wheel  27  5 Aug 
2010
/usr/local/lib/wxPython-unicode-2.8.11.0/lib/libwx_macud-2.8.0.dylib ->
libwx_macud-2.8.0.7.0.dylib
24113538 lrwxr-xr-x1 root wheel  27 18 Jun  2008
/usr/local/lib/wxPython-unicode-2.8.4.0/lib/libwx_macud-2.8.0.dylib ->
libwx_macud-2.8.0.1.1.dylib
24122618 lrwxr-xr-x1 root wheel  27 18 Jun  2008
/usr/local/lib/wxPython-unicode-2.8.4.2/lib/libwx_macud-2.8.0.dylib ->
libwx_macud-2.8.0.1.1.dylib

$ find /usr -name "libwx_macud-2.8.0.dylib" | xargs strings | grep ABI
2.8 (debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible
with 2.6)
2.8 (debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible
with 2.6)
2.8 (debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible
with 2.6)
2.8 (debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible
with 2.6)

I'm not sure what has changed to cause this.

* OS X updates
* Code changes that use various interpreters, specified as: python,
  pythonw,
  /Library/Frameworks/Python.framework/Versions/2.5/bin/pythonw, etc.
* Installs of new pythons (e.g. python 2.7, python 3.x)
* Installs of newer wxPython ??  ANSI versus Unicode versions ??


Any ideas as to why my wx library no longer has the ABI 102 compatibility ??
I'm thinking it is most likely a wxPython build or install problem.

Thanks, Brendan.

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


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

2011-02-08 Thread Brendan Simon (eTRIX)
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 
> Consider setting $PYTHONPATH to [:]
> '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 ??
> 
> __

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

2011-02-06 Thread Brendan Simon (eTRIX)
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 
Consider setting $PYTHONPATH to [:]
'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


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

2011-01-27 Thread Christopher Barker

On 1/26/11 7:06 AM, Lou Pecora wrote:


Any idea how to see what ABI version a given binary was compiled against?



I thought otool could do that.  Try,

otool -L ABI

Do a

man otool

to see more.
Let me know if that works.


nope, can't find anything about ABI version in the man pages, and I've 
tried all the switches that looked like they might have something.


You'd think it would, though -- maybe I missed something.

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


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

2011-01-26 Thread Lou Pecora




- Original Message 
From: Christopher Barker 
To: Matthias Baas 
Cc: pythonmac-sig@python.org
Sent: Tue, January 25, 2011 5:24:56 PM
Subject: Re: [Pythonmac-SIG] C++ ABI 1002/102 incompatibility with wxPython

On 1/25/11 12:19 PM, Matthias Baas wrote:
> It's not a typo, the numbers indicate the C++ ABI (Application Binary
> Interface) version the code uses.

> As far as I know, version 1002 is still the current one and it was
> introduced by gcc 3.4. Before that, the version was 102 (don't ask me
> how these numbers are formed. I have to admit, it's a bit of an odd
> numbering scheme...).

It's that odd numbering scheme that threw me.

> You can find out the ABI version a particular version of gcc uses by
> running the following command:
>
> g++ -E -dM -http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


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

2011-01-25 Thread Matthias Baas
On 25.01.11 22:24, Christopher Barker wrote:
>> You can find out the ABI version a particular version of gcc uses by
>> running the following command:
>>
>> g++ -E -dM - 
> Any idea how to see what ABI version a given binary was compiled against?

Hm, I don't know. The above only prints a preprocessor symbol, so that
one doesn't have to make it into the binary.
But I think that error message was specific to wx anyway (it was not a
generic error message from the linker, was it?), so maybe in general
that information is not recorded in the binary at all. Whenever I
experienced such an ABI mismatch before, it just resulted in a crash but
not in such an error message (but that always was on Linux, maybe OSX is
a bit different here...?).

I just saw in the docs that OSX 10.3.8 and earlier was using gcc 3.3.
The original poster said he's using 10.6.6, so couldn't it just be that
his user was using an old OSX 10.3 install and that's where the mismatch
comes from?
Anyway, I think there's two things to do: 1) ask that user what OSX
version he's running and 2) check all (C++) program dependencies where
they come from and what compiler was used to build them (if it was built
locally, check your build environment, otherwise check the documentation
that comes with the binary or ask the maintainers).

Cheers,

- Matthias -
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


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

2011-01-25 Thread Christopher Barker

On 1/25/11 12:19 PM, Matthias Baas wrote:

It's not a typo, the numbers indicate the C++ ABI (Application Binary
Interface) version the code uses.



As far as I know, version 1002 is still the current one and it was
introduced by gcc 3.4. Before that, the version was 102 (don't ask me
how these numbers are formed. I have to admit, it's a bit of an odd
numbering scheme...).


It's that odd numbering scheme that threw me.


You can find out the ABI version a particular version of gcc uses by
running the following command:

g++ -E -dM -

Any idea how to see what ABI version a given binary was compiled against?

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


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

2011-01-25 Thread Matthias Baas
On 25.01.11 17:06, Christopher Barker wrote:
> On 1/25/11 1:20 AM, Brendan Simon (eTRIX) wrote:
>> 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.

It's not a typo, the numbers indicate the C++ ABI (Application Binary
Interface) version the code uses. This defines stuff like how to call
functions, the stack layout, how to handle exceptions, etc. All pieces
of code in a program must use the same ABI version, otherwise those
pieces can't be used together.
The ABI version used by gcc has changed in the past which always means
that *every* code a program uses has to be recompiled with the new
compiler version.
As far as I know, version 1002 is still the current one and it was
introduced by gcc 3.4. Before that, the version was 102 (don't ask me
how these numbers are formed. I have to admit, it's a bit of an odd
numbering scheme...).
You can find out the ABI version a particular version of gcc uses by
running the following command:

g++ -E -dM - =3.4)
whereas the "program" contains parts that were built with a compiler
that uses ABI 102 (such as gcc <3.4).
But as mentioned above, it will only work when all components use the
same ABI.

Cheers,

- Matthias -
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


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

2011-01-25 Thread Christopher Barker

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


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

2011-01-25 Thread Brendan Simon (eTRIX)
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


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 there anyway to fix this with a py2app setting ??

Doesn't py2app copy all the libraries to the app bundle ??  I guess that
doesn't guarantee that the libraries will load on any OS.

What about path settings ??

I presume others have solved this before.  Any suggestions ??

Many thanks,
Brendan.

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG