Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo install on Ubuntu fails, sysinfo error[E0658]: arbitrary expressions in key-value attributes are unstable #478

Open
GuillaumeBailey opened this issue Dec 30, 2021 · 4 comments · May be fixed by #479

Comments

@GuillaumeBailey
Copy link

It seems like it may be related to rust-lang/rust#78835, but that issue doesn't tell how to fix this.

A simple git clone + [modify Cargo.toml] + cargo update + cargo build updates sysinfo, but has the same errors.

cargo install av1an --verbose output -> out.zip

gubailey@baumkuchen:~ $ cargo install av1an
    Updating crates.io index
  Installing av1an v0.2.0
   Compiling libc v0.2.112
   Compiling autocfg v1.0.1
   Compiling proc-macro2 v1.0.36
   Compiling unicode-xid v0.2.2
   Compiling syn v1.0.84
   Compiling memchr v2.4.1
   Compiling version_check v0.9.4
   Compiling cfg-if v1.0.0
   Compiling crossbeam-utils v0.8.5
   Compiling lazy_static v1.4.0
   Compiling crossbeam-epoch v0.9.5
   Compiling rayon-core v1.9.1
   Compiling regex-syntax v0.6.25
   Compiling pkg-config v0.3.24
   Compiling bitflags v1.3.2
   Compiling log v0.4.14
   Compiling rustversion v1.0.6
   Compiling semver v1.0.4
   Compiling glob v0.3.0
   Compiling scopeguard v1.1.0
   Compiling anyhow v1.0.52
   Compiling tinyvec_macros v0.1.0
   Compiling serde_derive v1.0.132
   Compiling bindgen v0.54.0
   Compiling either v1.6.1
   Compiling serde v1.0.132
   Compiling shlex v0.1.1
   Compiling peeking_take_while v0.1.2
   Compiling lazycell v1.3.0
   Compiling cfg-if v0.1.10
   Compiling matches v0.1.9
   Compiling rustc-hash v1.1.0
   Compiling unicode-bidi v0.3.7
   Compiling unicode-segmentation v1.8.0
   Compiling unicode-width v0.1.9
   Compiling percent-encoding v2.1.0
   Compiling rust_hawktracer_normal_macro v0.4.1
   Compiling bytes v1.1.0
   Compiling once_cell v1.9.0
   Compiling ansi_term v0.12.1
   Compiling adler v1.0.2
   Compiling gimli v0.26.1
   Compiling failure_derive v0.1.8
   Compiling rust_hawktracer_proc_macro v0.4.1
   Compiling serde_json v1.0.73
   Compiling vec_map v0.8.2
   Compiling noop_proc_macro v0.3.0
   Compiling strsim v0.8.0
   Compiling rustc-demangle v0.1.21
   Compiling vapoursynth-sys v0.3.0
   Compiling byte-slice-cast v1.2.0
   Compiling arrayvec v0.7.2
   Compiling plotters-backend v0.3.2
   Compiling sysinfo v0.20.5
   Compiling minimal-lexical v0.2.1
   Compiling bitstream-io v1.2.0
   Compiling paste v1.0.6
   Compiling ryu v1.0.9
   Compiling itoa v1.0.1
   Compiling itoa v0.4.8
   Compiling ffmpeg-next v4.4.0
   Compiling std_prelude v0.2.12
   Compiling number_prefix v0.4.0
   Compiling smawk v0.3.1
   Compiling pin-project-lite v0.2.7
   Compiling y4m v0.7.0
   Compiling strsim v0.10.0
   Compiling splines v4.0.3
   Compiling shlex v1.1.0
   Compiling proc-macro-error-attr v1.0.4
   Compiling proc-macro-error v1.0.4
   Compiling nom v5.1.2
   Compiling nom v7.1.0
   Compiling num-traits v0.2.14
   Compiling num-integer v0.1.44
   Compiling memoffset v0.6.5
   Compiling rayon v1.5.1
   Compiling num-bigint v0.3.3
   Compiling num-rational v0.3.2
   Compiling miniz_oxide v0.4.4
   Compiling tinyvec v1.5.1
   Compiling itertools v0.10.3
   Compiling clang-sys v0.29.3
   Compiling textwrap v0.11.0
   Compiling form_urlencoded v1.0.1
   Compiling heck v0.3.3
   Compiling rust_hawktracer v0.7.0
   Compiling plotters-svg v0.3.1
   Compiling addr2line v0.17.0
   Compiling unicode-normalization v0.1.19
   Compiling crossbeam-channel v0.5.1
   Compiling aho-corasick v0.7.18
   Compiling object v0.27.1
   Compiling quote v1.0.14
   Compiling rustc_version v0.4.0
   Compiling jobserver v0.1.24
   Compiling time v0.1.44
   Compiling num_cpus v1.13.1
   Compiling atty v0.2.14
   Compiling terminal_size v0.1.17
   Compiling time v0.3.5
   Compiling mio v0.7.14
   Compiling signal-hook-registry v1.4.0
   Compiling which v4.2.2
   Compiling err-derive v0.2.4
   Compiling idna v0.2.3
   Compiling regex v1.5.4
   Compiling nix v0.23.1
   Compiling simd_helpers v0.1.0
   Compiling cc v1.0.72
   Compiling cexpr v0.4.0
   Compiling plotters v0.3.1
   Compiling clap v2.34.0
   Compiling console v0.15.0
   Compiling tokio v1.15.0
   Compiling crossbeam-deque v0.8.1
   Compiling chrono v0.4.19
   Compiling url v2.2.2
   Compiling stfu8 v0.2.4
   Compiling libloading v0.5.2
   Compiling libz-sys v1.1.3
   Compiling libgit2-sys v0.12.26+1.3.0
   Compiling backtrace v0.3.63
   Compiling indicatif v0.17.0-beta.1
   Compiling unicode-linebreak v0.1.2
   Compiling ctrlc v3.2.1
   Compiling vergen v3.2.0
   Compiling vergen v5.1.17
   Compiling synstructure v0.12.6
   Compiling thiserror-impl v1.0.30
   Compiling num-derive v0.3.3
   Compiling enum-iterator-derive v0.7.0
   Compiling arg_enum_proc_macro v0.3.2
   Compiling strum_macros v0.22.0
   Compiling getset v0.1.2
   Compiling structopt-derive v0.4.18
   Compiling thiserror v1.0.30
   Compiling enum-iterator v0.7.0
   Compiling strum v0.22.0
   Compiling v_frame v0.2.5
   Compiling structopt v0.3.25
   Compiling av-data v0.3.0
   Compiling flexi_logger v0.19.6
   Compiling failure v0.1.8
error[E0658]: arbitrary expressions in key-value attributes are unstable
  --> /home/gubailey/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.5/src/lib.rs:10:10
   |
10 | #![doc = include_str!("../README.md")]
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
   = help: add `#![feature(extended_key_value_attributes)]` to the crate attributes to enable

error[E0658]: arbitrary expressions in key-value attributes are unstable

... Many similar errors ...

error[E0658]: arbitrary expressions in key-value attributes are unstable
   --> /home/gubailey/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.5/src/common.rs:75:17
    |
75  |           #[doc = concat!("Sets the value of the \"", stringify!($name), "\" refresh kind to `false`.
    |  _________________^
76  | |
77  | | ```
78  | | use sysinfo::RefreshKind;
...   |
84  | | assert_eq!(r.", stringify!($name), "(), false);
85  | | ```")]
    | |_____^
...
191 |       impl_get_set!(users_list, with_users_list, without_users_list);
    |       --------------------------------------------------------------- in this macro invocation
    |
    = note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
    = help: add `#![feature(extended_key_value_attributes)]` to the crate attributes to enable
    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

   Compiling nasm-rs v0.2.2
error: aborting due to 31 previous errors

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

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `av1an v0.2.0`, intermediate artifacts can be found at `/tmp/cargo-installeDUiVB`

Caused by:
  build failed
gubailey@baumkuchen:~ $

@redzic
Copy link
Collaborator

redzic commented Dec 30, 2021

@GuillaumeBailey What version of rust are you using? Try installing rust through rustup and make sure you have the latest stable version (1.57)

@GuillaumeBailey
Copy link
Author

Looks like this works:

sudo apt-get remove rustc
sudo apt-get install git avnasm libavutil-dev pkg-config libavutil-dev libavformat-dev libavfilter-dev libavdevice-dev llvm libclang-dev autoconf automake libtool libzimg-dev python3.9-dev cython3 -y
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
git clone --depth 1 --recurse-submodules -j 8 https://github.com/vapoursynth/vapoursynth.git
pushd vapoursynth/ && ./autogen.sh && ./configure && make -k && sudo make install; popd
cargo install av1an --verbose
sudo /sbin/ldconfig -v

I'll make a PR to update the documentation, since the above is obviously not trivial.

@silverbacknet
Copy link

Which OS is that? Avian requires something fairly bleeding edge, unfortunately, anything with long-term packages isn't going to be able to use it.

@GuillaumeBailey
Copy link
Author

GuillaumeBailey commented Dec 30, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants