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

Bandwhich does not compile on Ubuntu 18.04 #62

Closed
plu9in opened this issue Jan 2, 2020 · 8 comments
Closed

Bandwhich does not compile on Ubuntu 18.04 #62

plu9in opened this issue Jan 2, 2020 · 8 comments

Comments

@plu9in
Copy link

plu9in commented Jan 2, 2020

Bandwhich does not compile on Ubuntu 18.04. There is a problem in a library.

$ git clone https://github.com/imsnif/bandwhich.git
$ cd bandwich
$ sudo cargo run
...
Compiling linked-hash-map v0.5.2
error: ``core::slice::<impl [T]>::len`` is not yet stable as a const fn
--> $HOME/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/bytes-0.5.0/src/bytes.rs:121:18
|
121 | len: bytes.len(),
| ^^^^^^^^^^^

@chobeat
Copy link
Contributor

chobeat commented Jan 2, 2020

what's your rust version?

@algent-al
Copy link

Same on solus too.

   Compiling bytes v0.5.0
   Compiling percent-encoding v2.1.0
error: `core::slice::<impl [T]>::len` is not yet stable as a const fn
   --> /home/build/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/bytes-0.5.0/src/bytes.rs:121:18
    |
121 |             len: bytes.len(),
    |                  ^^^^^^^^^^^

error: aborting due to previous error

error: Could not compile `bytes`.

using rust, version: 1.38.0

@plu9in
Copy link
Author

plu9in commented Jan 2, 2020

what's your rust version?

I am using 1.40.0.
rustc 1.40.0 (73528e339 2019-12-16)

@ebroto
Copy link
Collaborator

ebroto commented Jan 2, 2020

[T]::len as const fn was stabilized in 1.39.0 (2019-11-07), see changelog and github issue.

@plu9in are you sure you don't have a toolchain override with more precedence? See here. The only case I can think of is either an outdated nightly or not using the version installed by rustup (so the one from the distro).

@beamop
Copy link

beamop commented Jan 2, 2020

Fix here #35

@plu9in
Copy link
Author

plu9in commented Jan 3, 2020

Thanks a lot @chobeat, @ebroto, @beamop. I have built bandwhich now.

I had cargo <= 1.39.0 installed in my PATH with more precedence than my home directory. That's why.
What is strange is that when I did cargo -V I had a right version (>= 1.39.0).

@plu9in plu9in closed this as completed Jan 3, 2020
@LinuxOnTheDesktop
Copy link

  1. What package allows one to run rustup update?
  2. I think this problem should be mentioned in the ReadMe.

@ebroto
Copy link
Collaborator

ebroto commented Jan 3, 2020

@LinuxOnTheDesktop you can find installation instructions here.

I will add a note to the README as you suggest.

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

No branches or pull requests

6 participants