[MacPorts] #62475: py-pyobjc @7.1_0: Symbol not found: _ffi_find_closure_for_code_np

MacPorts noreply at macports.org
Wed Mar 17 17:28:17 UTC 2021


#62475: py-pyobjc @7.1_0: Symbol not found: _ffi_find_closure_for_code_np
----------------------+-----------------------
 Reporter:  dsedivec  |      Owner:  (none)
     Type:  defect    |     Status:  new
 Priority:  Normal    |  Milestone:
Component:  ports     |    Version:  2.6.4
 Keywords:            |       Port:  py-pyobjc
----------------------+-----------------------
 I get the following error when trying to use PyObjC as bundled by
 MacPorts:

 {{{
 $ /opt/local/bin/python3.9
 Python 3.9.2 (default, Mar 16 2021, 12:04:06)
 [Clang 12.0.0 (clang-1200.0.32.29)] on darwin
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import Cocoa
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/Cocoa/__init__.py", line 9, in <module>
     import AppKit
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/AppKit/__init__.py", line 10, in <module>
     import Foundation
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/Foundation/__init__.py", line 9, in <module>
     import CoreFoundation
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/CoreFoundation/__init__.py", line 9, in <module>
     import objc
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/objc/__init__.py", line 6, in <module>
     from . import _objc
 ImportError:
 dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/objc/_objc.cpython-39-darwin.so, 2): Symbol not found:
 _ffi_find_closure_for_code_np
   Referenced from:
 /opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/objc/_objc.cpython-39-darwin.so
   Expected in: flat namespace
  in
 /opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9
 /site-packages/objc/_objc.cpython-39-darwin.so
 }}}

 (Faster way to test this from your shell: `/opt/local/bin/python3.9 -c
 'import Cocoa')

 Test system is a freshly-reinstalled 2019 MBP (so x86_64 not M1) running
 macOS 11.2.3.

 I got the same error when testing with Python 3.8 from MacPorts.  Using
 Apple's `/usr/bin/python3` to make a virtualenv and install PyObjC with
 pip works fine.

-- 
Ticket URL: <https://trac.macports.org/ticket/62475>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list