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

Failed to compile under pypy2-v6.0.0-linux64 #143

Closed
ddorian opened this issue Aug 8, 2018 · 4 comments
Closed

Failed to compile under pypy2-v6.0.0-linux64 #143

ddorian opened this issue Aug 8, 2018 · 4 comments
Labels

Comments

@ddorian
Copy link

ddorian commented Aug 8, 2018

Hi,

This module is installed by https://github.com/snipsco/snips-nlu-utils. On cpython it works fine, but on pypy I get a an error message of "Could not compile cpython".

More details from verbose output here snipsco/snips-nlu-utils#46 (comment)

regards,
ddorian

@ssokolow
Copy link

ssokolow commented Aug 8, 2018

rust-cpython is a set of bindings for the libpython... included with CPython and explicitly doesn't list any PyPy versions as supported.

That said, given that PyPy does have CPyExt for supporting modules using the CPython API, it's entirely possible that it could be supported if someone's willing to donate the effort to make it work.

(As much as I'd love my rust-cpython projects to be able to support PyPy, I don't trust myself to write unsafe code.)

@dgrunwald
Copy link
Owner

python27-sys is essentially all the Python C headers converted to Rust (including struct and macro definitions). Unless pypy is binary compatible with cpython, it won't work. I never looking at PyPy in detail but I was under the impression that it provides its own headers that are more-of-less source-compatible with Python.h, but result in a different ABI.
So what's likely needed here is that someone writes a cpyext-sys crate for linking Rust code against pypy; and then rust-cpython could use that instead of python27-sys.

@dgrunwald
Copy link
Owner

By the way, the particular problem in your log is even earlier: the python27-sys build.rs script fails determining whether your python interpreter has threading support; so python27-sys is compiled without threading support; but rust-cpython requires threading support.

@markbt markbt added the wontfix label Feb 4, 2020
@markbt
Copy link
Collaborator

markbt commented Feb 4, 2020

PyPy is explicitly out of scope, we're focused on the CPython implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants