-
Notifications
You must be signed in to change notification settings - Fork 66
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
Support for build scripts where host and target architecture match #97
Comments
What I find a bit strange about this error, however, is that it claims that
|
This sounds similar to #94 - could you please double-check that you've updated to the latest |
Hi @nastevens, I am indeed on the latest master, you can confirm that from the yocto build configuration:
Perhaps this is an issue with build host and target architecture being (almost) the same?
|
This is the output of
|
Digging in a bit deeper, I can confirm that diff --git a/classes/cargo.bbclass b/classes/cargo.bbclass
index bcb2c05..9f62759 100644
--- a/classes/cargo.bbclass
+++ b/classes/cargo.bbclass
@@ -61,7 +61,7 @@ create_cargo_config() {
else
echo > ${CARGO_HOME}/config
echo "[target.${RUST_TARGET}]" >> ${CARGO_HOME}/config
- echo "linker = '${WRAPPER_DIR}/linker-wrapper.sh'" >> ${CARGO_HOME}/config
+ echo "linker = '${WRAPPER_DIR}/linker-native-wrapper.sh'" >> ${CARGO_HOME}/config
fi
echo >> ${CARGO_HOME}/config Although I am skeptical as to whether the final binary will run on my target. I will test this now. |
Indeed, this doesn't work and reports file not found, which as I understand, means that the loader was not found.
The output of ldd (run on the host since I don't have ldd on the target) is as follows, which is almost identical to #56
|
@nastevens as you mentioned in your comment, the change in 2c460c0 causes problems for |
@allsey87 last time I looked at this, we got non-build-script crates working. It seems we are blocked on Rust itself not allowing to have individual target setups for the same target. |
@otavio do you know if there been an issue opened for this on the Rust's/cargo's repo? |
@allsey87 yes, I found it in the past but didn't find it now. Sorry. |
@allsey87 @otavio Seems like this might be the issue in question? rust-lang/cargo#3349. |
@rich-g exactly. It has a patch under work to fix it. |
Looks like the right tooling is now (or will be shortly) in place in nightly: https://github.com/rust-lang/cargo/blob/master/src/doc/src/reference/unstable.md#host-config |
Yes, however, I believe we cannot use it stable until it is release. Am I wrong? |
You're correct for how things work at present. You can work around it as described in #101 but I wouldn't feel comfortable adding the changes more generally until this is stabilized. That said I'm definitely open to workarounds using current stable if anyone has any ideas. |
The fix is available as of rust |
Should be fixed with the merge of #146 |
Is it the case at the moment, that any package using a build script will not compile?
With an empty project, it seems that as soon as I add a dependency on a package that includes a
build.rs
, the build fails. For example, if I add log as a dependency, I get the output:My Yocto build configuration is as follows:
The text was updated successfully, but these errors were encountered: