Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

error[E0557]: feature has been removed|#![cfg_attr(not(feature = "std"), feature(alloc_error_handler))] #13986

Closed
2 tasks done
vizvasrj opened this issue Apr 24, 2023 · 2 comments
Labels
J2-unconfirmed Issue might be valid, but it’s not yet known.

Comments

@vizvasrj
Copy link

vizvasrj commented Apr 24, 2023

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Description of bug

info: aborting installation
rustc 1.69.0 (84c898d65 2023-04-16)
info: using existing install for 'stable-x86_64-unknown-linux-gnu'
info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'

stable-x86_64-unknown-linux-gnu unchanged - rustc 1.69.0 (84c898d65 2023-04-16)

info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: checking for self-updates

stable-x86_64-unknown-linux-gnu unchanged - rustc 1.69.0 (84c898d65 2023-04-16)
nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.71.0-nightly (7f94b314c 2023-04-23)

info: cleaning up downloads & tmp directories
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'

nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.71.0-nightly (7f94b314c 2023-04-23)

info: checking for self-updates
info: component 'rust-std' for target 'wasm32-unknown-unknown' is up to date
Default host: x86_64-unknown-linux-gnu
rustup home: /home/vizvasrj/.rustup

installed toolchains

stable-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu

active toolchain

stable-x86_64-unknown-linux-gnu (default)
rustc 1.69.0 (84c898d65 2023-04-16)

Default host: x86_64-unknown-linux-gnu
rustup home: /home/vizvasrj/.rustup

installed toolchains

stable-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu

installed targets for active toolchain

wasm32-unknown-unknown
x86_64-unknown-linux-gnu

active toolchain

nightly-x86_64-unknown-linux-gnu (overridden by +toolchain on the command line)
rustc 1.71.0-nightly (7f94b314c 2023-04-23)

Steps to reproduce

git clone https://github.com/substrate-developer-hub/substrate-node-template

cd substrate-node-template
git switch -c my-wip-branch
cargo build --release

Compiling sp-core-hashing v5.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#ba87188c)
     Compiling sp-io v7.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#ba87188c)
  error[E0557]: feature has been removed
    --> /home/vizvasrj/.cargo/git/checkouts/substrate-7e08433d4c370a21/ba87188/primitives/io/src/lib.rs:22:43
     |
  22 | #![cfg_attr(not(feature = "std"), feature(alloc_error_handler))]
     |                                           ^^^^^^^^^^^^^^^^^^^ feature has been removed
     |
     = note: now handled by panic handler

     Compiling sp-weights v4.0.0 (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.40#ba87188c)
     Compiling blake2 v0.10.6
  error: cannot find attribute `alloc_error_handler` in this scope
      --> /home/vizvasrj/.cargo/git/checkouts/substrate-7e08433d4c370a21/ba87188/primitives/io/src/lib.rs:1657:3
       |
  1657 | #[alloc_error_handler]
       |   ^^^^^^^^^^^^^^^^^^^

     Compiling fs-err v2.9.0
  For more information about this error, try `rustc --explain E0557`.
  error: could not compile `sp-io` (lib) due to 2 previous errors
  warning: build failed, waiting for other jobs to finish...
warning: build failed, waiting for other jobs to finish...
    Building [=======================> ] 947/959: librocksdb-sys(build)

@github-actions github-actions bot added the J2-unconfirmed Issue might be valid, but it’s not yet known. label Apr 24, 2023
@jetsonx
Copy link

jetsonx commented Apr 24, 2023

Im getting the same issue

@bkchr
Copy link
Member

bkchr commented Apr 24, 2023

Either downgrade your rustc compiler version to 1.68.0 (as well for the nightly) or use Substrate master with the following pr that solves the problem: #13580

@bkchr bkchr closed this as completed Apr 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J2-unconfirmed Issue might be valid, but it’s not yet known.
Projects
None yet
Development

No branches or pull requests

3 participants