Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac build does not run #8121

Closed
xoriole opened this issue Aug 28, 2024 · 2 comments · Fixed by #8123
Closed

Mac build does not run #8121

xoriole opened this issue Aug 28, 2024 · 2 comments · Fixed by #8123
Assignees
Milestone

Comments

@xoriole
Copy link
Contributor

xoriole commented Aug 28, 2024

Mac build does not run on Macbook Pro M2.

Fails with the following stacktrace on console:

Traceback (most recent call last):
  File "PyInstaller/loader/pyimod03_ctypes.py", line 53, in __init__
  File "ctypes/__init__.py", line 374, in __init__
OSError: dlopen(/opt/homebrew/lib/libsodium.dylib, 0x0006): tried: '/opt/homebrew/lib/libsodium.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/libsodium.dylib' (no such file), '/opt/homebrew/lib/libsodium.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/opt/homebrew/Cellar/libsodium/1.0.20/lib/libsodium.26.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/libsodium/1.0.20/lib/libsodium.26.dylib' (no such file), '/opt/homebrew/Cellar/libsodium/1.0.20/lib/libsodium.26.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "run_tribler.py", line 19, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 378, in exec_module
  File "tribler/core/session.py", line 10, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 378, in exec_module
  File "ipv8/loader.py", line 13, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 378, in exec_module
  File "ipv8/keyvault/crypto.py", line 9, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 378, in exec_module
  File "ipv8/keyvault/private/libnaclkey.py", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller/loader/pyimod02_importers.py", line 378, in exec_module
  File "libnacl/__init__.py", line 87, in <module>
  File "libnacl/__init__.py", line 21, in _get_nacl
  File "ctypes/__init__.py", line 452, in LoadLibrary
  File "PyInstaller/loader/pyimod03_ctypes.py", line 55, in __init__
pyimod03_ctypes.install.<locals>.PyInstallerImportError: Failed to load dynlib/dll '/opt/homebrew/lib/libsodium.dylib'. Most likely this dynlib/dll was not found when the application was frozen.
[PYI-50476:ERROR] Failed to execute script 'run_tribler' due to unhandled exception!
@xoriole xoriole changed the title Mac build does not run on Apple Silicon Mac build does not run Aug 28, 2024
@Tribler Tribler deleted a comment from scheichreisuli Aug 28, 2024
@xoriole
Copy link
Contributor Author

xoriole commented Aug 28, 2024

Tested on the build machine, both the current Github build and Jenkins build are not working on both Intel and Apple silicon. No stacktrace is available for Intel mac.

@qstokkink
Copy link
Contributor

Based on have 'arm64', need 'x86_64', I guess we'll need to make a separate build for arm64.

We're now building on a macos-12 image, which is x86_64. It seems like we'll have to add a macos-14 image build for arm64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants
@xoriole @qstokkink and others