davidB / kubectl-view-allocations

kubectl plugin to list allocations (cpu, memory, gpu,... X utilization, requested, limit, allocatable,...)

Home Page:https://crates.io/crates/kubectl-view-allocations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cargo inststall failure

palmerabollo opened this issue · comments

I see this building failure (using cargo 1.36.0, rustc 1.36.0). It looks like an error compiling bytes v0.5.4, but I'm not a rust expert. Thank you for your time, very useful tool.

$ cargo install kubectl-view-allocations
    Updating crates.io index
warning: spurious network error (2 tries remaining): unexpected HTTP status code: 504; class=Net (12)
warning: spurious network error (1 tries remaining): unexpected HTTP status code: 500; class=Net (12)
  Downloaded kubectl-view-allocations v0.7.2
  Downloaded 1 crate (32.8 KB) in 1.71s
  Installing kubectl-view-allocations v0.7.2
  Downloaded log v0.4.8
  Downloaded itertools v0.8.2
  ... some lines omitted for simplicity
  Downloaded adler32 v1.0.4
  Downloaded rand_core v0.5.1
   Compiling proc-macro2 v1.0.10
   Compiling libc v0.2.69
   Compiling getrandom v0.1.14
   Compiling unicode-xid v0.2.0
   Compiling log v0.4.8
   Compiling syn v1.0.17
   Compiling cfg-if v0.1.10
   Compiling core-foundation-sys v0.7.0
   Compiling memchr v2.3.3
   Compiling slab v0.4.2
   Compiling ppv-lite86 v0.2.6
   Compiling arc-swap v0.4.6
   Compiling proc-macro-nested v0.1.4
   Compiling autocfg v1.0.0
   Compiling bitflags v1.2.1
   Compiling version_check v0.9.1
   Compiling lazy_static v1.4.0
   Compiling futures-core v0.3.4
   Compiling bytes v0.5.4
error[E0658]: naming constants with `_` is unstable
   --> /Users/xyz/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.4/src/bytes.rs:911:1
    |
911 | const _: [(); 0 - mem::align_of::<Shared>() % 2] = []; // Assert that the alignment of `Shared` is divisible by 2.
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/54912

   Compiling futures-sink v0.3.4
   Compiling fnv v1.0.6
   Compiling proc-macro-hack v0.5.15
error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.
error: Could not compile `bytes`.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `kubectl-view-allocations v0.7.2`, intermediate artifacts can be found at `/var/folders/dp/0sgfb68d2zn1qdd1z_7d96w00000gn/T/cargo-installQ1tZeD`

Caused by:
  build failed

Hi,

The issue seems that you're compiling with a too old stable version of rust (1.36) without support of a feature (naming constants with _) used by the transitive dependency (bytes 0.5.4). The ci/release process only build against the last stable.

  1. Can you build with a more recent version of rust ? (rustup update)
  2. Why do you rebuild (vs using the provided binary packages) ?

PS: I'm happy if the tool is useful for you.

It worked, thank you. I find it easier to manage third-party software I install on my laptop using cargo (or brew). Thanks!

Maybe I'll provide brew package later.
A tools, that could interest you, to update third-party: https://crates.io/crates/topgrade.