Skip to content

Docker build fails for "base build" image - cannot compile "arc-swap" and "zeroize" #5

@alexeiZamyatin

Description

@alexeiZamyatin

When building the "base build" docker image, the following error arises:

error[E0425]: cannot find function `spin_loop_hint` in module `atomic`
    --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/arc-swap-0.3.6/src/lib.rs:1049:25
     |
1049 |                 atomic::spin_loop_hint();
     |                         ^^^^^^^^^^^^^^ not found in `atomic`

error: the struct `#[repr(align(u16))]` attribute is experimental (see issue #33626)
  --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/arc-swap-0.3.6/src/debt.rs:20:1
   |
20 | / struct Node {
21 | |     next: Option<&'static Node>,
22 | |     in_use: AtomicBool,
23 | |     slots: [Debt; DEBT_SLOT_CNT],
24 | | }
   | |_^

error: non-string literals in attributes, or string literals in top-level positions, are experimental (see issue #34981)
  --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/arc-swap-0.3.6/src/debt.rs:19:1
   |
19 | #[repr(align(64))]
   | ^^^^^^^^^^^^^^^^^^

error: the struct `#[repr(align(u16))]` attribute is experimental (see issue #33626)
  --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/arc-swap-0.3.6/src/gen_lock.rs:49:1
   |
49 | pub struct Shard(pub(crate) [AtomicUsize; GEN_CNT]);
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: non-string literals in attributes, or string literals in top-level positions, are experimental (see issue #34981)
  --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/arc-swap-0.3.6/src/gen_lock.rs:47:1
   |
47 | #[repr(align(64))]
   | ^^^^^^^^^^^^^^^^^^

error: slice pattern syntax is experimental (see issue #23121)
    --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/arc-swap-0.3.6/src/lib.rs:1030:32
     |
1030 |                 .fold([0, 0], |[a1, a2], s| {
     |                                ^^^^^^^^

error: slice pattern syntax is experimental (see issue #23121)
    --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/arc-swap-0.3.6/src/lib.rs:1031:25
     |
1031 |                     let [v1, v2] = s.snapshot();
     |                         ^^^^^^^^

error: aborting due to 7 previous errors

error: Could not compile `arc-swap`.
warning: build failed, waiting for other jobs to finish...
error: expected one of `,` or `as`, found `::`
   --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/zeroize-0.5.2/src/lib.rs:212:22
    |
212 | use core::{ptr, slice::IterMut, sync::atomic};
    |                      ^^ expected one of `,` or `as` here

error: expected one of `;` or `as`, found `::`
   --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/zeroize-0.5.2/src/lib.rs:212:22
    |
212 | use core::{ptr, slice::IterMut, sync::atomic};
    |                      ^^ expected one of `;` or `as` here

error: aborting due to 2 previous errors

error: Could not compile `zeroize`.
warning: build failed, waiting for other jobs to finish...

error: build failed

Summarizing: arc-swap-0.3.6 and zeroize-0.5.2 cannot be compiled.
Does not seem to be a grin related issue though, but rather a problem with an external lib?

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