-
Notifications
You must be signed in to change notification settings - Fork 212
defmt-0.3.9 failed to build #2679
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
Comments
there wasn't any related change in docs.rs, though I can only imagine it's either related to your code, or perhaps that the new nightly version changed something. |
Maybe |
this is the diff: knurling-rs/defmt@defmt-v0.3.8...defmt-v0.3.9 |
ah, I remember there is also diff.rs: https://diff.rs/defmt/0.3.8/defmt/0.3.9/Cargo.toml |
Do you use ➜ defmt git:(release-defmt-0.3.10) rustc +nightly --version
rustc 1.83.0-nightly (06bb8364a 2024-10-01)
➜ defmt git:(release-defmt-0.3.10) cargo +nightly build --target=thumbv6m-none-eabi
Compiling bitflags v1.3.2
Compiling defmt v0.3.9 (/Users/jonathan/Documents/knurling-rs/defmt/defmt)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.23s
➜ defmt git:(release-defmt-0.3.10) cargo +nightly build --target=thumbv6m-none-eabi -Zbuild-std
Compiling gimli v0.29.0
error[E0432]: unresolved import `alloc::sync`
--> /Users/jonathan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gimli-0.29.0/src/read/dwarf.rs:2:12
|
2 | use alloc::sync::Arc;
| ^^^^ could not find `sync` in `alloc`
error[E0432]: unresolved import `alloc::sync`
--> /Users/jonathan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gimli-0.29.0/src/read/abbrev.rs:4:12
|
4 | use alloc::sync::Arc;
| ^^^^ could not find `sync` in `alloc`
For more information about this error, try `rustc --explain E0432`.
error: could not compile `gimli` (lib) due to 2 previous errors
➜ defmt git:(release-defmt-0.3.10) cargo +nightly build --target=thumbv6m-none-eabi -Zbuild-std=core
Compiling bitflags v1.3.2
Compiling defmt v0.3.9 (/Users/jonathan/Documents/knurling-rs/defmt/defmt)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.25s
➜ defmt git:(release-defmt-0.3.10) |
The error message appears to come from here: https://github.com/rust-lang/cargo/blob/81e0670dddefc0b78b272e58decc0eea9def3720/src/cargo/core/compiler/standard_lib.rs#L80 |
Which was added last week: rust-lang/cargo@5e4a1db |
Yup: ➜ defmt git:(release-defmt-0.3.10) RUSTC=~/Downloads/rust-nightly/rust-nightly-aarch64-apple-darwin/rustc/bin/rustc ~/Downloads/rust-nightly/rust-nightly-aarch64-apple-darwin/cargo/bin/cargo build --target=thumbv6m-none-eabi -Zbuild-std
error: building std is not supported on the following targets: thumbv6m-none-eabi ➜ defmt git:(release-defmt-0.3.10) RUSTC=~/Downloads/rust-nightly/rust-nightly-aarch64-apple-darwin/rustc/bin/rustc ~/Downloads/rust-nightly/rust-nightly-aarch64-apple-darwin/cargo/bin/cargo build --target=thumbv6m-none-eabi -Zbuild-std=core
error: "/Users/jonathan/Downloads/rust-nightly/rust-nightly-aarch64-apple-darwin/rustc/lib/rustlib/src/rust/library/Cargo.lock" does not exist, unable to build with the standard library, try:
rustup component add rust-src No idea how to add rust-src to a tarball installation, but that's the error. |
I sent https://crates.io/crates/thejpster-test-docs-target down the line, which is an inoffensive test crate. If you can't build it then I'm pretty sure it's a docs.rs but and not a defmt bug. |
@GuillaumeGomez you mean we need add it do the docs.rs metadata to use #2107 ?
there was no docs.rs change that might cause this, so I imagine the nighty version changes you linked could cause the error. If you have a test crate that errors too (and IMO it likely will with the targets) we might try it with |
It's not clear when it's needed. Also, I'm surprised it worked without using |
AFAIK will need -Zbuild-std=core when building for a target that doesn't have libstd. I guess most of your crates build for the host machine, but the docs.rs metadata for this one forces you to build it for |
https://crates.io/crates/thejpster-test-docs-target is perpetually stuck at the back of the queue, perhaps because you've rated as a crate of low value (it is, it's terrible). |
it's not deprioritized, so has the same prio as normal releases (deprioritized is shown in braces after the crate, if we do it, like |
So why is everything else being added to the queue in front of it? It was one-from-last and 27th and is now one-from-last and 63rd. |
I can't Check the logs right now, my guess is build-attempts. For a certain type of build errors ( like the one from the original crate) we actually try the build up to 5 times with a delay in between. |
Ah, it did build but it went back in the queue!! and it failed: https://docs.rs/crate/thejpster-test-docs-target/0.1.0/builds/1567394
So yup, not defmt's fault. |
so, I don't know enough about the build process around these targets to be able to judge where the problem lies, in the cargo change, in how docs.rs builds docs, of if we're missing a build arg ( What I know is that before the mentioned cargo change, the doc build works. So I froze the nightly version docs.rs uses to |
I want to create a bug-report for cargo, @jonathanpallant could you push the test crate to github so I can include it? |
I wonder if |
I started with a zulip thread |
the final fix is still in progress, but since there were some other releases that needed a newer version I un-froze the nightly version. Feel free to ping me if you need to build another release, and we can handle it together. It might also be worth trying to add |
coming from the zulip discussion I would say this is fixed now. Feel free to reopen if it breaks again, if it fails please first try adding |
Crate name
defmt
Build failure link
https://docs.rs/crate/defmt/0.3.9/builds/1566395
Additional details
I don't think we changed anything substantial since defmt-0.3.8, which built OK.
The text was updated successfully, but these errors were encountered: