Rust compilation errors on installaton of libcst on alpine python

547 Views Asked by At

trying to install python modules on alpine linux using 3.7.9 image of alpine-python

Not able to find any solution on how to get the below issues resolved, any assistance would help a lot.

          error[E0658]: or-patterns syntax is experimental
6908         --> libcst/src/tokenizer/core/mod.rs:944:25
6909          |
6910      944 | /                         '\n'
6911      945 | |                         | '\\'
6912      946 | |                         | '\''
6913      947 | |                         | '"'
6914      ...   |
6915      958 | |                         | 'u'
6916      959 | |                         | 'U',
6917          | |_____________________________^
6918          |
6919          = note: see issue #54883 <https://github.com/rust-lang/rust/issues/54883> for more information
6920      
6921      error[E0658]: or-patterns syntax is experimental
6922         --> libcst/src/tokenizer/core/mod.rs:976:33
6923          |
6924      976 |                     if let Some('"' | '\'') = self.text_pos.peek() {
6925          |                                 ^^^^^^^^^^
6926          |
6927          = note: see issue #54883 <https://github.com/rust-lang/rust/issues/54883> for more information
6928      
6929      error[E0658]: or-patterns syntax is experimental
6930          --> libcst/src/parser/grammar.rs:3203:14
6931           |
6932      3203 |         e @ (Expression::Integer(_) | Expression::Float(_)) => Ok(e),
6933           |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6934           |
6935           = note: see issue #54883 <https://github.com/rust-lang/rust/issues/54883> for more information
6936      
6937      error[E0658]: use of unstable library feature 'split_inclusive'
6938        --> libcst/src/tokenizer/whitespace_parser.rs:84:26
6939         |
6940      84 |             lines: input.split_inclusive(default_newline).collect(),
6941         |                          ^^^^^^^^^^^^^^^
6942         |
6943         = note: see issue #72360 <https://github.com/rust-lang/rust/issues/72360> for more information
6944      
6945      error: aborting due to 4 previous errors
6946      
6947      For more information about this error, try `rustc --explain E0658`.
6948      error: could not compile `libcst`.
6949      
6950      Caused by:
6953      error: `cargo rustc --lib --message-format=json-render-diagnostics --manifest-path native/libcst/Cargo.toml --release -v --features pyo3/extension-module -- --crate-type cdylib` failed with code 101
6954      [end of output]
6955  
6956  note: This error originates from a subprocess, and is likely not a problem with pip.
6957  ERROR: Failed building wheel for libcst
1

There are 1 best solutions below

0
On

“use of unstable library feature” and “syntax is experimental” indicate you are using a version of the Rust compiler older than that required for this program.

or_patterns was stabilized in Rust 1.53. split_inclusive was stabilized in Rust 1.51 (look at the version number on the right side of the method entry).

You will need to install Rust 1.53 or newer. Right now, you are using a version that is more than a year old.