[Pythonmac-SIG] Universal binary build of py2app application won't run on 10.3.9

Ronald Oussoren ronaldoussoren at mac.com
Wed Jun 28 21:54:08 CEST 2006


On 28-jun-2006, at 20:50, Michael Glassford wrote:

> Ronald Oussoren wrote:
>> On 28-jun-2006, at 19:02, Michael Glassford wrote:
>>
>>> I've built a universal binary build of an application that runs
>>> great on
>>>     the Tiger machines that I've tested it on (both PowerPC and
>>> Intel).
>>> However, when I try to run it on PowerPC 10.3.9 (which I've been
>>> led to
>>> believe should work from comments in the PyObjC svn log), I get
>>> this error:
>>>
>>> """
>>> ImportError: Failure linking new module: /usr/lib/libbz2.1.0.dylib:
>>> dyld: /Volumes/GoombahDisk/Goombah.app/Contents/MacOS/Goombah can't
>>> open
>>> library: /usr/lib/libbz2.1.0.dylib  (No such file or directory,
>>> errno = 2)
>>> """
>>>
>>> When I investigate, /usr/lib/libbz2.1.0.dylib is present on the  
>>> Tiger
>>> machine I've checked but not on the Panther machine where I'm
>>> having the
>>> problem, so that makes sense. The application does in fact use the
>>> bzip2
>>> library; the error happens on an "import bz2" statement. And Py2App
>>> py2app is including bz2.so in
>>> MyApp.app/Contents/Resources/Python/lib-dynload. But apparently  
>>> bz2.so
>>> links to /usr/lib/libbz2.1.0.dylib.
>>>
>>> The question is, how do I get py2app to include the necessary  
>>> files to
>>> eliminate this dependency? Or what else can I do?
>>
>> I just fixed this for Python 2.5.  We'll have to include a staticly
>> linked copy of libz22 in the installer, just like we're doing for
>> bsddb. For 2.5 I'm doing the same with sqlite (new in 2.5) and zlib
>> (2.5 uses functionality that isn't present in the Panther version of
>> zlib).
>
> Any pointers on how I could hack something like this in? Unless...

Download bz2 and install the library "somewhere", download the  
python2.4 sources and extract the sources for the bz2 module. Then  
write a setup.py that builds the bz2 extension and use that to  
replace the one that's on your system. Don't forget to add '-Wl,- 
search_paths_first' to the extra_link_args, otherwise ld will prefer  
dylibs over static libraries and will hence pick up the system bz2 no  
matter what.

>
>> Its getting more and more clear that I can't get way with not
>> updating the 2.4 installer :-(.
>
> Would you be thinking of doing this soon? :)

Not this week, I've spent way too much time on an annoying problem in  
the x86 port of PyObjC and want to do some python hacking for change.  
I'll be happy if I manage to test a backport of the universal python  
changes to the official python 2.4 tree and check that in this week,  
and even that will probably have to wait.

Ronald

>
>
> Mike
>
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig



More information about the Pythonmac-SIG mailing list