aptos-core icon indicating copy to clipboard operation
aptos-core copied to clipboard

[Bug] cargo install of CLI fails for version 0.3.3

Open gregnazario opened this issue 2 years ago • 6 comments

🐛 Bug

Cargo install from the devnet branch for the cli fails

To reproduce

Code snippet to reproduce

cargo install ... --branch devnet aptos 

Please comment the following below:

  1. Operating system (OS)
  2. CPU Architecture (x86, Arm, etc)
  3. Command used
  4. Error resulting

Meanwhile have you tried using the prepacked release? https://github.com/aptos-labs/aptos-core/releases/tag/aptos-cli-v0.3.3

gregnazario avatar Sep 09 '22 13:09 gregnazario

This is due to an unstable feature of tokio https://docs.rs/tokio/latest/tokio/runtime/struct.Builder.html#method.disable_lifo_slot

gregnazario avatar Sep 09 '22 15:09 gregnazario

I'm removing the cargo install instructions since they seem to be unstable. Cargo install was installing from source anyways

This PR will ensure there's support on the rest of the systems for from source https://github.com/aptos-labs/aptos-core/pull/4031

gregnazario avatar Sep 09 '22 15:09 gregnazario

I was having this issue all day, but I'm using the pre-compiled library now and it's working fine.

Windows 11 CPU: x64 Error: error[E0599]: no method named disable_lifo_slot found for mutable reference &mut tokio::runtime::Builder in the current scope --> mempool\src\shared_mempool\runtime.rs:114:10 | 114 | .disable_lifo_slot() | ^^^^^^^^^^^^^^^^^ private field, not a method error: could not compile aptos-mempool due to previous error

PaulFidika avatar Sep 10 '22 03:09 PaulFidika

  1. Ubuntu 22.04 LTS
  2. x86_64
  3. cargo install --git https://github.com/aptos-labs/aptos-core.git --branch devnet aptos
  4. = note: collect2: fatal error: id terminated with signal 9 [Killed] compilation terminated.

error: could not compile 'cached-packages' due to previous error warning: build failed, waiting for other jobs to finish... error: failed to compile 'aptos v0.3.3 (https://github.com/aptos-labs/aptos-core.git?branch=devnet#8f634bcd)', intermediate artifacts can be found at '/tmp/cargo-installOzvrCl'

VishnuKMi avatar Sep 10 '22 19:09 VishnuKMi

RUSTFLAGS="--cfg tokio_unstable" cargo install works for me.

Kabie avatar Sep 13 '22 02:09 Kabie

What I decided is we've removed the cargo install information.

Most platforms are prebuilt, and anyone who doesn't have it should build by source, because there is a script that handles the dependencies.

This script doesn't cover some platforms at this point (e.g. windows), but we have a build for that.

If there are any platforms that from source instructions don't work, or the prebuilt binaries, please note it here.

gregnazario avatar Sep 13 '22 02:09 gregnazario