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

Get --target, etc., from sysconfig when cross compiling #138

Closed
benfogle opened this issue Mar 21, 2021 · 3 comments · Fixed by #139
Closed

Get --target, etc., from sysconfig when cross compiling #138

benfogle opened this issue Mar 21, 2021 · 3 comments · Fixed by #139

Comments

@benfogle
Copy link
Contributor

I am the maintainer of crossenv, and since cryptography started using setuptools-rust, I've started receiving issues since cross compiling that package no longer works out of the box. This can be fixed by gathering more information from sysconfig and passing that along to rustc.

(PR incoming)

@jameshilliard
Copy link
Contributor

jameshilliard commented Mar 21, 2021

Not sure if you're running into the exact same issue here but I'm seeing a potentially related issue when cross compiling with buildroot.

@messense
Copy link
Member

It is indeed error-prone when invoking bdist_wheel with --plat-name.

https://github.com/messense/manylinux2014-cross-arm/runs/2199462499 here I've asked it to build manylinux2014_aarch64 wheel and it does build the .so file with aarch64 gcc but named it wrong to x86_64.

❯ file pyo3_test.cpython-36m-x86_64-linux-gnu.so
pyo3_test.cpython-36m-x86_64-linux-gnu.so: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, with debug_info, not stripped

@benfogle
Copy link
Contributor Author

I think that issue is common to all Python. bdist_wheel only uses --plat-name to generate the output file name, so I think you'd see this no matter what module you were trying to compile. (The other commands aren't much better: build_ext, for example, tells you that --plat-name is for cross-compiling, but it only checks it if you're running Windows.)

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.

3 participants