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

rustc-native: Can't get target-list #406

Open
mhuangwm opened this issue Mar 1, 2023 · 3 comments
Open

rustc-native: Can't get target-list #406

mhuangwm opened this issue Mar 1, 2023 · 3 comments

Comments

@mhuangwm
Copy link

mhuangwm commented Mar 1, 2023

Version(s) of meta-rust

master

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

  1. Build rustc-native bitbake rust-native. Ensure work is not removed
  2. from rustc work directory, find the to-be installed vesrion of rustc. This is usually in image/<something>/x86_64-linux/rust-native/<more stuff>/recipe-sysroot-native/usr/bin/rustc
  3. 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"]

@mhuangwm
Copy link
Author

mhuangwm commented Mar 1, 2023

top google search hinted at exporting RUST_TARGET_PATH to location of rustlib which helps resolve the issue.

@microhobby
Copy link

@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?

@mhuangwm
Copy link
Author

Sorry I don't recall having any issues with the aarch64 target.

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

No branches or pull requests

2 participants