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

Capstone can't be built on 3.12 due to distutils removal #2223

Closed
rickmark opened this issue Dec 21, 2023 · 9 comments
Closed

Capstone can't be built on 3.12 due to distutils removal #2223

rickmark opened this issue Dec 21, 2023 · 9 comments

Comments

@rickmark
Copy link
Contributor

The python bindings rely on classical distutils, which is removed in 3.12. In order to work on newer versions of python the setup.py file must be migrated to use setuputils instead.

@XVilka
Copy link
Contributor

XVilka commented Dec 21, 2023

Should also be patched in 5.0.x series: #2081

@rickmark
Copy link
Contributor Author

Call me crazy but I'm looking at current next e3a2b4c and the setup.py file still leverages distutils... you're saying it will be addressed in the 5 series? The messaged implied that it was patched in 5.x

@XVilka
Copy link
Contributor

XVilka commented Dec 24, 2023

@rickmark no, I meant the fix should be cherry-picked to the capstone 5.x once it landed in next.

@rickmark
Copy link
Contributor Author

@rickmark no, I meant the fix should be cherry-picked to the capstone 5.x once it landed in next.

Thank you for the clarity! I've been noodling on how to accomplish this PR anyway, the short answer is there might need to be a specialized capstone_builder.py module that gets integrated into the process to do the make of the libcapstone before. setuptools doesn't have great options for adding build phases/external build systems from my reading.

One element of note, I did submit a PR to use cmake on macOS as it can build libcapstone.dylib FAT (arm64/x86_64). Might it be wise to just use it for all build paths and deprecate / remove classical makefile based builds?

@Rot127
Copy link
Collaborator

Rot127 commented Dec 28, 2023

I'd love it! @kabeor has the last say with this.

@XVilka
Copy link
Contributor

XVilka commented Jan 21, 2024

This is needed for the 6.0.0 release as well. @kabeor

@kabeor
Copy link
Member

kabeor commented Jan 21, 2024

Yes, it's time to add a new python build system:) Seems there still some works need to do before releasing. I'm welling to check out this once I finished my busy work recently😄

@Merculous
Copy link

Merculous commented Feb 14, 2024

Definitely needs an update. __init__.py is using distutils.sysconfig which breaks 3.12 installs.

Also, current release v5.0.1 won't work for 3.12.x versions.

@Rot127
Copy link
Collaborator

Rot127 commented Aug 17, 2024

Has been resolved with #2396

@Rot127 Rot127 closed this as completed Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants