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

Build failed on Linux #928

Closed
jona-1993 opened this issue Nov 28, 2020 · 7 comments
Closed

Build failed on Linux #928

jona-1993 opened this issue Nov 28, 2020 · 7 comments

Comments

@jona-1993
Copy link

Hi,

I can't build the server and client on Manjaro Linux.

I have this error:

$ cargo run --verbose --example server ./
...
Compiling quinn v0.6.1 (/home/jona1993/Bureau/quinn/quinn)
Running rustc --crate-name quinn --edition=2018 quinn/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -Cembed-bitcode=no -C debuginfo=2 --cfg 'feature="certificate-transparency"' --cfg 'feature="default"' --cfg 'feature="native-certs"' --cfg 'feature="rustls"' --cfg 'feature="tls-rustls"' --cfg 'feature="webpki"' -C metadata=4707029b872475d0 -C extra-filename=-4707029b872475d0 --out-dir /home/jona1993/Bureau/quinn/target/debug/deps -C incremental=/home/jona1993/Bureau/quinn/target/debug/incremental -L dependency=/home/jona1993/Bureau/quinn/target/debug/deps --extern bytes=/home/jona1993/Bureau/quinn/target/debug/deps/libbytes-132544d621c1e922.rmeta --extern futures=/home/jona1993/Bureau/quinn/target/debug/deps/libfutures-ec01a20cd1ba0e55.rmeta --extern libc=/home/jona1993/Bureau/quinn/target/debug/deps/liblibc-89279ce17dbf6aed.rmeta --extern mio=/home/jona1993/Bureau/quinn/target/debug/deps/libmio-7d4e29593d9fecb5.rmeta --extern proto=/home/jona1993/Bureau/quinn/target/debug/deps/libquinn_proto-c77971162d457871.rmeta --extern rustls=/home/jona1993/Bureau/quinn/target/debug/deps/librustls-f460949ff94ada3a.rmeta --extern thiserror=/home/jona1993/Bureau/quinn/target/debug/deps/libthiserror-18430524a81fdaa1.rmeta --extern tokio=/home/jona1993/Bureau/quinn/target/debug/deps/libtokio-96636c1167ea3c00.rmeta --extern tracing=/home/jona1993/Bureau/quinn/target/debug/deps/libtracing-976b01f8ec586a1d.rmeta --extern webpki=/home/jona1993/Bureau/quinn/target/debug/deps/libwebpki-b777aa3e3e5339a3.rmeta -L native=/home/jona1993/Bureau/quinn/target/debug/build/ring-6a6605d43da55d7d/out
error[E0596]: cannot borrow self as mutable, as it is not declared as mutable
--> quinn/src/connection.rs:259:26
|
258 | fn poll(self: Pin<&mut Self>, cx: &mut Context) -> PollSelf::Output {
| ---- help: consider changing this to be mutable: mut self
259 | let conn = &mut *self.0.lock().unwrap();
| ^^^^ cannot borrow as mutable

error[E0596]: cannot borrow self as mutable, as it is not declared as mutable
--> quinn/src/endpoint.rs:191:30
|
190 | fn poll(self: Pin<&mut Self>, cx: &mut Context) -> PollSelf::Output {
| ---- help: consider changing this to be mutable: mut self
191 | let endpoint = &mut *self.0.lock().unwrap();
| ^^^^ cannot borrow as mutable

error[E0596]: cannot borrow self as mutable, as it is not declared as mutable
--> quinn/src/endpoint.rs:441:30
|
440 | fn poll_next(self: Pin<&mut Self>, cx: &mut Context) -> Poll<OptionSelf::Item> {
| ---- help: consider changing this to be mutable: mut self
441 | let endpoint = &mut *self.0.lock().unwrap();
| ^^^^ cannot borrow as mutable

error: aborting due to 3 previous errors

For more information about this error, try rustc --explain E0596.
error: could not compile quinn.

Caused by:
process didn't exit successfully: rustc --crate-name quinn --edition=2018 quinn/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -Cembed-bitcode=no -C debuginfo=2 --cfg 'feature="certificate-transparency"' --cfg 'feature="default"' --cfg 'feature="native-certs"' --cfg 'feature="rustls"' --cfg 'feature="tls-rustls"' --cfg 'feature="webpki"' -C metadata=4707029b872475d0 -C extra-filename=-4707029b872475d0 --out-dir /home/jona1993/Bureau/quinn/target/debug/deps -C incremental=/home/jona1993/Bureau/quinn/target/debug/incremental -L dependency=/home/jona1993/Bureau/quinn/target/debug/deps --extern bytes=/home/jona1993/Bureau/quinn/target/debug/deps/libbytes-132544d621c1e922.rmeta --extern futures=/home/jona1993/Bureau/quinn/target/debug/deps/libfutures-ec01a20cd1ba0e55.rmeta --extern libc=/home/jona1993/Bureau/quinn/target/debug/deps/liblibc-89279ce17dbf6aed.rmeta --extern mio=/home/jona1993/Bureau/quinn/target/debug/deps/libmio-7d4e29593d9fecb5.rmeta --extern proto=/home/jona1993/Bureau/quinn/target/debug/deps/libquinn_proto-c77971162d457871.rmeta --extern rustls=/home/jona1993/Bureau/quinn/target/debug/deps/librustls-f460949ff94ada3a.rmeta --extern thiserror=/home/jona1993/Bureau/quinn/target/debug/deps/libthiserror-18430524a81fdaa1.rmeta --extern tokio=/home/jona1993/Bureau/quinn/target/debug/deps/libtokio-96636c1167ea3c00.rmeta --extern tracing=/home/jona1993/Bureau/quinn/target/debug/deps/libtracing-976b01f8ec586a1d.rmeta --extern webpki=/home/jona1993/Bureau/quinn/target/debug/deps/libwebpki-b777aa3e3e5339a3.rmeta -L native=/home/jona1993/Bureau/quinn/target/debug/build/ring-6a6605d43da55d7d/out (exit code: 1)

Have a nice day !

@djc
Copy link
Member

djc commented Nov 28, 2020

What version of Rust are you using?

@jona-1993
Copy link
Author

jona-1993 commented Nov 28, 2020

$ cargo --version

cargo 1.45.0 (744bd1fbb 2020-06-15)

$ rustc --version

rustc 1.45.0 (5c1f21c3b 2020-07-13)

@djc
Copy link
Member

djc commented Nov 28, 2020

I think you'll need a later Rust for this, though I forget exactly what changed. In principle we don't support anything but the latest stable version.

@jona-1993
Copy link
Author

Oh thank you, it works now.

I used this command before for update rust.

$ rustup update

It's better with the last version ;)

@kim
Copy link
Contributor

kim commented Nov 29, 2020

FWIW, this also occurs on nightly from ~4months ago. Wondering if that’s a regression in the compiler, but unsure where to look.

@djc
Copy link
Member

djc commented Nov 30, 2020

I changed this in f212256 (from #844), I'm pretty sure this was in response to changes in Rust 1.46.0, but I can't find anything in the Rust release notes about what might have changed.

@kim
Copy link
Contributor

kim commented Nov 30, 2020 via email

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

3 participants