capstone-engine / capstone

Capstone disassembly/disassembler framework for ARM, ARM64 (ARMv8), Alpha, BPF, Ethereum VM, HPPA, LoongArch, M68K, M680X, Mips, MOS65XX, PPC, RISC-V(rv32G/rv64G), SH, Sparc, SystemZ, TMS320C64X, TriCore, Webassembly, XCore and X86.
http://www.capstone-engine.org
7.61k stars 1.56k forks source link

pip install on Mac #2327

Closed jpziegler closed 6 months ago

jpziegler commented 7 months ago

Work environment

Questions Answers
OS/arch/bits MacOS AArch64
Architecture arm64
Source of Capstone pip
Version/git commit see description

Expected behavior

Should install arm64 version of capstone.

Actual behavior

Installs x86 version of capstone.

Here's the error I'm seeing:

OSError: dlopen(/Users/xxx/.pyenv/versions/3.12.2/lib/python3.12/site-packages/capstone/lib/libcapstone.dylib, 0x0006): tried: '/Users/xxx/.pyenv/versions/3.12.2/lib/python3.12/site-packages/capstone/lib/libcapstone.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/xxx/.pyenv/versions/3.12.2/lib/python3.12/site-packages/capstone/lib/libcapstone.dylib' (no such file), '/Users/xxx/.pyenv/versions/3.12.2/lib/python3.12/site-packages/capstone/lib/libcapstone.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))

Steps to reproduce the behavior

I ran into this when attempting to install ROPGadget. Therefore, it's possible that this is a downstream issue.

pip install ROPGadget
ROPgadget
Rot127 commented 6 months ago

This is a duplicate of https://github.com/capstone-engine/capstone/issues/2301 and https://github.com/capstone-engine/capstone/issues/2066. https://github.com/capstone-engine/capstone/issues/2301/https://github.com/capstone-engine/capstone/issues/2066 were fixed with https://github.com/capstone-engine/capstone/pull/2221 but not yet release as part of v5.0.2.