I can't compile grin (use of unstable library feature 'try_from')

The binaries throw a segmentation fault on my server.
I could compile 1.0.0 on my server but was not able to do so with 1.1.0 and also 2.0.0 now.


Compiling grin_keychain v2.0.1-beta.1 (/home/peter/grin/keychain)
Compiling croaring-sys v0.3.9
error[E0658]: use of unstable library feature ‘try_from’ (see issue #33417)
–> keychain/src/types.rs:17:5
|
17 | use std::convert::TryFrom;
| ^^^^^^^^^^^^^^^^^^^^^

error[E0658]: use of unstable library feature ‘try_from’ (see issue #33417)
–> keychain/src/types.rs:511:2
|
511 | type Error = ();
| ^^^^^^^^^^^^^^^^

error[E0658]: use of unstable library feature ‘try_from’ (see issue #33417)
–> keychain/src/types.rs:513:2
|
513 | fn try_from(value: u8) -> Result<Self, Self::Error> {
| ^
514 | | match value {
515 | | 0 => Ok(SwitchCommitmentType::None),
516 | | 1 => Ok(SwitchCommitmentType::Regular),
517 | | _ => Err(()),
518 | | }
519 | | }
| |
^

error[E0658]: use of unstable library feature ‘try_from’ (see issue #33417)
–> keychain/src/types.rs:510:6
|
510 | impl TryFrom for SwitchCommitmentType {
| ^^^^^^^^^^^

error[E0658]: use of unstable library feature ‘try_from’ (see issue #33417)
–> keychain/src/types.rs:513:41
|
513 | fn try_from(value: u8) -> Result<Self, Self::Error> {
| ^^^^^^^^^^^

error: aborting due to 5 previous errors

For more information about this error, try rustc --explain E0658.
error: Could not compile grin_keychain.
warning: build failed, waiting for other jobs to finish…
error: build failed

1 Like

You need to update your rust to 1.34+ via rustup update as stated in the build doc

4 Likes

Thanks!
That worked!

1 Like