Running from source on Apple M1 AppleSilicon "wrong architecture"
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.6k
- Forks
- 3.5k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 61
Description
Seems that only libsecp256k1 stops me from using a native electrum on AppleSilicon, as python is already available for the M1 CPU.
After building libsecp256k1 using
$ gcc -dumpmachine
arm64-apple-darwin20.2.0
$ GCC_TRIPLET_HOST="arm64-apple-darwin20.2.0" ./contrib/make_libsecp256k1.sh
My error message is:
name@Mac-mini Electrum-4.0.9 % ./run_electrum
E | ecc_fast | libsecp256k1 library failed to load. exceptions: [OSError('dlopen(/Users/name/Downloads/Electrum-4.0.9/electrum/libsecp256k1.0.dylib, 6): no suitable image found. Did find:\n\t/Users/name/Downloads/Electrum-4.0.9/electrum/libsecp256k1.0.dylib: mach-o, but wrong architecture\n\t/Users/name/Downloads/Electrum-4.0.9/electrum/libsecp256k1.0.dylib: mach-o, but wrong architecture'), OSError('dlopen(libsecp256k1.0.dylib, 6): image not found')]
Error: Failed to load libsecp256k1.
What went wrong here?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with contrib/make_libsecp256k1.sh and the libsecp256k1 loading path reached by run_electrum. Reproduce the Apple Silicon build and inspect the generated libsecp256k1.0.dylib architecture against the native Python process; done means the source build loads successfully on Apple Silicon or the incompatibility is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, macos, python
- Domain
- build-system, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100