dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

cargo install fails at bitvec 1.0.1 for cli

Open surajsharma opened this issue 1 year ago • 3 comments

Problem

cargo install dioxus-cli fails on wsl2 with rustc 1.79.0 with the log:


   Compiling bitvec v1.0.1
error: couldn't read `/home/suraj/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitvec-1.0.1/src/../doc/index.md`: No such file or directory (os error 2)
 --> /home/suraj/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitvec-1.0.1/src/index.rs:1:10
  |
1 | #![doc = include_str!("../doc/index.md")]
  |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: this error originates in the macro `include_str` (in Nightly builds, run with -Z macro-backtrace for more info)

   Compiling scoped-tls v1.0.1
   Compiling if_chain v1.0.2
   Compiling better_scoped_tls v0.1.2
   Compiling hstr v0.2.12
   Compiling from_variant v0.1.9
   Compiling crypto-common v0.1.6
   Compiling subtle v2.6.1
error: could not compile `bitvec` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `dioxus-cli v0.6.0`, intermediate artifacts can be found at `/tmp/cargo-install2Jc1wW`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Expected behavior

dioxus-cli should install on wsl2

Environment:

  • Rust version: 1.79.0, nightly
  • OS info: wsl2

surajsharma avatar Dec 11 '24 09:12 surajsharma

I was able to install it on my WSL. Perhaps your cache got corrupted somehow? I'd try removing /home/suraj/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitvec-1.0.1 and re-installing.

DogeDark avatar Dec 11 '24 19:12 DogeDark

Strange bug - looks like bitvec hasn't been updated in 2 years.

https://crates.io/crates/bitvec

It's likely some flakey caching issues with cargo itself.

jkelleyrtp avatar Dec 12 '24 20:12 jkelleyrtp

i tried as @DogeDark suggested but to no avail, any workaround would be appreciated @jkelleyrtp

surajsharma avatar Dec 13 '24 05:12 surajsharma

I can't find anything in the bitvec github about it not compiling so I imagine there might be an issue with the "../" syntax or maybe a caching issue with cargo. Try wiping your local registry and/or looking into how rust is installed in your environment.

jkelleyrtp avatar Jan 08 '25 22:01 jkelleyrtp