bob icon indicating copy to clipboard operation
bob copied to clipboard

nvim-bob Installation failure via cargo on Ubuntu 24.04.2 LTS

Open KnightChaser opened this issue 6 months ago • 1 comments
trafficstars

Hello, when I was trying to install nvim-bob via cargo with the command: cargo install bob-nvim as the instruction(README.md, Chapter "Install from crates.io"), I got installation failure like below.

larissa@passc0de:~$ cargo install bob-nvim
    Updating crates.io index
  Downloaded bob-nvim v4.0.3
  Downloaded 1 crate (823.8 KB) in 0.69s
  Installing bob-nvim v4.0.3
    Updating crates.io index
  Downloaded scopeguard v1.2.0
  Downloaded rustls-native-certs v0.6.3
  Downloaded matchers v0.0.1
  Downloaded cfg-if v1.0.0
  Downloaded autocfg v1.4.0
  ...
  Downloaded zip v0.5.13
  Downloaded 1 crate (48.2 KB) in 0.00s
error: failed to compile `bob-nvim v4.0.3`, intermediate artifacts can be found at `/tmp/cargo-installRMQUAd`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Caused by:
  package `icu_normalizer v2.0.0` cannot be built because it requires rustc 1.82 or newer, while the currently active rustc version is 1.75.0
  Try re-running cargo install with `--locked`

However, as the instruction says, when I try to install that with --locked flag, it installs nvim-bob successfully and it runs smoothly. Is this situation intended? I thought this behavior was a kind of bug, so I leave an issue like this for now.

My environment was:

  • Operating system: Ubuntu 24.04.2 LTS x86_64
  • Kernel: 6.11.0-25-generic
  • Shell: bash 5.2.21
  • CPU: Intel i914900K (32) @ 5.700GHz
  • GPU: Intel Raptor Lake-S GT1 [UHD Graphics 770]
  • Cargo version: 1.75.0+dfsg0ubuntu1-0ubuntu7.1, amd64 (Information gathered by the command dpkg -l | grep cargo)
  • Context: I haven't installed anything via cargo before this program(nvim-bob)'s installation trial. I was trying to install neovim after formatting my operating system(Ubuntu 24.04.2 LTS) by reinstalling it from scratch.

KnightChaser avatar May 14 '25 06:05 KnightChaser

Okay reading this now, this is not really a bug as I upgrade dependencies to the latest for each release, you can either run with --locked or upgrade ur cargo version, I will try to tackle this via minimum supported rust version for releases but for now do either of the steps I mentioned as they both will work.

I will keep this one open so I don't forget to tackle this thing.

MordechaiHadad avatar May 18 '25 09:05 MordechaiHadad

I'm installing bob on Fedora 42 and getting the following error:

    Updating crates.io index
  Installing bob-nvim v4.1.1
    Updating crates.io index
     Locking 309 packages to latest compatible versions
      Adding dialoguer v0.10.4 (available: v0.11.0)
      Adding indicatif v0.16.2 (available: v0.17.12)
      Adding nix v0.28.0 (available: v0.30.1)
      Adding rand v0.8.5 (available: v0.9.1)
      Adding reqwest v0.11.27 (available: v0.12.22)
      Adding tracing-subscriber v0.2.25 (available: v0.3.19)
      Adding winreg v0.10.1 (available: v0.55.0)
      Adding yansi v0.5.1 (available: v1.0.1)
      Adding zip v2.4.2 (available: v4.2.0)
   Compiling proc-macro2 v1.0.95
   Compiling unicode-ident v1.0.18
   Compiling libc v0.2.174
   Compiling cfg-if v1.0.1
   Compiling autocfg v1.5.0
   Compiling stable_deref_trait v1.2.0
   Compiling smallvec v1.15.1
   Compiling serde v1.0.219
   Compiling pin-project-lite v0.2.16
   Compiling shlex v1.3.0
   Compiling once_cell v1.21.3
   Compiling parking_lot_core v0.9.11
   Compiling scopeguard v1.2.0
   Compiling bytes v1.10.1
   Compiling itoa v1.0.15
   Compiling writeable v0.6.1
   Compiling litemap v0.8.0
   Compiling hashbrown v0.15.4
   Compiling icu_normalizer_data v2.0.0
   Compiling cc v1.2.27
   Compiling version_check v0.9.5
   Compiling typenum v1.18.0
   Compiling tracing-core v0.1.34
   Compiling untrusted v0.9.0
   Compiling equivalent v1.0.2
   Compiling futures-core v0.3.31
   Compiling memchr v2.7.5
   Compiling icu_properties_data v2.0.1
   Compiling lock_api v0.4.13
   Compiling log v0.4.27
   Compiling fnv v1.0.7
   Compiling httparse v1.10.1
   Compiling indexmap v2.10.0
   Compiling ring v0.17.14
   Compiling getrandom v0.2.16
   Compiling signal-hook-registry v1.4.5
   Compiling socket2 v0.5.10
   Compiling mio v1.0.4
   Compiling generic-array v0.14.7
   Compiling http v0.2.12
   Compiling quote v1.0.40
   Compiling rustls v0.21.12
   Compiling pin-utils v0.1.0
   Compiling zerocopy v0.8.26
   Compiling futures-task v0.3.31
   Compiling utf8parse v0.2.2
   Compiling futures-sink v0.3.31
   Compiling aho-corasick v1.1.3
   Compiling parking_lot v0.12.4
   Compiling num-traits v0.2.19
   Compiling percent-encoding v2.3.1
   Compiling try-lock v0.2.5
   Compiling rustix v1.0.7
   Compiling bitflags v2.9.1
   Compiling slab v0.4.10
   Compiling anstyle v1.0.11
   Compiling syn v2.0.104
   Compiling regex-syntax v0.8.5
   Compiling anstyle-query v1.1.3
   Compiling anstyle-parse v0.2.7
   Compiling colorchoice v1.0.4
   Compiling is_terminal_polyfill v1.70.1
   Compiling futures-util v0.3.31
   Compiling ryu v1.0.20
   Compiling http-body v0.4.6
   Compiling want v0.3.1
   Compiling form_urlencoded v1.2.1
   Compiling futures-channel v0.3.31
   Compiling cfg_aliases v0.1.1
   Compiling heck v0.5.0
   Compiling strsim v0.11.1
   Compiling serde_json v1.0.140
   Compiling anstream v0.6.19
   Compiling lazy_static v1.5.0
   Compiling clap_lex v0.7.5
   Compiling base64 v0.21.7
   Compiling httpdate v1.0.3
   Compiling option-ext v0.2.0
   Compiling regex-automata v0.4.9
   Compiling linux-raw-sys v0.9.4
   Compiling thiserror v1.0.69
   Compiling utf8_iter v1.0.4
   Compiling tower-service v0.3.3
   Compiling regex-syntax v0.6.29
   Compiling nix v0.28.0
   Compiling dirs-sys v0.4.1
   Compiling block-buffer v0.10.4
   Compiling synstructure v0.13.2
   Compiling zerovec-derive v0.11.1
   Compiling serde_derive v1.0.219
   Compiling displaydoc v0.2.5
   Compiling tokio-macros v2.5.0
   Compiling tracing-attributes v0.1.30
   Compiling rustls-pemfile v1.0.4
   Compiling ppv-lite86 v0.2.21
   Compiling clap_builder v4.5.40
   Compiling thiserror-impl v1.0.69
   Compiling clap_derive v4.5.40
   Compiling crypto-common v0.1.6
   Compiling zerofrom-derive v0.1.6
   Compiling yoke-derive v0.8.0
   Compiling regex-automata v0.1.10
   Compiling regex v1.11.1
   Compiling rand_core v0.6.4
   Compiling unicode-width v0.2.1
   Compiling tokio v1.46.0
   Compiling anyhow v1.0.98
   Compiling semver v1.0.26
   Compiling tracing v0.1.41
   Compiling toml_write v0.1.2
   Compiling winnow v0.7.11
   Compiling adler2 v2.0.1
   Compiling openssl-probe v0.1.6
   Compiling iana-time-zone v0.1.63
   Compiling matchers v0.0.1
   Compiling rand_chacha v0.3.1
   Compiling zerofrom v0.1.6
   Compiling rustls-native-certs v0.6.3
   Compiling console v0.15.11
   Compiling miniz_oxide v0.8.9
   Compiling digest v0.10.7
   Compiling xattr v1.5.1
   Compiling clap v4.5.40
   Compiling dirs v5.0.1
   Compiling sharded-slab v0.1.7
   Compiling tracing-log v0.1.4
   Compiling filetime v0.2.25
   Compiling crc32fast v1.4.2
   Compiling yoke v0.8.0
   Compiling encoding_rs v0.8.35
   Compiling thread_local v1.1.9
   Compiling console v0.16.0
   Compiling sync_wrapper v0.1.2
   Compiling ansi_term v0.12.1
   Compiling mime v0.3.17
   Compiling shell-words v1.1.0
   Compiling ipnet v2.11.0
   Compiling number_prefix v0.4.0
   Compiling webpki-roots v0.25.4
   Compiling cpufeatures v0.2.17
   Compiling flate2 v1.1.2
   Compiling clap_complete v4.5.54
   Compiling zerovec v0.11.2
   Compiling zerotrie v0.2.2
   Compiling tar v0.4.44
   Compiling dialoguer v0.10.4
   Compiling what-the-path v0.1.3
   Compiling rand v0.8.5
   Compiling tokio-util v0.7.15
   Compiling indicatif v0.16.2
   Compiling sha2 v0.10.9
   Compiling serde_spanned v0.6.9
   Compiling rustls-webpki v0.101.7
error[E0432]: unresolved import `console::Term`
  --> /home/hajhawa/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/indicatif-0.16.2/src/state.rs:10:5
   |
10 | use console::Term;
   |     ^^^^^^^^^^^^^ no `Term` in the root
   |
note: found an item that was configured out
  --> /home/hajhawa/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/console-0.16.0/src/lib.rs:92:42
   |
92 |     user_attended, user_attended_stderr, Term, TermFamily, TermFeatures, TermTarget,
   |                                          ^^^^
note: the item is gated behind the `std` feature
  --> /home/hajhawa/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/console-0.16.0/src/lib.rs:90:7
   |
90 | #[cfg(feature = "std")]
   |       ^^^^^^^^^^^^^^^
help: consider importing this variant instead
   |
10 - use console::Term;
10 + use crate::state::ProgressDrawTargetKind::Term;
   |

error[E0432]: unresolved imports `console::measure_text_width`, `console::Style`
  --> /home/hajhawa/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/indicatif-0.16.2/src/style.rs:1:15
   |
1  | use console::{measure_text_width, Style};
   |               ^^^^^^^^^^^^^^^^^^  ^^^^^ no `Style` in the root
   |               |
   |               no `measure_text_width` in the root
   |
note: found an item that was configured out
  --> /home/hajhawa/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/console-0.16.0/src/lib.rs:96:44
   |
96 |     colors_enabled, colors_enabled_stderr, measure_text_width, pad_str, pad_str_with,
   |                                            ^^^^^^^^^^^^^^^^^^
note: the item is gated behind the `std` feature
  --> /home/hajhawa/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/console-0.16.0/src/lib.rs:94:7
   |
94 | #[cfg(feature = "std")]
   |       ^^^^^^^^^^^^^^^
note: found an item that was configured out
  --> /home/hajhawa/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/console-0.16.0/src/lib.rs:98:19
   |
98 |     Color, Emoji, Style, StyledObject,
   |                   ^^^^^
note: the item is gated behind the `std` feature
  --> /home/hajhawa/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/console-0.16.0/src/lib.rs:94:7
   |
94 | #[cfg(feature = "std")]
   |       ^^^^^^^^^^^^^^^

error[E0432]: unresolved imports `console::measure_text_width`, `console::Style`
  --> /home/hajhawa/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/indicatif-0.16.2/src/utils.rs:7:15
   |
7  | use console::{measure_text_width, Style};
   |               ^^^^^^^^^^^^^^^^^^  ^^^^^ no `Style` in the root
   |               |
   |               no `measure_text_width` in the root
   |
note: found an item that was configured out
  --> /home/hajhawa/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/console-0.16.0/src/lib.rs:96:44
   |
96 |     colors_enabled, colors_enabled_stderr, measure_text_width, pad_str, pad_str_with,
   |                                            ^^^^^^^^^^^^^^^^^^
note: the item is gated behind the `std` feature
  --> /home/hajhawa/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/console-0.16.0/src/lib.rs:94:7
   |
94 | #[cfg(feature = "std")]
   |       ^^^^^^^^^^^^^^^
note: found an item that was configured out
  --> /home/hajhawa/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/console-0.16.0/src/lib.rs:98:19
   |
98 |     Color, Emoji, Style, StyledObject,
   |                   ^^^^^
note: the item is gated behind the `std` feature
  --> /home/hajhawa/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/console-0.16.0/src/lib.rs:94:7
   |
94 | #[cfg(feature = "std")]
   |       ^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0432`.
error: could not compile `indicatif` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `bob-nvim v4.1.1`, intermediate artifacts can be found at `/tmp/cargo-installepoyyJ`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

haihala avatar Jul 03 '25 06:07 haihala

I am getting the same error with cargo 1.87.0. My current workaround is to install from repository with --locked flag:

$ cargo install --git https://github.com/MordechaiHadad/bob --locked

taketwo avatar Jul 04 '25 07:07 taketwo

Long time no see with this issue.

I just tried to install bob with cargo(version: cargo 1.88.0 (873a06493 2025-05-10)) without the -- locked flag, and I get the same error as @haihala's. (The environment is the same with the original issue's context, except for the cargo version (upgraded from then))

KnightChaser avatar Jul 04 '25 08:07 KnightChaser

I was facing the same issue, running with --locked flag:

cargo install --git https://github.com/MordechaiHadad/bob --locked

seems to have solved it for me, my cargo version is same as @taketwo

cargo 1.87.0 (99624be96 2025-05-06)

feniljain avatar Jul 06 '25 07:07 feniljain

I set an MSRV, it seems the errors you are facing should be resolved by #294

MordechaiHadad avatar Jul 21 '25 07:07 MordechaiHadad