meta-rust
meta-rust copied to clipboard
rustc-native: Can't get target-list
Version(s) of meta-rust
Version(s) of poky and/or oe-core
dunfell
Expected result
running rustc --print target-list
should provide a list of targets
Actual result
running above command provides:
error: Error loading target specification: Could not find specification for target "x86_64-linux". Run `rustc --print target-list` for a list of built-in targets
Steps to reproduce
- Build rustc-native
bitbake rust-native
. Ensure work is not removed - from rustc work directory, find the to-be installed vesrion of
rustc
. This is usually inimage/<something>/x86_64-linux/rust-native/<more stuff>/recipe-sysroot-native/usr/bin/rustc
- Run the command
rustc --print target-list
from OUTSIDE of the directory of where the binary is located.
Funnily enough, if I run it inside the directory where rustc is located, I don't get any errors.
I'm trying to get python3-cryptography version 36, 37, 39 running on our dunfell builds. These have a dependency on rust and somewhere in the setuptools, it's running ['rustc', '--print', ''-target-list"]
top google search hinted at exporting RUST_TARGET_PATH
to location of rustlib
which helps resolve the issue.
@mhuangwm I was trying to add the RUST_TARGET_PATH
, this appears to fix the native case, but now I'm getting the error message for the aarch64 target. Did you get any fixes for this?
Sorry I don't recall having any issues with the aarch64 target.