Johni0702 / mumble-web-proxy

Mumble to WebSocket+WebRTC proxy for use with mumble-web
68 stars 24 forks source link

rtp v0.1.0 compilation? #21

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hello and sorry if i'm posting this in the wrong repo. I'm trying to compile this with:

OS - Ubuntu 18.04.5 LTS Cargo - 1.49.0 (d00d64df9 2020-12-05) rustc - 1.49.0 (e1884a8e3 2020-12-29)

and command: cargo build --release with these packages installed already (and up to date system):

When I run that command to build, I get the following error:

error[E0282]: type annotations needed
   --> /root/.cargo/git/checkouts/rtp-23e67d7854ed482f/1444b3c/src/rfc3711.rs:476:19
    |
475 |         let iv = iv ^ (BigUint::from(1_u8) << (context.session_encr_key.len() * 8));
    |             -- consider giving `iv` a type
476 |         let iv = &iv.to_bytes_be()[1..context.session_encr_key.len() + 1];
    |                   ^^ cannot infer type
    |
    = note: type must be known at this point

error[E0282]: type annotations needed
   --> /root/.cargo/git/checkouts/rtp-23e67d7854ed482f/1444b3c/src/rfc3711.rs:512:19
    |
511 |         let iv = iv ^ (BigUint::from(1_u8) << (context.session_encr_key.len() * 8));
    |             -- consider giving `iv` a type
512 |         let iv = &iv.to_bytes_be()[1..context.session_encr_key.len() + 1];
    |                   ^^ cannot infer type
    |
    = note: type must be known at this point

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0282`.
error: could not compile `rtp`

Screen Shot 2021-01-04 at 14 06 24

Any idea how i can go about solving this? Thank you very much

Johni0702 commented 3 years ago

Huh. Could you try with an older version of Rust? Maybe there was some subtle change to type inference in one of the more recent releases which inadvertently broke that piece of code. iirc 1.39.x is what I tested with, so that one should definitely work.

ghost commented 3 years ago

That worked perfectly! Thank you very much for the quick response. I suppose for anyone else who runs into this, simply run:

rustup default 1.39.0

then re-run the build. Works flawlessly. Thanks again!

UndeRus commented 3 years ago

rust 1.48 works too