Coder Social home page Coder Social logo

Comments (12)

stappersg avatar stappersg commented on July 30, 2024

from avr-hal.

kacper-cholewinski avatar kacper-cholewinski commented on July 30, 2024

Well, every avr target is custom made json, so it doesn't work with rustup target add

from avr-hal.

Rahix avatar Rahix commented on July 30, 2024

Hm, not finding core sounds like build-std is not active. There should be a configuration file .cargo/config.toml with the following lines:

[unstable]
build-std = ["core"]

This tells cargo to build core for your specific target.

What version of cargo and rustc are you using?

from avr-hal.

stappersg avatar stappersg commented on July 30, 2024

What version of cargo and rustc are you using?

And I would like to known additional information how to reproduce the error. Not for the error, but for solving the error.

from avr-hal.

kacper-cholewinski avatar kacper-cholewinski commented on July 30, 2024

What version of cargo and rustc are you using?

cargo --version: cargo 1.77.2 (e52e36006 2024-03-26)
rustc --version: rustc 1.77.2 (25ef9e3d8 2024-04-09)
rustup --version:

rustup 1.27.0 (bbb9276d2 2024-03-08)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.79.0-nightly (0ad927c0c 2024-03-21)`

rustup toolchain list:

stable-x86_64-pc-windows-msvc
nightly-2023-08-08-x86_64-pc-windows-msvc
nightly-2024-03-22-x86_64-pc-windows-msvc (override)
nightly-x86_64-pc-windows-msvc (default)

There is build-std = ["core"] present in my config.toml.

And I would like to known additional information how to reproduce the error.

There is not much to reproduce - I generated new project from template, for Arduino Uno, and used cargo run inside.

There is one thing that could be significant - I recently cleared my PATH env variable by accident, but I added .../.cargo/bin back, and it still doesn't work. Maybe there is some other path that I should add there again?

from avr-hal.

Rahix avatar Rahix commented on July 30, 2024

Hmm, can these numbers don't quite add up... Did you run all the .. --version commands inside the project directory? What are the contents of your rust-toolchain.toml?

from avr-hal.

kacper-cholewinski avatar kacper-cholewinski commented on July 30, 2024

Did you run all the .. --version commands inside the project directory?

Yep.

Hmm, can these numbers don't quite add up...

Well, it looks like rustc and cargo show latest stable release version, but below you can see that rust-toolchain.toml override works.

What are the contents of your rust-toolchain.toml?

Here you go:

[toolchain]
channel = "nightly-2024-03-22"
components = ["rust-src"]
profile = "minimal"

from avr-hal.

Rahix avatar Rahix commented on July 30, 2024

I'd expect to see this:

rustc 1.79.0-nightly (0ad927c0c 2024-03-21)
cargo 1.79.0-nightly (d438c80c4 2024-03-19)

Are you sure your rustc/cargo binaries are managed by rustup? Does

rustc +nightly-2024-03-22 --version

work or do you get an error?

from avr-hal.

kacper-cholewinski avatar kacper-cholewinski commented on July 30, 2024

Well, this is weird...
rustc +nightly-2024-03-22 --version: rustc 1.77.2 (25ef9e3d8 2024-04-09)

from avr-hal.

Rahix avatar Rahix commented on July 30, 2024

My best guess is that your rustup installation is broken in some way... Maybe delete all toolchains, reinstall rustup, and see if the problem persists. Or ask rustup upstream about it...

from avr-hal.

kacper-cholewinski avatar kacper-cholewinski commented on July 30, 2024

Maybe delete all toolchains, reinstall rustup, and see if the problem persists.

Well, I did it, and everything works now.
Weird thing is, this was actually second time I reinstalled everything, after problem occured for the first time. Only difference is, I've chosen "complete" installation instead of "default" (in rustup installer for Windows). I also noticed that now rustup installed all of the components for given nightly version, not only "rust-src" like before. This way all my rustc, cargo, etc. versions are synchronized now.

Thanks for all your help, I appreciate it.

from avr-hal.

stappersg avatar stappersg commented on July 30, 2024

Thanks for all your help, I appreciate it.

And thank you for the provided feedback.

What about closing this issue? If it should remain open, express for which reason.

Karma bonus points for "comment and close" with a text like:

On Microsoft windows version 9 installed Rust as advised for windows, cargo install cargo-generate, more notes, cargo generate URL-to-template projectname, cd projectname and cargo run worked for me on 2024-04-21.

from avr-hal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.