Skip to content

Doesn't compile for riscv32imc-unknown-none-elfanymore #14

@bjoernQ

Description

@bjoernQ

e.g. cargo build --no-default-features --features "alloc,use_serde,use_strum,use_numenum" --target riscv32imc-unknown-none-elf "-Zbuild-std=core,alloc,panic_abort" "-Zbuild-std-features=panic_immediate_abort" used to compile fine but doesn't anymore.

Going back the history there is some point when it works (e.g. 6e653ff4285472ee73c3dab67d2b8240e5814c53 ... but that was just randomly picked).

The line that introduced the problem:

error[E0432]: unresolved import `alloc::sync`
   --> src\mqtt\client.rs:255:16
    |
255 |     use alloc::sync::Arc;
    |                ^^^^ could not find `sync` in `alloc`

Problem is: alloc::sync is only available on targets that support atomic pointers. No idea why it works with IDF, t.b.h. - maybe because of atomic emulation there.

Since these traits are meant to be generally useful not only for ESP (and definitely not only ESP-IDF) based targets, I'd consider this to be a bug.

This currently blocks upgrading the dependency in esp-wifi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions