-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Error when cross-compiling #7629
Comments
Well, that's a fascinating error. Looking at |
Yes indeed it is... with a bit of black magic perhaps 🤷 |
Looks like a lot of black magic :-) A quick look at the log suggests that even host binaries are being built with a |
That explains a lot already, thnx. In this specific case I was using the following wich does indeed enforce
My other attempt (of many) was such as:
And failed such as the following log output: I believe when compiling "host" tools it takes into consideration the entire environment pointing towards the cross-compiling toolchain:
I now presume that this second option is the right path forward but I would need is the ability to set "host" environment variables so it doesn't use the default set of EDIT : This is where using a target My guess is that I would need to specify for the build at the very least
|
I think this is problematic, |
Indeed, I took good note of that. And thnx for the link, it refers to another set of variable that I might have overseen such as This thread also looks promising rust-lang/rust#94003 Will further investigate that. |
@alex got a fix for this that you might like to know for other issues like this one, it For reference: PyO3/setuptools-rust#294 (comment) Closing as issue is with |
Working on adapting the
spksrc
framework to allow cross-compiling python wheels wich needsrustc
compiler. Framework currently works really well at building all kinds of cross-compiled or pure-python wheels. Currently adding the necessary bits so rust support makes it through when cross-compiling wheels withpip
.As such I'm expecting that there may be loose-ends on my current experimental code to get this going. My hope is that you may provide me with some pointers.
Currently the only platform where it works is when the target = host (e.g.
x86_64
)Versions:
arch
: armv5, armv7, armv7l, armv8 (aarch64), i686python
:3.10.6
libffi
:3.4.2
cryptography
: Any with rust support but focus on latest38.0.1
cffi
:1.15.1
(from crossenv)pip
:22.2.2
setuptools
:63.4.3
setuptools-rust
:1.5.1
Error hit on all targets:
The
Syntax error: word unexpected (expecting ")")
looks particulary of interest.When disabling clean-up of the wheel build directory on armv7 for instance, all files looked properly linked:
PR with on-going experimental changes to the framework: SynoCommunity/spksrc#5435
NOTE: PR mentioned above isn't yet fully in sync with my local build. Use logs below in the meantime.
build-aarch64-7.0.log
build-armv7-7.0.log
build-x64-7.0.log
The text was updated successfully, but these errors were encountered: