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 Failed | use of unstable library feature 'proc_macro_c_str_literals' #2943

Closed
silentEAG opened this issue May 1, 2024 · 2 comments
Closed
Labels
bug Something isn't working idl related to the IDL, either program or client side

Comments

@silentEAG
Copy link

silentEAG commented May 1, 2024

When creating a new project using anchor init with version 0.30.0, and then directly using anchor build, the following error occurs:

error[E0658]: use of unstable library feature 'proc_macro_byte_character'
   --> /home/ayanami/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.81/src/wrapper.rs:871:21
    |
871 |                     proc_macro::Literal::byte_character(byte)
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #115268 <https://github.com/rust-lang/rust/issues/115268> for more information
    = help: add `#![feature(proc_macro_byte_character)]` to the crate attributes to enable
    = note: this compiler was built on 2024-03-19; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature 'proc_macro_c_str_literals'
   --> /home/ayanami/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.81/src/wrapper.rs:898:21
    |
898 |                     proc_macro::Literal::c_string(string)
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #119750 <https://github.com/rust-lang/rust/issues/119750> for more information
    = help: add `#![feature(proc_macro_c_str_literals)]` to the crate attributes to enable
    = note: this compiler was built on 2024-03-19; consider upgrading it if it is out of date

Version information:

solana --version
solana-cli 1.18.12 (src:b9c13825; feat:4215500110, client:SolanaLabs)
anchor --version
anchor-cli 0.30.0

The issue stems from: rust-lang/rust#115268, with a related issue at DioxusLabs/dioxus#2376.

@acheroncrypto acheroncrypto added bug Something isn't working idl related to the IDL, either program or client side labels May 1, 2024
@acheroncrypto
Copy link
Collaborator

nightly is currently required to build the IDL, what version are you on?

Also, #2941 should help this issue.

@silentEAG
Copy link
Author

Oh, it works, thanks! Yes, I used stable to build the IDL. Switching to nightly works well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working idl related to the IDL, either program or client side
Projects
None yet
Development

No branches or pull requests

2 participants