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

Cannot install on mac #1

Closed
RazrFalcon opened this issue Jul 24, 2022 · 3 comments
Closed

Cannot install on mac #1

RazrFalcon opened this issue Jul 24, 2022 · 3 comments

Comments

@RazrFalcon
Copy link

I've already installed necessary components:

> rustup component add rust-src rustc-dev llvm-tools-preview
info: component 'rust-src' is up to date
info: component 'rustc-dev' for target 'aarch64-apple-darwin' is up to date
info: component 'llvm-tools-preview' for target 'aarch64-apple-darwin' is up to date
> cargo install cargo-typesize
    Updating crates.io index
  Installing cargo-typesize v0.1.0
   Compiling cargo-typesize v0.1.0
error[E0554]: `#![feature]` may not be used on the stable release channel
 --> /Users/razr/.cargo/registry/src/gitpro.ttaallkk.top-1ecc6299db9ec823/cargo-typesize-0.1.0/src/driver.rs:1:1
  |
1 | #![feature(rustc_private)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> /Users/razr/.cargo/registry/src/gitpro.ttaallkk.top-1ecc6299db9ec823/cargo-typesize-0.1.0/src/driver.rs:2:1
  |
2 | #![feature(once_cell)]
  | ^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> /Users/razr/.cargo/registry/src/gitpro.ttaallkk.top-1ecc6299db9ec823/cargo-typesize-0.1.0/src/driver.rs:2:12
  |
2 | #![feature(once_cell)]
  |            ^^^^^^^^^
> cargo +nightly install cargo-typesize
    Updating crates.io index
  Installing cargo-typesize v0.1.0
   Compiling cargo-typesize v0.1.0
error[E0463]: can't find crate for `rustc_driver`
  --> /Users/razr/.cargo/registry/src/gitpro.ttaallkk.top-1ecc6299db9ec823/cargo-typesize-0.1.0/src/driver.rs:11:1
   |
11 | extern crate rustc_driver;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
   |
   = help: maybe you need to install the missing components with: `rustup component add rust-src rustc-dev llvm-tools-preview`

Should I somehow install nightly components?

@hazelutf8
Copy link
Contributor

On windows I had to:
rustup default nightly
rustup component add rust-src rustc-dev llvm-tools-preview

@RazrFalcon
Copy link
Author

Thanks! It seems that it works only on nightly channel. Readme worth updating.

@davidrusu
Copy link
Owner

Hey, yes I had to gone through this earlier when first setting up, but subsequently forgot about these steps!

The rust devs don't want folks linking against rustc on stable since these API's may be unstable, see: rust-lang/rust#27812

Hence the need for #[feature(rustc_private)] and nightly.

I've updated the README with a note and instructions, thanks for the report!

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

3 participants