-
Notifications
You must be signed in to change notification settings - Fork 79
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
Improving cross-compilation experience #109
Comments
I was about to open an issue requesting the ability to set this via configuration, so we don't need to surprise users with environmental variables when building crates. I am however unclear on why this couldn't be done automatically (and with sane defaults) if we detect the target to be different to the host? Somewhat related issue about building |
What configuration are you thinking of, ooc? Apart from environment variables there is nothing really or is there? I agree that this should be documented better though. Someone wants to give it a try? |
You mean setting "PKG_CONFIG_ALLOW_CROSS=1"? It's a totally artificial barrier added intentionally. It could be removed, but it would only lead to worse errors at later stages of the build. The problem is that
The real instruction should be:
Point (1) is a bit beyond scope of what Cargo crates should be doing, so it can't be automated. Point (2) could be automated for some well-known setups. |
Currently pkg-config-rs tries to prevent incorrect use of pkg-config for cross-compilation:
However, judging by questions on the Rust forum, users don't understand the problem. They only set the variable as instructed, and are disappointed that it still doesn't work.
I suggest changing this message to point users to a more complete explanation, e.g:
which would then instruct users to set sysroot, etc. first before enabling
PKG_CONFIG_ALLOW_CROSS=1
.The text was updated successfully, but these errors were encountered: