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

Impossible to install via cargo #2866

Closed
aborruso opened this issue Jan 5, 2021 · 9 comments
Closed

Impossible to install via cargo #2866

aborruso opened this issue Jan 5, 2021 · 9 comments

Comments

@aborruso
Copy link

aborruso commented Jan 5, 2021

Describe the bug

When I run cargo install nu --verbose, I have compiling error.

How to solve it?

To Reproduce
Steps to reproduce the behavior:

  1. simply running cargo install nu --verbose

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

image

   Compiling rust-embed-impl v5.7.0
     Running `rustc --crate-name rust_embed_impl --edition=2018 /home/aborruso/.cargo/registry/src/github.com-1ecc6299db9ec823/rust-embed-impl-5.7.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type proc-macro --emit=dep-info,link -C prefer-dynamic -C opt-level=z -Cembed-bitcode=no -C codegen-units=1 -C metadata=e85d3f6f227765de -C extra-filename=-e85d3f6f227765de --out-dir /tmp/cargo-installz0XnRM/release/deps -L dependency=/tmp/cargo-installz0XnRM/release/deps --extern quote=/tmp/cargo-installz0XnRM/release/deps/libquote-ef8440215e0282f2.rlib --extern rust_embed_utils=/tmp/cargo-installz0XnRM/release/deps/librust_embed_utils-9e501703b7a8c3b0.rlib --extern syn=/tmp/cargo-installz0XnRM/release/deps/libsyn-74e5419c3d256976.rlib --extern walkdir=/tmp/cargo-installz0XnRM/release/deps/libwalkdir-21dd448c8904f42a.rlib --extern proc_macro --cap-lints allow`
error[E0432]: unresolved import `syn::export`
 --> /home/aborruso/.cargo/registry/src/github.com-1ecc6299db9ec823/rust-embed-impl-5.7.0/src/lib.rs:8:11
  |
8 | use syn::{export::TokenStream2, Data, DeriveInput, Fields, Lit, Meta};
  |           ^^^^^^ could not find `export` in `syn`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0432`.
error: could not compile `rust-embed-impl`.

Caused by:
  process didn't exit successfully: `rustc --crate-name rust_embed_impl --edition=2018 /home/aborruso/.cargo/registry/src/github.com-1ecc6299db9ec823/rust-embed-impl-5.7.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type proc-macro --emit=dep-info,link -C prefer-dynamic -C opt-level=z -Cembed-bitcode=no -C codegen-units=1 -C metadata=e85d3f6f227765de -C extra-filename=-e85d3f6f227765de --out-dir /tmp/cargo-installz0XnRM/release/deps -L dependency=/tmp/cargo-installz0XnRM/release/deps --extern quote=/tmp/cargo-installz0XnRM/release/deps/libquote-ef8440215e0282f2.rlib --extern rust_embed_utils=/tmp/cargo-installz0XnRM/release/deps/librust_embed_utils-9e501703b7a8c3b0.rlib --extern syn=/tmp/cargo-installz0XnRM/release/deps/libsyn-74e5419c3d256976.rlib --extern walkdir=/tmp/cargo-installz0XnRM/release/deps/libwalkdir-21dd448c8904f42a.rlib --extern proc_macro --cap-lints allow` (exit code: 1)
warning: build failed, waiting for other jobs to finish...
error: failed to compile `nu v0.25.0`, intermediate artifacts can be found at `/tmp/cargo-installz0XnRM`
@sophiajt
Copy link
Member

sophiajt commented Jan 5, 2021

@aborruso - what version of rustc are you using? You'll need a stable that's pretty recent, say something like 1.48 or even 1.49.

@TrevorAC99
Copy link
Contributor

TrevorAC99 commented Jan 5, 2021

@aborruso - what version of rustc are you using? You'll need a stable that's pretty recent, say something like 1.48 or even 1.49.

I received this same error in Windows using 1.48 of rustc. I'm trying again with 1.49 right now.

Edit: It also fails on 1.49

@aborruso
Copy link
Author

aborruso commented Jan 5, 2021

I have rustc 1.46.0. I try to update it

@pantharshit00
Copy link

I can also reproduce this when I tried updating to v0.25

image

@aborruso
Copy link
Author

aborruso commented Jan 5, 2021

I have used rustup update stable and now I have 1.49.

And I have again

   Compiling async-recursion v0.3.1
error[E0432]: unresolved import `syn::export`
 --> /home/aborruso/.cargo/registry/src/github.com-1ecc6299db9ec823/rust-embed-impl-5.7.0/src/lib.rs:8:11
  |
8 | use syn::{export::TokenStream2, Data, DeriveInput, Fields, Lit, Meta};
  |           ^^^^^^ could not find `export` in `syn`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0432`.
error: could not compile `rust-embed-impl`

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

Caused by:
  build failed

@TrevorAC99
Copy link
Contributor

This may or may not be relevant but when I cloned the repository and built it using cargo build, it worked fine. For some reason, installing from crates.io has problems.

@sophiajt
Copy link
Member

sophiajt commented Jan 6, 2021

We're working around this issue with #2868

Looks like the root cause is a semver-incompatible change that went out in the latest syn crate. We're currently going to pin to an older version and release. That should at least unblock the builds for everyone.

@sophiajt
Copy link
Member

sophiajt commented Jan 6, 2021

This should be fixed with 0.25.1. If you're still seeing it, please reopen.

@sophiajt sophiajt closed this as completed Jan 6, 2021
@aborruso
Copy link
Author

aborruso commented Jan 6, 2021

This should be fixed with 0.25.1. If you're still seeing it, please reopen.

It works, thank you

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

No branches or pull requests

4 participants