Closed mgrunwald closed 1 year ago
[dependencies.attiny-hal] git = "https://github.com/rahix/avr-hal" version = "*" features = ["attiny85"]
For an MCVE, in order for it to be reproducible later, it would help greatly if the crate version and git revision was specified, or better yet, a crate version on crates.io. Otherwise changes in a dependency's library code could affect repro, and this can be especially important in the embedded ecosystem, as such crates rely more on e.g. inline assembly which was only recently stabilized and only for certain architectures which have had more validation through well-known usage.
I believe you can find the version and revision that Cargo selected in the Cargo.lock file it generated.
Does this still happen if you include this in your Cargo.toml
[profile.release] lto = true
and use cargo build -Z build-std=core --target avr-attiny85.json --release
?
[dependencies.attiny-hal] git = "https://github.com/rahix/avr-hal" version = "*" features = ["attiny85"]
For an MCVE, in order for it to be reproducible later, it would help greatly if the crate version and git revision was specified
That makes a lot of sense, I updated my original post.
Does this still happen if you include this in your Cargo.toml
[profile.release] lto = true
and use
cargo build -Z build-std=core --target avr-attiny85.json --release
?
No it doesn't! In fact, It compiles without error now :D Thanks a lot!
Thanks for reporting!
Hopefully we can figure out a way to make this at least not require manual configuration to work.
I tried this code …
… with this Cargo.toml …
… and this target avr-attiny85.json …
… using today's rust nightly (
rustc 1.69.0-nightly (4507fdaaa 2023-02-18)
) and this commandline:I expected to see this happen: Given that I'm trying to compile rust for avr without success for a while, the only thing I expect is that the compiler doesn't crash.
Instead, this happened:
This seems very much related to this recently closed issue: https://github.com/rust-lang/rust/issues/88252
Meta
rustc --version --verbose
:I wasn't able to create a backtrace using
RUST_BACKTRACE=1 cargo build
.Background story in users.rust-lang.org: https://users.rust-lang.org/t/sigsegv-when-trying-to-build-minimal-program-for-attiny85/89282
Edit: I updated the version info and git revision for attiny-hal