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

Michael Glassford glassfordm at hotmail.com
Wed Jun 28 20:46:16 CEST 2006


Bob Ippolito wrote:
> On Jun 28, 2006, at 10:02 AM, 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:
> 
> Python itself works on 10.3.9 as compiled universally. Not every  
> single extension has been audited for compatibility, obviously.

Sure, I understand that.

>> """
>> 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?
> 
> There's nothing you can really do about this other than replace the  
> bz2 extension with one that links statically and universally against  
> your own copy of libbz2. 

I'd be glad to do this, but it's not clear to me how. Can you point me 
to any information?

 > For some reason Panther had a static libbz2
> and Tiger made it dynamic.

I'd be just as willing to build on 10.3.9, if possible, but have had 
trouble getting this working as well. So far I haven't been able to 
build PyObjC; I've gotten as far as this error:


"""
** using pyobjc source-deps py2app for building
running build
running build_py
running build_ext
Performing task: Generating wrappers & stubs
/Library/Frameworks/Python.framework/Versions/2.4/Resources/Python.app/Contents/MacOS/Python 
Scripts/CodeGenerators/cocoa_generator.py
building 'objc._objc' extension
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp 
-mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 
-I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -c 
Modules/objc/alloc_hack.m -o 
build/temp.macosx-10.3-fat-2.4/Modules/objc/alloc_hack.o -DMACOSX 
-DAPPLE_RUNTIME -no-cpp-precomp -Wno-long-double -g -Wall 
-Wstrict-prototypes -Wmissing-prototypes -Wformat=2 -W -Wshadow 
-Wpointer-arith -Wmissing-declarations -Wnested-externs -Wno-long-long 
-Wno-import -Ibuild/codegen/ -Ilibffi-src/include
In file included from 
/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/Python.h:81,
                  from Modules/objc/pyobjc.h:15,
                  from Modules/objc/alloc_hack.m:4:
/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/unicodeobject.h:118:21: 
wchar.h: No such file or directory
In file included from Modules/objc/pyobjc-compat.h:10,
                  from Modules/objc/pyobjc.h:17,
                  from Modules/objc/alloc_hack.m:4:
/usr/include/AvailabilityMacros.h:101:6: #error 
MAC_OS_X_VERSION_MAX_ALLOWED must be >= MAC_OS_X_VERSION_MIN_REQUIRED
error: command 'gcc' failed with exit status 1
"""


Mike



More information about the Pythonmac-SIG mailing list