janus-plugin-sfu icon indicating copy to clipboard operation
janus-plugin-sfu copied to clipboard

could not compile on fresh debian 10 install

Open kylebakerio opened this issue 5 years ago • 7 comments

trying to set it up on google cloud, only thing I've done is install janus basically. Error is

error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
 --> /home/kyle/.cargo/git/checkouts/janus-plugin-rs-c011dfe6ce2d5dbc/d3fba60/src/jansson.rs:8:5
  |
8 | use std::mem::MaybeUninit;
  |     ^^^^^^^^^^^^^^^^^^^^^

error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
  --> /home/kyle/.cargo/git/checkouts/janus-plugin-rs-c011dfe6ce2d5dbc/d3fba60/src/jansson.rs:80:29
   |
80 |             let mut error = MaybeUninit::<jansson_sys::json_error_t>::uninit();
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0599]: no function or associated item named `uninit` found for type `std::mem::MaybeUninit<jansson_sys::json_error_t>` in the current scope
  --> /home/kyle/.cargo/git/checkouts/janus-plugin-rs-c011dfe6ce2d5dbc/d3fba60/src/jansson.rs:80:71
   |
80 |             let mut error = MaybeUninit::<jansson_sys::json_error_t>::uninit();
   |                             ------------------------------------------^^^^^^
   |                             |
   |                             function or associated item not found in `std::mem::MaybeUninit<jansson_sys::json_error_t>`

error: aborting due to 3 previous errors

Some errors occurred: E0599, E0658.
For more information about an error, try `rustc --explain E0599`.
error: Could not compile `janus-plugin`.

To learn more, run the command again with --verbose.

running it with verbose, I get

   Compiling janus-plugin v0.12.0 (https://github.com/mozilla/janus-plugin-rs#d3fba606)
     Running `rustc --edition=2018 --crate-name janus_plugin /home/kyle/.cargo/git/checkouts/janus-plugin-rs-c011dfe6ce2d5dbc/d3fba60/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=bc2fa068b9ba60ac -C extra-filename=-bc2fa068b9ba60ac --out-dir /home/kyle/janus-plugin-sfu/target/debug/deps -L dependency=/home/kyle/janus-plugin-sfu/target/debug/deps --extern bitflags=/home/kyle/janus-plugin-sfu/target/debug/deps/libbitflags-da8334855be1adb3.rlib --extern chrono=/home/kyle/janus-plugin-sfu/target/debug/deps/libchrono-95210fb078edc1aa.rlib --extern colored=/home/kyle/janus-plugin-sfu/target/debug/deps/libcolored-8e4c27b188fef94b.rlib --extern glib_sys=/home/kyle/janus-plugin-sfu/target/debug/deps/libglib_sys-9a2a32facfff5bea.rlib --extern jansson_sys=/home/kyle/janus-plugin-sfu/target/debug/deps/libjansson_sys-6ad949b548df7133.rlib --extern janus_plugin_sys=/home/kyle/janus-plugin-sfu/target/debug/deps/libjanus_plugin_sys-53b3eb88ca9b5839.rlib --extern libc=/home/kyle/janus-plugin-sfu/target/debug/deps/liblibc-666ffec6133ef2ff.rlib --extern serde=/home/kyle/janus-plugin-sfu/target/debug/deps/libserde-fc68779d6af80be7.rlib --cap-lints allow`
error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
 --> /home/kyle/.cargo/git/checkouts/janus-plugin-rs-c011dfe6ce2d5dbc/d3fba60/src/jansson.rs:8:5
  |
8 | use std::mem::MaybeUninit;
  |     ^^^^^^^^^^^^^^^^^^^^^

error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
  --> /home/kyle/.cargo/git/checkouts/janus-plugin-rs-c011dfe6ce2d5dbc/d3fba60/src/jansson.rs:80:29
   |
80 |             let mut error = MaybeUninit::<jansson_sys::json_error_t>::uninit();
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0599]: no function or associated item named `uninit` found for type `std::mem::MaybeUninit<jansson_sys::json_error_t>` in the current scope
  --> /home/kyle/.cargo/git/checkouts/janus-plugin-rs-c011dfe6ce2d5dbc/d3fba60/src/jansson.rs:80:71
   |
80 |             let mut error = MaybeUninit::<jansson_sys::json_error_t>::uninit();
   |                             ------------------------------------------^^^^^^
   |                             |
   |                             function or associated item not found in `std::mem::MaybeUninit<jansson_sys::json_error_t>`

error: aborting due to 3 previous errors

Some errors occurred: E0599, E0658.
For more information about an error, try `rustc --explain E0599`.
error: Could not compile `janus-plugin`.

Caused by:
  process didn't exit successfully: `rustc --edition=2018 --crate-name janus_plugin /home/kyle/.cargo/git/checkouts/janus-plugin-rs-c011dfe6ce2d5dbc/d3fba60/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=bc2fa068b9ba60ac -C extra-filename=-bc2fa068b9ba60ac --out-dir /home/kyle/janus-plugin-sfu/target/debug/deps -L dependency=/home/kyle/janus-plugin-sfu/target/debug/deps --extern bitflags=/home/kyle/janus-plugin-sfu/target/debug/deps/libbitflags-da8334855be1adb3.rlib --extern chrono=/home/kyle/janus-plugin-sfu/target/debug/deps/libchrono-95210fb078edc1aa.rlib --extern colored=/home/kyle/janus-plugin-sfu/target/debug/deps/libcolored-8e4c27b188fef94b.rlib --extern glib_sys=/home/kyle/janus-plugin-sfu/target/debug/deps/libglib_sys-9a2a32facfff5bea.rlib --extern jansson_sys=/home/kyle/janus-plugin-sfu/target/debug/deps/libjansson_sys-6ad949b548df7133.rlib --extern janus_plugin_sys=/home/kyle/janus-plugin-sfu/target/debug/deps/libjanus_plugin_sys-53b3eb88ca9b5839.rlib --extern libc=/home/kyle/janus-plugin-sfu/target/debug/deps/liblibc-666ffec6133ef2ff.rlib --extern serde=/home/kyle/janus-plugin-sfu/target/debug/deps/libserde-fc68779d6af80be7.rlib --cap-lints allow` (exit code: 1)

kylebakerio avatar Sep 01 '20 14:09 kylebakerio

btw, running rustc --explain E0599 gets me:

This error occurs when a method is used on a type which doesn't implement it:

Erroneous code example:

struct Mouth;
let x = Mouth;
x.chocolate(); // error: no method named `chocolate` found for type `Mouth`
                      //        in the current scope

kylebakerio avatar Sep 01 '20 14:09 kylebakerio

I don't know a thing of rust, but I can say the build works fine with rustc 1.43.0 (rustc --version) on Ubuntu 18.04.

vincentfretin avatar Sep 02 '20 13:09 vincentfretin

It looks like you are probably getting a somewhat old version of Rust -- MaybeUninit was introduced in 1.36. Debian stable has Rust 1.41, so it should be working. Sorry if Google Cloud is vendoring you some surprisingly old Debian.

mqp avatar Jan 25 '21 09:01 mqp

@kylebakerio Can you confirm us what version of rustc you have on google cloud? If you really have an old rustc, you can close the issue.

vincentfretin avatar Feb 11 '21 14:02 vincentfretin

Oh, I ended up moving on and working around. I'd have to spin up a new cloud instance to see, unfortunately. We can close it if desired, but it may be wise to mention something about this in the docs somewhere (that the rust version should be checked if there are errors, or to make sure rust version is minimum x before compiling, maybe there's a way to set a minimum version in a config file--whatever).

kylebakerio avatar Feb 14 '21 16:02 kylebakerio

It looks like specifying a minimum Rust compiler version is coming soon.

mqp avatar Feb 14 '21 23:02 mqp

When done, this should probably be closed, then.

kylebakerio avatar Feb 15 '21 14:02 kylebakerio