Error compiling Libra-swarm | Compiling move-core

Hello ,

The cli run well, but when i tried to create a local with :

cargo run -p libra-swarm -- -s

Compiling codespan-reporting v0.8.0
   Compiling cookie v0.13.3
   Compiling mio-uds v0.6.7
   Compiling libra-logger v0.1.0 (/root/libra/common/logger)
   Compiling tracing-futures v0.2.3
   Compiling bindgen v0.51.1
   Compiling rustls-native-certs v0.3.0
   Compiling move-core-types v0.1.0 (/root/libra/language/move-core/types)
error[E0658]: use of unstable library feature 'matches_macro'
  --> language/move-core/types/src/
42 |         matches!(c, '_' | 'a'..='z' | 'A'..='Z' | '0'..='9')
   |         ^^^^^^^
   = note: for more information, see

error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.
error: could not compile `move-core-types`.
warning: build failed, waiting for other jobs to finish...
error: build failed

I tried to update Rust with rustup update but even this command not working.
I removed the Cargo.lock and relauch the script but i have the same error.

I use a VPS machine ,do you think it is because of that ? I guess not because the testnet-Cli work perfectly.

It’s seems an error at line 42 about a macro. But i’m not very handy with Rust.
The link proposed by the output , i really don’t understand what is the process to fix that :sweat_smile:

any help are welcome thank you.


PS: i’m using the last Github Repo
env :
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic

i think the file maybe got an error but i really don’t know where :smiley:

Hi! The matches! macro is stable in Rust 1.42 (; make sure you’re building with the latest version. We have rust-toolchain set to 1.42 here ( which should make this automatic, but if you’re building outside the repo, you might need to set your default rust version manually with

$ rustup default stable


$ rustup default 1.42.0

i will try thank you :slight_smile:

Hey Thanks ,

Same issues , but after checking with HTOP , i see 100 % of CPU of my vps was used…

So i updated it and now everything build perfectly.

I have to install a local server ASAP for testing some dApp developement,

Thanks for your help :smiley:

1 Like

Hello ,

on all my VPS machine the setup work fine …

But in a local machine i always got this error … rust-toolchain is up to date.

i made the same install procress.

If anyone have an idea can be cool.

ok i manage to fix it by erase and rebuild everything … but now a new issue. But i’ll make a post in the Libra-Core section. :slight_smile:


I had the same issue. Below steps solved my issue.

Uninstall rustc and cargo.
install cargo
run ./scripts/