Thread: [Pyobjc-dev] import objc -> Symbol not found: _PyType_Modified
Brought to you by:
ronaldoussoren
From: anurag u. <anu...@ya...> - 2010-07-16 06:36:21
|
My system is Mac OS X 10.5.8 and I have installed python from http://www.python.org/ftp/python/2.5.4/python-2.5.4-macosx.dmg because I do not want to use System python (python which already comes installed with Mac OS X) and have totally removed system python. Now when I try to install pyobjc it installs, but on import gives error Python 2.5.4 (r254:67917, Dec 23 2008, 14:57:27) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import objc Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/pyobjc_core-2.2-py2.5-macosx-10.3-i386.egg/objc/__init__.py", line 22, in <module> _update() File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/pyobjc_core-2.2-py2.5-macosx-10.3-i386.egg/objc/__init__.py", line 19, in _update import _objc ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/pyobjc_core-2.2-py2.5-macosx-10.3-i386.egg/objc/_objc.so, 2): Symbol not found: _PyType_Modified Referenced from: /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/pyobjc_core-2.2-py2.5-macosx-10.3-i386.egg/objc/_objc.so Expected in: dynamic lookup If it is of help, here are the warnings while doing "easy_install pyobjc" Running pyobjc-core-2.2/setup.py -q bdist_egg --dist-dir /var/folders/tW/tWnuazCRFjexteMIweC5H++++TI/-Tmp-/easy_install-jttwg4/pyobjc-core-2.2/egg-dist-tmp-vuhvjT warning: no directories found matching 'Scripts' warning: no directories found matching 'setup-lib' warning: no directories found matching 'source-deps' warning: no previously-included files matching '.DS_Store' found anywhere in distribution warning: no previously-included files matching '*.pyc' found anywhere in distribution warning: no previously-included files matching '*.so' found anywhere in distribution libffi-src/powerpc/ppc-ffi_darwin.c:95: warning: no previous prototype for 'ffi_prep_args' libffi-src/powerpc/ppc-ffi_darwin.c:819: warning: no previous prototype for 'ffi_closure_helper_DARWIN' libffi-src/powerpc/ppc-ffi_darwin.c: In function 'ffi_closure_helper_DARWIN': libffi-src/powerpc/ppc-ffi_darwin.c:854: warning: comparison between signed and unsigned libffi-src/powerpc/ppc-ffi_darwin.c:910: warning: pointer of type 'void *' used in arithmetic libffi-src/powerpc/ppc-ffi_darwin.c:910: warning: pointer of type 'void *' used in arithmetic libffi-src/x86/x86-ffi_darwin.c:39: warning: no previous prototype for 'ffi_prep_args' libffi-src/x86/x86-ffi_darwin.c:178: warning: function declaration isn't a prototype libffi-src/x86/x86-ffi_darwin.c:186: warning: function declaration isn't a prototype Modules/objc/objc-class.m: In function 'PyObjCClass_New': Modules/objc/objc-class.m:1416: warning: implicit declaration of function 'PyType_Modified' Modules/objc/objc-class.m:1416: warning: nested extern declaration of 'PyType_Modified' Modules/objc/objc-class.m: In function 'PyObjCClass_New': Modules/objc/objc-class.m:1416: warning: implicit declaration of function 'PyType_Modified' Modules/objc/objc-class.m:1416: warning: nested extern declaration of 'PyType_Modified Modules/objc/OC_PythonObject.m: In function '-[OC_PythonObject replacementObjectForKeyedArchiver:]': Modules/objc/OC_PythonObject.m:1370: warning: conflicting types for '-(NSObject *)replacementObjectForKeyedArchiver:(NSKeyedArchiver *)archiver' Modules/objc/OC_PythonObject.h:102: warning: previous declaration of '-(NSObject *)replacementObjectForKeyedArchiver:(NSObject *)archiver' Modules/objc/OC_PythonObject.m: In function '-[OC_PythonObject replacementObjectForCoder:]': Modules/objc/OC_PythonObject.m:1376: warning: conflicting types for '-(NSObject *)replacementObjectForCoder:(NSCoder *)archiver' Modules/objc/OC_PythonObject.h:103: warning: previous declaration of '-(NSObject *)replacementObjectForCoder:(NSObject *)archiver' Modules/objc/OC_PythonObject.m: In function '-[OC_PythonObject replacementObjectForPortCoder:]': Modules/objc/OC_PythonObject.m:1382: warning: conflicting types for '-(NSObject *)replacementObjectForPortCoder:(NSPortCoder *)archiver' Modules/objc/OC_PythonObject.h:104: warning: previous declaration of '-(NSObject *)replacementObjectForPortCoder:(NSObject *)archiver' Modules/objc/OC_PythonObject.m: In function '-[OC_PythonObject replacementObjectForKeyedArchiver:]': Modules/objc/OC_PythonObject.m:1370: warning: conflicting types for '-(NSObject *)replacementObjectForKeyedArchiver:(NSKeyedArchiver *)archiver' Modules/objc/OC_PythonObject.h:102: warning: previous declaration of '-(NSObject *)replacementObjectForKeyedArchiver:(NSObject *)archiver' Modules/objc/OC_PythonObject.m: In function '-[OC_PythonObject replacementObjectForCoder:]': Modules/objc/OC_PythonObject.m:1376: warning: conflicting types for '-(NSObject *)replacementObjectForCoder:(NSCoder *)archiver' Modules/objc/OC_PythonObject.h:103: warning: previous declaration of '-(NSObject *)replacementObjectForCoder:(NSObject *)archiver' Modules/objc/OC_PythonObject.m: In function '-[OC_PythonObject replacementObjectForPortCoder:]': Modules/objc/OC_PythonObject.m:1382: warning: conflicting types for '-(NSObject *)replacementObjectForPortCoder:(NSPortCoder *)archiver' Modules/objc/OC_PythonObject.h:104: warning: previous declaration of '-(NSObject *)replacementObjectForPortCoder:(NSObject *)archiver' Modules/objc/test/protocol.m:19: warning: incomplete implementation of class 'OC_TestProtocolClass' Modules/objc/test/protocol.m:19: warning: method definition for '-method2:' not found Modules/objc/test/protocol.m:19: warning: method definition for '-method1' not found Modules/objc/test/protocol.m:19: warning: class 'OC_TestProtocolClass' does not fully implement the 'OC_TestProtocol' protocol Modules/objc/test/protocol.m:19: warning: incomplete implementation of class 'OC_TestProtocolClass' Modules/objc/test/protocol.m:19: warning: method definition for '-method2:' not found Modules/objc/test/protocol.m:19: warning: method definition for '-method1' not found Modules/objc/test/protocol.m:19: warning: class 'OC_TestProtocolClass' does not fully implement the 'OC_TestProtocol' protocol Modules/objc/test/testclassandinst.m: In function '+[PyObjC_TestUnallocatable allocWithZone:]':Modules/objc/test/testclassandinst.m: In function '+[PyObjC_TestUnallocatable allocWithZone:]': Modules/objc/test/testclassandinst.m:22: warning: unused parameter 'zone' Modules/objc/test/testclassandinst.m:22: warning: unused parameter 'zone' rgds Anurag |
From: Ronald O. <ron...@ma...> - 2010-07-16 16:03:50
Attachments:
smime.p7s
|
On 16 Jul, 2010, at 8:36, anurag uniyal wrote: > My system is Mac OS X 10.5.8 and I have installed python from > http://www.python.org/ftp/python/2.5.4/python-2.5.4-macosx.dmg because I do not > want to use System python (python which already comes installed with Mac OS X) Why 2.5.4? That is an ancient release. > > and have totally removed system python. You have broken your system in a way that needs a reinstall to fix. Just like you cannot remove /usr/bin and expect the system to continue you cannot remove /System/Library/Frameworks/Python.framework. Furthermore there is no need whatsoever to remove the system install to use another version. > > Now when I try to install pyobjc it installs, but on import gives error I don't know why this happens and won't try to debug issues with ancient versions of Python. The next release of pyobjc, which will be released any day now, won't support python 2.5 at all because I use syntax that was introduced in 2.6. The release beyond that will have hard dependencies on features that cannot be implemented with CPython 2.5 at all. Ronald |
From: anurag u. <anu...@ya...> - 2010-07-16 16:35:22
|
Thanks a lot! I will see i I can move to python 2.6, or will try to build older version of pyobjc. I am new to Mac and confused by universal binary issue, I want to build a standalone version of my app which will run on intel/ppc etc So I don't wanted to use System Python as per various threads e.g. http://aralbalkan.com/1675 py2app won't include system python with distributable. I did not remove /System/Library/Frameworks/Python.framework but when pyobjc build failed I thought things may be getting mixed so renamed /System/Library/Frameworks/Python.framework temporarily as last resort, though my system worked perfectly after that :) rgds Anurag ----- Original Message ---- From: Ronald Oussoren <ron...@ma...> To: anurag uniyal <anu...@ya...> Cc: pyo...@li... Sent: Fri, 16 July, 2010 8:01:20 PM Subject: Re: [Pyobjc-dev] import objc -> Symbol not found: _PyType_Modified On 16 Jul, 2010, at 8:36, anurag uniyal wrote: > My system is Mac OS X 10.5.8 and I have installed python from > http://www.python.org/ftp/python/2.5.4/python-2.5.4-macosx.dmg because I do not > > want to use System python (python which already comes installed with Mac OS X) Why 2.5.4? That is an ancient release. > > and have totally removed system python. You have broken your system in a way that needs a reinstall to fix. Just like you cannot remove /usr/bin and expect the system to continue you cannot remove /System/Library/Frameworks/Python.framework. Furthermore there is no need whatsoever to remove the system install to use another version. > > Now when I try to install pyobjc it installs, but on import gives error I don't know why this happens and won't try to debug issues with ancient versions of Python. The next release of pyobjc, which will be released any day now, won't support python 2.5 at all because I use syntax that was introduced in 2.6. The release beyond that will have hard dependencies on features that cannot be implemented with CPython 2.5 at all. Ronald |