[Pythonmac-SIG] Py2app and shared libraries under Leopard

David Hughes dfh at forestfield.co.uk
Tue Dec 11 11:06:14 CET 2007


I've recently been involved with Robin Becker of Reportlabs  building 
and testing  one of their extension libraries across Intel and PPC 
hardware. Built using Distutils under Leopard, the library is working 
exactly as intended/expected. However, comparing the .so file produced, 
it is under half the size of the same built using Tiger - as well as 
having the execute permissions set, so Finder reports it as a Unix 
executable instead of a document. Both versions are reported as Mach-O 
universal binaries.

$ cd 
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/

$ ls -l _render*
-rwxr-xr-x  1 forestfield  admin  244620 10 Dec 12:40 _renderPM-Leopard.so
-rw-r--r--  1 forestfield  admin  570732 10 Dec 16:38 _renderPM.so

$ file _render*
_renderPM-Leopard.so:          Mach-O universal binary with 2 architectures
_renderPM-Leopard.so (for architecture i386):    Mach-O bundle i386
_renderPM-Leopard.so (for architecture ppc):    Mach-O bundle ppc
_renderPM.so:                  Mach-O universal binary with 2 architectures
_renderPM.so (for architecture i386):    Mach-O bundle i386
_renderPM.so (for architecture ppc):    Mach-O bundle ppc

The shared libraries in PIL also show the same effects when built under 
Leopard and Tiger respectively.

When I apply py2app to an application that uses these libraries, when 
the Leopard-built versions are used, I get

ValueError: Unknown load command: 27

as detailed in the attached log file. If I replace the libraries with 
their Tiger-built counterparts, the application builds OK (under Leopard).
I installed  Xcode on Leopard using default settings. Any ideas please?

Regards,

David Hughes
Forestfield Software

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20071211/69216715/attachment-0001.htm 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: py2app_build.log
Url: http://mail.python.org/pipermail/pythonmac-sig/attachments/20071211/69216715/attachment-0001.txt 


More information about the Pythonmac-SIG mailing list