darlinghq / darling

Darwin/macOS emulation layer for Linux
http://www.darlinghq.org
GNU General Public License v3.0
11.57k stars 448 forks source link

Symbol not found _NSMenuDidBeginTrackingNotification in AppKit #991

Open Xinmudotmoe opened 3 years ago

Xinmudotmoe commented 3 years ago

Expected Result Python3 Idle3 is work.

Actual Result Try run './idle3', found:

% ./idle3 
** IDLE can't import Tkinter.
Your Python may not be configured for Tk. **

Steps To Reproduce

  1. Install Python 3.9.6 (macOS 64-bit Intel installer).
  2. in /Library/Frameworks/Python.framework/Versions/3.9/bin run ./idle3

System Information

Software Version
Linux Kernel 5.12.12
Darling 26f4be2c42cfc5866339777f38dfaa73e2bddc19
Python d714923985e0303b9e9b037e5f7af815 (python-3.9.6-macosx10.9.pkg)

Unit Test

% cat > test.py << EOF
heredoc> import tkinter
heredoc> EOF

% ./python3 test.py
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/test.py", line 1, in <module>
    import tkinter
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 37, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/lib-dynload/_tkinter.cpython-39-darwin.so, 2): Symbol not found: _NSMenuDidBeginTrackingNotification
  Referenced from: /Library/Frameworks/Python.framework/Versions/3.9/lib/libtk8.6.dylib
  Expected in: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
 in /Library/Frameworks/Python.framework/Versions/3.9/lib/libtk8.6.dylib
Xinmudotmoe commented 3 years ago

I think it may be a GUI issue, because it is a GUI library.