Re: [Pyobjc-dev] 10.6: Twisty maze of build issues
Brought to you by:
ronaldoussoren
From: Ronald O. <ron...@ma...> - 2010-01-14 09:35:54
|
On 12 Jan, 2010, at 22:36, Aahz wrote: > I'm building an app on 10.5, trying to support Intel 10.4, 10.5, 10.6. > Currently I'm using a combination of PyObjC 1.4 (originally to support > PPC 10.4) and PyObjC 2.2b2 to capture FSEvents in a subprocess. When > 10.6 was released, my app crashed. Then Apple delivered some updates and > my app started working in mid-November. Now apparently Apple has put out > new updates and my app is crashing again. > > I am moderately sure that I can fix this with some combination of build > changes, but I'd like some guidance to avoid thrashing around. I'm > using the python.org build for Python 2.6.4. I've tried upgrading to > PyObjC 2.2, but that breaks on 10.5 with > > ImportError: dlopen(/Users/aahz/Library/Python/2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-10.3-fat.egg/objc/_objc.so, 2): Library not loaded: /usr/lib/libxml2.2.dylib > Reason: Incompatible library version: _objc.so requires version 10.0.0 or later, but libxml2.2.dylib provides version 9.0.0 > > Should I try just building PyObjC 2.2 from source? I tried updating > macports before I realized that this was the system libxml. Rebuilding pyobjc-core from source should fix the libxml issues, I created those binaries on 10.6 and that version of libxml is not compatible with the one on 10.5. I've added removal of the libxml dependency to my todo-list, but haven't decided yet on how to do so. I use libxml to parse the bridgesupport files, which are XML files with additional meta data. I currently use libxml for that because it is an efficient C-based parser and want to investigate two replacement strategies: (1) use ElementTree to do the parsing in Python and (2) "compile" the XML files into some other format when building framework wrappers (either to a python file or a C extension). > > AFAICT, PyObjC 2.2b2 is crashing on > > from Foundation import NSAutoreleasePool, NSMutableArray, NSString > > in objc._bridgesupport._parseBridgeSupport() with "ValueError: Unknown > typestr". Assuming the line number matches the source, that's > > objc.parseBridgeSupport(data, globals, frameworkName, *args, **kwds) Is this using /usr/bin/python? > > OTOH, the app built with PyObjC 1.4 is crashing with > USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER > and I'm not sure where. Any clues? Do you use os.fork in your program? Apple's frameworks do not support calling fork without calling exec right after that, especially (but not limited to) frameworks that have a connection to the window server. AFAIK that includes the CoreFoundation framework. Ronald |