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

Cargo embed fails with error[E0463]: can't find crate for core on Mac OS #8

Open
balintf opened this issue Oct 11, 2024 · 4 comments
Open
Assignees

Comments

@balintf
Copy link

balintf commented Oct 11, 2024

I have followed the guide at https://docs.rust-embedded.org/discovery-mb2, and at section 3.4. Verify the installation the cargo embed --target thumbv7em-none-eabihf command fails with multiple

error[E0463]: can't find crate for `core`

error messages, one for each dependency

I have added the target previously by running rustup target add thumbv7em-none-eabihf as the section 3.4 and the troubleshooting section suggested.

@balintf
Copy link
Author

balintf commented Oct 11, 2024

I think I have figured out the root cause of the issue, I have rustup installed from the rustup.rs website via the shell script installer and I seem to have rust also installed from homebrew:

> which cargo
/opt/homebrew/bin/cargo

> which rustup
/Users/bfarago/.cargo/bin/rustup

The solution was to uninstall rust from homebrew and use only the rustup version:

brew uninstall rust

We should add this either to the Mac OS section or the Troubleshooting section of the book.

@BartMassey
Copy link
Member

Thanks for the note! If you'd like to PR a fix, we'll take it. Otherwise I'll get around to writing something eventually. It would be better if you do it, as I don't have a modern Mac to try things out on and haven't used MacOS in a while.

@balintf
Copy link
Author

balintf commented Oct 12, 2024

I'll get a PR submitted for the next week, can you assign the issue to me?

@BartMassey
Copy link
Member

Done. Thanks!

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