Skip to content

Build failure on architecture without atomics #11

Description

@piegamesde

When I add the bitvec dependency to my embedded project (RISCV-32), I get the following compile errors:

error[E0432]: unresolved imports `core::sync::atomic::AtomicBool`, `core::sync::atomic::AtomicI8`, `core::sync::atomic::AtomicU8`
  --> $CARGO_HOME/registry/src/github.com-1ecc6299db9ec823/radium-0.7.0/src/lib.rs:44:34
   |
44 |         use core::sync::atomic::{AtomicBool, AtomicI8, AtomicU8};
   |                                  ^^^^^^^^^^  ^^^^^^^^  ^^^^^^^^ no `AtomicU8` in `sync::atomic`
   |                                  |           |
   |                                  |           no `AtomicI8` in `sync::atomic`
   |                                  no `AtomicBool` in `sync::atomic`

error[E0432]: unresolved imports `core::sync::atomic::AtomicI16`, `core::sync::atomic::AtomicU16`
  --> $CARGO_HOME/registry/src/github.com-1ecc6299db9ec823/radium-0.7.0/src/lib.rs:47:34
   |
47 |         use core::sync::atomic::{AtomicI16, AtomicU16};
   |                                  ^^^^^^^^^  ^^^^^^^^^ no `AtomicU16` in `sync::atomic`
   |                                  |
   |                                  no `AtomicI16` in `sync::atomic`

error[E0432]: unresolved imports `core::sync::atomic::AtomicI32`, `core::sync::atomic::AtomicU32`
  --> $CARGO_HOME/registry/src/github.com-1ecc6299db9ec823/radium-0.7.0/src/lib.rs:50:34
   |
50 |         use core::sync::atomic::{AtomicI32, AtomicU32};
   |                                  ^^^^^^^^^  ^^^^^^^^^ no `AtomicU32` in `sync::atomic`
   |                                  |
   |                                  no `AtomicI32` in `sync::atomic`

error[E0432]: unresolved imports `core::sync::atomic::AtomicI64`, `core::sync::atomic::AtomicU64`
  --> $CARGO_HOME/registry/src/github.com-1ecc6299db9ec823/radium-0.7.0/src/lib.rs:53:34
   |
53 |         use core::sync::atomic::{AtomicI64, AtomicU64};
   |                                  ^^^^^^^^^  ^^^^^^^^^ no `AtomicU64` in `sync::atomic`
   |                                  |
   |                                  no `AtomicI64` in `sync::atomic`

error[E0432]: unresolved imports `core::sync::atomic::AtomicIsize`, `core::sync::atomic::AtomicPtr`, `core::sync::atomic::AtomicUsize`
  --> $CARGO_HOME/registry/src/github.com-1ecc6299db9ec823/radium-0.7.0/src/lib.rs:56:34
   |
56 |         use core::sync::atomic::{AtomicIsize, AtomicPtr, AtomicUsize};
   |                                  ^^^^^^^^^^^  ^^^^^^^^^  ^^^^^^^^^^^ no `AtomicUsize` in `sync::atomic`
   |                                  |            |
   |                                  |            no `AtomicPtr` in `sync::atomic`
   |                                  no `AtomicIsize` in `sync::atomic`

error[E0412]: cannot find type `AtomicBool` in module `core::sync::atomic`
  --> $CARGO_HOME/registry/src/github.com-1ecc6299db9ec823/radium-0.7.0/src/types.rs:10:43
   |
10 |     if atomic(bool) { core::sync::atomic::AtomicBool }
   |                                           ^^^^^^^^^^ not found in `core::sync::atomic`

error[E0412]: cannot find type `AtomicI8` in module `core::sync::atomic`
  --> $CARGO_HOME/registry/src/github.com-1ecc6299db9ec823/radium-0.7.0/src/types.rs:16:40
   |
16 |     if atomic(8) { core::sync::atomic::AtomicI8 }
   |                                        ^^^^^^^^ not found in `core::sync::atomic`

error[E0412]: cannot find type `AtomicU8` in module `core::sync::atomic`
  --> $CARGO_HOME/registry/src/github.com-1ecc6299db9ec823/radium-0.7.0/src/types.rs:22:40
   |
22 |     if atomic(8) { core::sync::atomic::AtomicU8 }
   |                                        ^^^^^^^^ not found in `core::sync::atomic`

error[E0412]: cannot find type `AtomicI16` in module `core::sync::atomic`
  --> $CARGO_HOME/registry/src/github.com-1ecc6299db9ec823/radium-0.7.0/src/types.rs:28:41
   |
28 |     if atomic(16) { core::sync::atomic::AtomicI16 }
   |                                         ^^^^^^^^^ not found in `core::sync::atomic`

error[E0412]: cannot find type `AtomicU16` in module `core::sync::atomic`
  --> $CARGO_HOME/registry/src/github.com-1ecc6299db9ec823/radium-0.7.0/src/types.rs:34:41
   |
34 |     if atomic(16) { core::sync::atomic::AtomicU16 }
   |                                         ^^^^^^^^^ not found in `core::sync::atomic`

error[E0412]: cannot find type `AtomicI32` in module `core::sync::atomic`
  --> $CARGO_HOME/registry/src/github.com-1ecc6299db9ec823/radium-0.7.0/src/types.rs:40:41
   |
40 |     if atomic(32) { core::sync::atomic::AtomicI32 }
   |                                         ^^^^^^^^^ not found in `core::sync::atomic`

error[E0412]: cannot find type `AtomicU32` in module `core::sync::atomic`
  --> $CARGO_HOME/registry/src/github.com-1ecc6299db9ec823/radium-0.7.0/src/types.rs:46:41
   |
46 |     if atomic(32) { core::sync::atomic::AtomicU32 }
   |                                         ^^^^^^^^^ not found in `core::sync::atomic`

error[E0412]: cannot find type `AtomicI64` in module `core::sync::atomic`
  --> $CARGO_HOME/registry/src/github.com-1ecc6299db9ec823/radium-0.7.0/src/types.rs:52:41
   |
52 |     if atomic(64) { core::sync::atomic::AtomicI64 }
   |                                         ^^^^^^^^^ not found in `core::sync::atomic`

error[E0412]: cannot find type `AtomicU64` in module `core::sync::atomic`
  --> $CARGO_HOME/registry/src/github.com-1ecc6299db9ec823/radium-0.7.0/src/types.rs:58:41
   |
58 |     if atomic(64) { core::sync::atomic::AtomicU64 }
   |                                         ^^^^^^^^^ not found in `core::sync::atomic`

error[E0412]: cannot find type `AtomicIsize` in module `core::sync::atomic`
  --> $CARGO_HOME/registry/src/github.com-1ecc6299db9ec823/radium-0.7.0/src/types.rs:64:43
   |
64 |     if atomic(size) { core::sync::atomic::AtomicIsize }
   |                                           ^^^^^^^^^^^ not found in `core::sync::atomic`

error[E0412]: cannot find type `AtomicUsize` in module `core::sync::atomic`
  --> $CARGO_HOME/registry/src/github.com-1ecc6299db9ec823/radium-0.7.0/src/types.rs:70:43
   |
70 |     if atomic(size) { core::sync::atomic::AtomicUsize }
   |                                           ^^^^^^^^^^^ not found in `core::sync::atomic`

error[E0412]: cannot find type `AtomicPtr` in module `core::sync::atomic`
  --> $CARGO_HOME/registry/src/github.com-1ecc6299db9ec823/radium-0.7.0/src/types.rs:76:42
   |
76 |     if atomic(ptr) { core::sync::atomic::AtomicPtr<T> }
   |                                          ^^^^^^^^^ not found in `core::sync::atomic`

As far as I can tell, this crate's purpose is to deal with systems without atomics, so I'm a bit confused.

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