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

build fails for v1.22.0 #5452

Closed
rencryptofish opened this issue Nov 24, 2021 · 5 comments
Closed

build fails for v1.22.0 #5452

rencryptofish opened this issue Nov 24, 2021 · 5 comments
Assignees
Labels
C-bug Category: This is a bug

Comments

@rencryptofish
Copy link

running make release getting the following build error

error[E0658]: arbitrary expressions in key-value attributes are unstable
 --> runtime/near-vm-errors/src/lib.rs:1:10
  |
1 | #![doc = include_str!("../README.md")]
  |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
@bowenwang1996 bowenwang1996 added the C-bug Category: This is a bug label Nov 25, 2021
@mina86 mina86 self-assigned this Nov 25, 2021
@mina86
Copy link
Contributor

mina86 commented Nov 25, 2021

Could you state which rustc version are you using? I.e. output of rustc --version?

@mina86
Copy link
Contributor

mina86 commented Nov 26, 2021

We generally require the latest rustc to compile the code. The actual minimal version the code expects is sest in rust-toolchain.toml file and at the moment that’s 1.56. The error you’ve quoted indicates that you’re building the code with pre-1.54 compiler. Please update and then you’ll be able to build.

@mina86 mina86 closed this as completed Nov 26, 2021
@rencryptofish
Copy link
Author

ah got it thanks, what about adding something like for node runners:
https://docs.rs/version_check/latest/version_check/

@mina86
Copy link
Contributor

mina86 commented Nov 29, 2021

There shouldn’t be a need. Cargo should update the toolchain according to the rust-toolchain.toml. The reason it didn’t work for you is that prior to rustup 1.24 (released in April 2021), the file was not recognised due to toml extension. Going forward it’ll work on its own.

@mina86
Copy link
Contributor

mina86 commented Nov 29, 2021

Actually I lied a bit. rust-toolchain.toml will take effect if Rust wast installed through rustup only (so for example won’t take effect if it came from system’s package manager). Still, it’s not clear whether adding build.rs just to check the version is overall a positive change.

mina86 added a commit to mina86/nearcore that referenced this issue Nov 30, 2021
Add `package.rust-version` to all `Cargo.toml` files so that users don’t
get mysterious compiler failures when trying to build the project with
unsupported compilers.

Issue: near#5452
bowenwang1996 added a commit that referenced this issue Dec 2, 2021
Add `package.rust-version` to all `Cargo.toml` files so that users don’t
get mysterious compiler failures when trying to build the project with
unsupported compilers.

Issue: #5452

Co-authored-by: Sandi Fatic <sandi.fatic@gmail.com>
Co-authored-by: Bowen Wang <bowenwang1996@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

3 participants