cmuratori / computer_enhance

Source code for the https://computerenhance.com programming series

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sim DLL doesn't work on Apple M1 running Ventura 13.6

tmelot2 opened this issue · comments

I think the issue is that MacOS wants binary files in "Mach-O" format, which the DLLS aren't. Found a post (here) that seems to confirm.

I will try & build myself in the mean time. If I get it working, would it be helpful to post the MacOS DLL?

Thank you!

Full error for context:

Traceback (most recent call last):
  File "/Users/username/dev/computer-enhance/sim86_test.py", line 1, in <module>
    import sim86
  File "/Users/username/dev/computer-enhance/sim86.py", line 202, in <module>
    dll = ctypes.CDLL(str(pathlib.Path(__file__).parent / "sim86_shared_debug.dll"))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.7/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ctypes/__init__.py", line 376, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: dlopen(/Users/username/dev/computer-enhance/sim86_shared_debug.dll, 0x0006): tried: '/Users/username/dev/computer-enhance/sim86_shared_debug.dll' (not a mach-o file), '/System/Volumes/Preboot/Cryptexes/OS/Users/username/dev/computer-enhance/sim86_shared_debug.dll' (no such file), '/Users/username/dev/computer-enhance/sim86_shared_debug.dll' (not a mach-o file)

I don't supply MacOS stuff for the course. It's Windows-only. People are welcome to follow along on MacOS and Linux (and many do), but we do not ship builds for it.

- Casey