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

ICE WASM toolchain not installed. But it is installed #89107

Closed
tifrel opened this issue Sep 19, 2021 · 1 comment
Closed

ICE WASM toolchain not installed. But it is installed #89107

tifrel opened this issue Sep 19, 2021 · 1 comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@tifrel
Copy link

tifrel commented Sep 19, 2021

Code

I am currently experiencing issues when compiling to wasm and have included the commands to reproduce. Due to time limitations, I can currently not narrow it down any further. However I can use nightly-2021-09-17, which fixes the issues for me. Hopefully this can help you find the error:

$ git clone https://github.com/paritytech/substrate
$ cd substrate/primitives/runtime-interface/test-wasm
$ RUST_BACKTRACE=1 cargo build
   Compiling sp-runtime-interface-test-wasm v2.0.0 (/Users/tf/sandbox/substrate/primitives/runtime-interface/test-wasm)
error: failed to run custom build command for `sp-runtime-interface-test-wasm v2.0.0 (/Users/tf/sandbox/substrate/primitives/runtime-interface/test-wasm)`

Caused by:
  process didn't exit successfully: `/Users/tf/sandbox/substrate/target/debug/build/sp-runtime-interface-test-wasm-7a998eaa5eac0220/build-script-build` (exit status: 1)
  --- stderr
  Rust WASM toolchain not installed, please install it!

  Further error information:
  ------------------------------------------------------------
     Compiling wasm-test v1.0.0 (/var/folders/bq/bjccsvc10617dsh30gbv9mm00000gn/T/.tmpTljFvc)
  thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: "Provided allocation has wrong size for slot count 131072"', compiler/rustc_metadata/src/rmeta/decoder.rs:263:29
  stack backtrace:
     0: _rust_begin_unwind
     1: core::panicking::panic_fmt
     2: core::result::unwrap_failed
     3: rustc_metadata::rmeta::decoder::CrateMetadata::new
     4: rustc_metadata::creader::CrateLoader::maybe_resolve_crate
     5: rustc_metadata::creader::CrateLoader::maybe_resolve_crate
     6: rustc_metadata::creader::CrateLoader::process_extern_crate
     7: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_item
     8: rustc_ast::visit::walk_item
     9: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_item
    10: rustc_expand::expand::AstFragment::visit_with
    11: rustc_resolve::macros::<impl rustc_expand::base::ResolverExpand for rustc_resolve::Resolver>::visit_ast_fragment_with_placeholders
    12: rustc_expand::expand::MacroExpander::collect_invocations
    13: rustc_expand::expand::MacroExpander::fully_expand_fragment
    14: rustc_expand::expand::MacroExpander::expand_crate
    15: rustc_session::utils::<impl rustc_session::session::Session>::time
    16: rustc_interface::passes::configure_and_expand
    17: rustc_interface::queries::Queries::expansion
    18: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
    19: rustc_span::with_source_map
    20: scoped_tls::ScopedKey<T>::set
  note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

  error: internal compiler error: unexpected panic

  note: the compiler unexpectedly panicked. this is a bug.

  note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

  note: rustc 1.57.0-nightly (aa8f2d432 2021-09-18) running on aarch64-apple-darwin

  note: compiler flags: -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 -C incremental --crate-type bin

  note: some of the compiler flags provided by cargo are hidden

  query stack during panic:
  end of query stack
  error: could not compile `wasm-test`
  ------------------------------------------------------------

Note that (as shown below) I have the wasm target installed for both the stable and the nightly toolchain, which cargo claims is not the case.

Meta

$ rustup show
Default host: aarch64-apple-darwin
rustup home:  /Users/tf/.rustup

installed toolchains
--------------------

stable-aarch64-apple-darwin (default)
stable-x86_64-apple-darwin
nightly-aarch64-apple-darwin

installed targets for active toolchain
--------------------------------------

aarch64-apple-darwin
wasm32-unknown-unknown

active toolchain
----------------

stable-aarch64-apple-darwin (default)
rustc 1.55.0 (c8dfcfe04 2021-09-06)

$ rustup +nightly show
# ---- skipped ----

installed targets for active toolchain
--------------------------------------

aarch64-apple-darwin
wasm32-unknown-unknown

active toolchain
----------------

nightly-aarch64-apple-darwin (overridden by +toolchain on the command line)
rustc 1.57.0-nightly (aa8f2d432 2021-09-18)

Error output

See above.

Backtrace

     Compiling wasm-test v1.0.0 (/var/folders/bq/bjccsvc10617dsh30gbv9mm00000gn/T/.tmpTljFvc)
  thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: "Provided allocation has wrong size for slot count 131072"', compiler/rustc_metadata/src/rmeta/decoder.rs:263:29
  stack backtrace:
     0: _rust_begin_unwind
     1: core::panicking::panic_fmt
     2: core::result::unwrap_failed
     3: rustc_metadata::rmeta::decoder::CrateMetadata::new
     4: rustc_metadata::creader::CrateLoader::maybe_resolve_crate
     5: rustc_metadata::creader::CrateLoader::maybe_resolve_crate
     6: rustc_metadata::creader::CrateLoader::process_extern_crate
     7: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_item
     8: rustc_ast::visit::walk_item
     9: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_item
    10: rustc_expand::expand::AstFragment::visit_with
    11: rustc_resolve::macros::<impl rustc_expand::base::ResolverExpand for rustc_resolve::Resolver>::visit_ast_fragment_with_placeholders
    12: rustc_expand::expand::MacroExpander::collect_invocations
    13: rustc_expand::expand::MacroExpander::fully_expand_fragment
    14: rustc_expand::expand::MacroExpander::expand_crate
    15: rustc_session::utils::<impl rustc_session::session::Session>::time
    16: rustc_interface::passes::configure_and_expand
    17: rustc_interface::queries::Queries::expansion
    18: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
    19: rustc_span::with_source_map
    20: scoped_tls::ScopedKey<T>::set

@tifrel tifrel added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 19, 2021
@Aaron1011
Copy link
Member

This is a duplicate of #89085 - a recent incremental compilation change appears to have broken the host compiler for aarch64-apple-darwin
`

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. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants