Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo install ripgrep is failing #313

Closed
justbur opened this issue Jan 10, 2017 · 12 comments
Closed

cargo install ripgrep is failing #313

justbur opened this issue Jan 10, 2017 · 12 comments
Labels
bug A bug.

Comments

@justbur
Copy link

justbur commented Jan 10, 2017

Here's the output. I'm not familiar with rust, but I'm happy to provide additional information.

$ cargo install ripgrep
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling winapi-build v0.1.1
   Compiling unicode-segmentation v0.1.3
   Compiling regex-syntax v0.3.9
   Compiling winapi v0.2.8
   Compiling fnv v1.0.5
   Compiling bytecount v0.1.5
   Compiling utf8-ranges v0.1.3
.cargo/registry/src/github.com-1ecc6299db9ec823/bytecount-0.1.5/src/lib.rs:151:45: 151:48 error: use of unstable library feature 'iter_arith': bounds recently changed (see issue #27739)
.cargo/registry/src/github.com-1ecc6299db9ec823/bytecount-0.1.5/src/lib.rs:151         self[..].iter().map(ByteChunk::sum).sum()
                                                                                                                           ^~~
error: aborting due to previous error
Build failed, waiting for other jobs to finish...
@BurntSushi
Copy link
Owner

It looks like one of ripgrep's dependencies increased the minimum Rust version and didn't do a semver version bump.

This is still strange though. ripgrep 0.3.2 has bytecount 0.1.4 in its Cargo.lock, which I think should cause cargo install ripgrep to use bytecount 0.1.4. Instead, it seems to be picking up bytecount 0.1.5 but I'm not sure why.

cc @llogiq, @alexcrichton

@BurntSushi BurntSushi added the bug A bug. label Jan 10, 2017
@BurntSushi
Copy link
Owner

@justbur You have a few work-arounds available to you:

  1. Upgrade your version of Rust. I'm assuming you're using a version older than 1.11.0 (you can check by running rustc --version) and try cargo install ripgrep again.
  2. Download a binary release.

@llogiq
Copy link
Contributor

llogiq commented Jan 10, 2017

Sorry, my fault. Will fix shortly.

@justbur
Copy link
Author

justbur commented Jan 10, 2017

@BurntSushi makes sense to me.

I'm on Ubuntu 16.10 currently, using rust from the repos. My rustc is version 1.10.0, so yes you're right. Just tested the binary and it works fine. I'm not that interested in maintaining a different version of rust at the moment.

I was just reporting because I felt like I had a pretty common setup and the instructions on the README failed for me.

Thanks for the help

@llogiq
Copy link
Contributor

llogiq commented Jan 10, 2017

@justbur, again, my apologies. I'll try to fix as soon as possible (but had too little time for my last attempt). It's literally a one-line fix.

@BurntSushi
Copy link
Owner

BurntSushi commented Jan 10, 2017

FWIW, I think this is strange behavior from Cargo. I don't think it should be using bytecount 0.1.5 when the lockfile says 0.1.4.

@alexcrichton
Copy link
Contributor

@BurntSushi ah yes I think this is a bug in Cargo where cargo install doesn't respect lock files: rust-lang/cargo#2263

@justbur
Copy link
Author

justbur commented Jan 11, 2017

ok, I just tried again, and I got past the initial error but ran into another one. Here's the output

$ cargo install ripgrep 
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling unicode-segmentation v0.1.3
   Compiling winapi-build v0.1.1
   Compiling regex-syntax v0.3.9
   Compiling fnv v1.0.5
   Compiling ansi_term v0.9.0
   Compiling libc v0.2.19
   Compiling unicode-width v0.1.4
   Compiling void v1.0.2
   Compiling utf8-ranges v0.1.3
   Compiling unreachable v0.1.1
   Compiling crossbeam v0.2.10
   Compiling bytecount v0.1.6
   Compiling same-file v0.1.1
   Compiling thread-id v3.0.0
   Compiling num_cpus v1.2.1
   Compiling thread_local v0.3.2
   Compiling memchr v0.1.11
   Compiling walkdir v1.0.7
   Compiling memmap v0.5.0
   Compiling aho-corasick v0.5.3
   Compiling kernel32-sys v0.2.2
   Compiling bitflags v0.7.0
   Compiling termcolor v0.1.1
   Compiling winapi v0.2.8
   Compiling lazy_static v0.2.2
   Compiling strsim v0.5.2
   Compiling thread-id v2.0.0
   Compiling ctrlc v2.0.1
   Compiling term_size v0.2.1
   Compiling log v0.3.6
   Compiling vec_map v0.6.0
   Compiling thread_local v0.2.7
   Compiling clap v2.19.3
.cargo/registry/src/github.com-1ecc6299db9ec823/clap-2.19.3/src/errors.rs:882:35: 882:46 error: no method named `description` found for type `std::fmt::Error` in the current scope
.cargo/registry/src/github.com-1ecc6299db9ec823/clap-2.19.3/src/errors.rs:882         Error::with_description(e.description(), ErrorKind::Format)
                                                                                                                ^~~~~~~~~~~
error: aborting due to previous error
Build failed, waiting for other jobs to finish...
error: failed to compile `ripgrep v0.3.2`, intermediate artifacts can be found at `/tmp/cargo-install.noglV3JyQm5G`

Caused by:
  Could not compile `clap`.

@justbur
Copy link
Author

justbur commented Jan 11, 2017

Actually that looks like it might be due to having an older version of the std library.

@BurntSushi
Copy link
Owner

ripgrep 0.3 requires Rust 1.11 or newer unfortunately. You can try installing an older version of ripgrep:

cargo install --vers 0.2.9 ripgrep

@justbur
Copy link
Author

justbur commented Jan 11, 2017

@BurntSushi That explains it. Thanks. Maybe you could add a note to that effect next to the cargo install ripgrep line in the readme?

@BurntSushi
Copy link
Owner

@justbur Yeah. I think the minimum version is elsewhere in the README but it would definitely make sense to also put it with the cargo install step! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug.
Projects
None yet
Development

No branches or pull requests

4 participants