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

Cannot compile on nightly with no_std #1720

Closed
MathiasKoch opened this issue Jan 15, 2020 · 3 comments
Closed

Cannot compile on nightly with no_std #1720

MathiasKoch opened this issue Jan 15, 2020 · 3 comments

Comments

@MathiasKoch
Copy link
Contributor

MathiasKoch commented Jan 15, 2020

Trying to compile on nightlies with default-features = false, in a no-std project, results in

error[E0463]: can't find crate for `std`
  |
  = note: the `thumbv7em-none-eabihf` target may not be installed

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: could not compile `serde`.

Not sure how long back this is an issue.

@Michael-F-Bryan
Copy link

I don't think this is related to serde. Have a look at rust-embedded/cortex-m-quickstart#58, you're probably missing a #![no_std] annotation at the top of your lib.rs.

@MathiasKoch
Copy link
Contributor Author

Nope.. It has #![no_std] and works great with a large number of other no_std crates.

Only change it takes to make it fail building is
serde = { version = "1.0.104", default-features = false }
in my Cargo.toml

@MathiasKoch
Copy link
Contributor Author

Update:
Figured out what went wrong.

This issue describes perfectly what was happening rust-lang/cargo#5730

The issue is that i was having build-dependencies using std lib.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants