move-language / move

Apache License 2.0
2.24k stars 676 forks source link

[Bug] installation requires rustc 1.66.0 or newer #1075

Closed chen4903 closed 9 months ago

chen4903 commented 9 months ago

🐛 Bug

To reproduce

Code snippet to reproduce

cargo install --path language/tools/move-cli

Stack trace/error message

error: failed to compile `move-cli v0.1.0 (/opt/Move-language/move/language/tools/move-cli)`, intermediate artifacts can be found at `/opt/Move-language/move/target`

Caused by:
  package `toml_edit v0.19.15` cannot be built because it requires rustc 1.66.0 or newer, while the currently active rustc version is 1.65.0
  Either upgrade to rustc 1.66.0 or newer, or use
  cargo update -p toml_edit@0.19.15 --precise ver
  where `ver` is the latest version of `toml_edit` supporting rustc 1.65.0

Expected Behavior

I install rust by curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh and then the version is 1.72.0.

root@LEVI:~# rustc --version
rustc 1.72.0 (5680fa18f 2023-08-23)
root@LEVI:~# cargo --version
cargo 1.72.0 (103a7ff2e 2023-08-15)

After I execute cargo install --path language/tools/move-cli, the version turns to 1.65.0.

root@LEVI:/opt/Move-language/move# rustc -V
rustc 1.65.0 (897e37553 2022-11-02)

This is the log while execute cargo install --path language/tools/move-cli:

apt-get install result code: 0
pkg-config is already installed
installing rust.
Installing Rust......
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: syncing channel updates for '1.65.0-x86_64-unknown-linux-gnu'
info: latest update on 2022-11-03, rust version 1.65.0 (897e37553 2022-11-02)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'

Although I update the rust to newer version , it will be changed to 1.65.0 again.

System information

Please complete the following information:

Additional context

Add any other context about the problem here.

root@LEVI:/opt/Move-language/move# cargo install --path language/tools/move-cli
  Installing move-cli v0.1.0 (/opt/Move-language/move/language/tools/move-cli)
    Updating crates.io index
  Downloaded signal-hook-mio v0.2.3
  Downloaded fixed-hash v0.7.0
  Downloaded foreign-types v0.3.2
    ..........
  Downloaded regex-automata v0.3.8
  Downloaded tokio v1.32.0
  Downloaded 291 crates (20.5 MB) in 8.97s (largest was `encoding_rs` at 1.4 MB)
error: failed to compile `move-cli v0.1.0 (/opt/Move-language/move/language/tools/move-cli)`, intermediate artifacts can be found at `/opt/Move-language/move/target`

Caused by:
  package `toml_edit v0.19.15` cannot be built because it requires rustc 1.66.0 or newer, while the currently active rustc version is 1.65.0
  Either upgrade to rustc 1.66.0 or newer, or use
  cargo update -p toml_edit@0.19.15 --precise ver
  where `ver` is the latest version of `toml_edit` supporting rustc 1.65.0
wrwg commented 9 months ago

Can you try used --locked when you call install? Looks like there is some package upgrade otherwise.

Also if you want to use Move for some specific project, you should likely make a choice between either the aptos-main or the sui branch. The main branch is beyond and is not actively maintained. The aptos-main branch is a mirror of what is found here and updated ever now and then.

chen4903 commented 9 months ago

it works, thx!