cloudflare / quiche

🥧 Savoury implementation of the QUIC transport protocol and HTTP/3
https://docs.quic.tech/quiche/
BSD 2-Clause "Simplified" License
9.3k stars 700 forks source link

Make fails on CentOS 8 "use of unstable library feature 'matches_macro'" #688

Closed wreiske closed 3 years ago

wreiske commented 3 years ago

make fails on CentOS 8 with a fresh clone of https://github.com/cloudflare/quiche/commit/fcbf789d8e7e62f3ffd4562e70e969db1f520fb9

make[1]: Entering directory '/root/quic/nginx-1.16.1'
cd ../quiche && cargo build --release --no-default-features
    Updating crates.io index
  Downloaded lazy_static v1.4.0
  Downloaded log v0.4.11
  Downloaded cmake v0.1.44
  Downloaded libc v0.2.80
  Downloaded libm v0.2.1
  Downloaded cc v1.0.61
  Downloaded cfg-if v0.1.10
  Downloaded ring v0.16.15
  Downloaded spin v0.5.2
  Downloaded untrusted v0.7.1
  Downloaded once_cell v1.4.1
   Compiling cc v1.0.61
   Compiling libc v0.2.80
   Compiling libm v0.2.1
   Compiling log v0.4.11
   Compiling spin v0.5.2
   Compiling cfg-if v0.1.10
   Compiling untrusted v0.7.1
   Compiling once_cell v1.4.1
   Compiling lazy_static v1.4.0
   Compiling cmake v0.1.44
   Compiling ring v0.16.15
   Compiling quiche v0.6.0 (/root/quic/quiche)
error[E0658]: use of unstable library feature 'matches_macro'
    --> src/lib.rs:1075:5
     |
1075 |     matches!(
     |     ^^^^^^^
     |
     = note: for more information, see https://github.com/rust-lang/rust/issues/65721

error[E0658]: use of unstable library feature 'matches_macro'
   --> src/frame.rs:709:10
    |
709 |         !matches!(self, Frame::Padding { .. } |
    |          ^^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/65721

error: aborting due to 2 previous errors

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

To learn more, run the command again with --verbose.
make[1]: *** [objs/Makefile:1361: ../quiche/target/release/libquiche.a] Error 101
make[1]: Leaving directory '/root/quic/nginx-1.16.1'
make: *** [Makefile:8: build] Error 2

https://github.com/rust-lang/rust/issues/65721

wreiske commented 3 years ago

I was using the default version of cargo from yum install cargo on CentOS 8 which fails to build quiche. Installing from https://rustup.rs solved the build issue I was having.