[Pythonmac-SIG] py2app corrupting libraries

Bob Ippolito bob at redivi.com
Thu May 11 02:33:58 CEST 2006


On May 10, 2006, at 5:14 PM, Kent Quirk wrote:

> We have a large mixed Python and C++ application with about a dozen  
> frameworks which cross-reference one another.
>
>
>
> We’ve been shipping it for almost a year on PPC Macs using py2app  
> to package things – so we know we have the py2app stuff  
> approximately correct. We’ve been trying off and on to get a fat  
> version of the app working. All the C++ code compiles and links  
> cleanly on both architectures. We’ve installed fat Python 2.4.3  
> (the April 7 version).
>
>
>
> When we run the current (0.2-maint) branch of py2app on our Intel  
> Mac, somewhere along the way, it tells us that it’s “Thinning” our  
> “Events” library to the i386 part only…then, later on, it tries to  
> thin the same library to both the ppc and i386 versions…but doesn’t  
> find the ppc version anymore and crashes.
>
>
>
> Possibly of interest, but possibly a red herring: py2app spends a  
> fair amount of time building the dependency graph and doing many  
> operations over and over (the graph of our library dependencies is  
> basically a web, not a hierarchy, and it seems to be doing a pretty  
> exhaustive walk of the graph).
>
>
>
> We tried going into the macholib/util.py and stubbing out the  
> thin_to_archs() function. As we only build the two architectures we  
> care about, and we want both, we figured this should be safe.  But  
> then py2app crashes with an unrecognized magic number in some of  
> the libraries. So we changed thin_to_archs() so that it always used  
> both architectures, no matter what it was asked to build…and got  
> the same (magic) problem. We even tried reversing the order of the  
> two in case there was an order dependency somewhere.

This probably isn't going to get fixed unless a patch or a set of  
binaries to reproduce this issue is available. I'm pretty much out of  
commission for the rest of the month though, so even with binaries  
I'm not going to get anywhere with it any time soon.

-bob



More information about the Pythonmac-SIG mailing list