Installation on macOS (M1) fails
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 560
- Avg merge
- 1h 41m
- Merged PRs (30d)
- 3
Description
I tried to install pyOCD as part of the Zephyr SDK on my Mac Mini M1. However, I'm facing an issue:
No matter if using the zephyr installer command west packages pip --install or use pip install pyocd, pip install --no-binary capstone pyocd or python3 -mpip install -U pyocd, the installation always fails with:
Using cached pycparser-2.22-py3-none-any.whl (117 kB)
Building wheels for collected packages: capstone
Building wheel for capstone (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [71 lines of output]
running bdist_wheel
running build
# ....
arch/M680X/M680XDisassembler.c:2124:20: warning: variable 's_cpu_type' is not needed and will not be emitted [-Wunneeded-internal-declaration]
2124 | static const char *s_cpu_type[] = {
| ^~~~~~~~~~
CC arch/EVM/EVMInstPrinter.o
CC arch/EVM/EVMMapping.o
CC arch/EVM/EVMModule.o
CC MCInst.o
GEN capstone.pc
1 warning generated.
LINK libcapstone.so.4
AR libcapstone.a
ar: creating archive ./libcapstone.a
ld: unknown options: -soname
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libcapstone.so.4] Error 1
error: [Errno 2] No such file or directory: 'libcapstone.4dylib'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for capstone
Running setup.py clean for capstone
Failed to build capstone
ERROR: Failed to build installable wheels for some pyproject.toml based projects (capstone)
or
# ...
Building wheels for collected packages: capstone
Building wheel for capstone (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [72 lines of output]
running bdist_wheel
running build
Building C extensions
# ..
error: [Errno 2] No such file or directory: 'libcapstone.4.dylib'
[end of output]
note: This error originates from a subprocess and is likely not a problem with pip.
ERROR: Failed building wheel for capstone
Running setup.py clean for capstone
Failed to build capstone
ERROR: Failed to build installable wheels for some pyproject.toml-based projects (capstone)
Traceback (most recent call last):
File "/Users/REDACTED/zephyrproject/.venv/lib/python3.13/site-packages/west/app/main.py", line 561, in run_command
self.run_extension(args.command, argv)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
File "/Users/REDACTED/zephyrproject/.venv/lib/python3.13/site-packages/west/app/main.py", line 716, in run_extension
self.cmd.run(args, unknown, self.topdir, manifest=self.manifest,
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
config=self.config)
^^^^^^^^^^^^^^^^^^^
# ... (much more)
Would be happy if someone can help me out, thanks.
Contributor guide
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 the reported capstone build output, especially the macOS M1 linker error involving -soname and the missing libcapstone.4.dylib. Trace how pyOCD installs capstone through pip and determine whether installation can complete on this platform; done means the documented installation commands succeed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, python
- Domain
- embedded-iot, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100