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

MacOS wheel only contains x86_64 version of the libcapstone.dylib despite the package claims to be universal #2301

Closed
xusheng6 opened this issue Mar 28, 2024 · 3 comments
Labels
bug build & packaging Build system and packaging related duplicate
Milestone

Comments

@xusheng6
Copy link

I installed capstone using pip install capstone and the installation succeeds. However, when I try to run Python and import capstone, I am met with the following error:

OSError: dlopen(/opt/homebrew/lib/python3.11/site-packages/capstone/lib/libcapstone.dylib, 0x0006): tried: '/opt/homebrew/lib/python3.11/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/opt/homebrew/lib/python3.11/site-packages/capstone/lib/libcapstone.dylib' (no such file), '/opt/homebrew/lib/python3.11/site-packages/capstone/lib/libcapstone.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))

I checked the wheel for macOS (https://files.pythonhosted.org/packages/56/c9/936a81a0707fbd2650a94c9297e36c4c2cf34f51695fb1f6fd39de1b3247/capstone-5.0.1-py3-none-macosx_10_9_universal2.whl), and found the libcapstone.dylib is x86_64 only, and not universal, as it claims to be (on https://pypi.org/project/capstone/#files).

I tested brew install capstone and it gives me an arm64 libcapstone.dylib in /opt/homebrew/Cellar/capstone/5.0.1/lib. I figured out a workaround that is to copy the dylib from the brew installation folder to the pip installation folder.

Work environment

Questions Answers
OS/arch/bits MacOS AArch64,
Architecture armv8
Source of Capstone pip
Version/git commit v5.0.1

Expected behavior

Actual behavior

Steps to reproduce the behavior

  • Use code markdown CODE to make your code visible

Additional Logs, screenshots, source code, configuration dump, ...

Drag and drop zip archives containing the Additional info here, don't use external services or link.
Screenshots can be directly dropped here.

@Rot127 Rot127 added this to the v5.0.2 milestone Mar 29, 2024
@Rot127 Rot127 added the build & packaging Build system and packaging related label Mar 29, 2024
@Rot127
Copy link
Collaborator

Rot127 commented Mar 29, 2024

Thanks for the report! I close this as duplicate because it:

@andiradulescu
Copy link

@Rot127 when is v5.0.2 planned for release? I don't see a date here. Thanks!

@Rot127
Copy link
Collaborator

Rot127 commented Jul 22, 2024

@andiradulescu v5.0.2 is released after #2400 is merged by @kabeor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug build & packaging Build system and packaging related duplicate
Projects
None yet
Development

No branches or pull requests

3 participants