Skip to content

./x.py install error invalid enum variant tag while decoding PanicStrategy`` #87063

@purejgleason

Description

@purejgleason

As a developer I should be able to install rust using ./x.py install

However, when I run the command I get...

sudo RUST_BACKTRACE=1 ./x.py install
info: looks like you are running this command under `sudo`
      and so in order to preserve your $HOME this will now
      use vendored sources by default.
Updating only changed submodules
Submodules updated in 0.04 seconds
    Finished dev [unoptimized + debuginfo] target(s) in 0.25s
Building stage0 std artifacts (x86_64-apple-darwin -> x86_64-apple-darwin)
    Finished release [optimized] target(s) in 0.25s
Copying stage0 std from stage0 (x86_64-apple-darwin -> x86_64-apple-darwin / x86_64-apple-darwin)
Building stage0 compiler artifacts (x86_64-apple-darwin -> x86_64-apple-darwin)
    Finished release [optimized] target(s) in 0.34s
Copying stage0 rustc from stage0 (x86_64-apple-darwin -> x86_64-apple-darwin / x86_64-apple-darwin)
Assembling stage1 compiler (x86_64-apple-darwin)
Building stage1 std artifacts (x86_64-apple-darwin -> x86_64-apple-darwin)
    Finished release [optimized] target(s) in 0.27s
Copying stage1 std from stage1 (x86_64-apple-darwin -> x86_64-apple-darwin / x86_64-apple-darwin)
Building stage1 compiler artifacts (x86_64-apple-darwin -> x86_64-apple-darwin)
   Compiling serde_json v1.0.59
   Compiling tracing-serde v0.1.2
   Compiling rls-span v0.5.3
   Compiling gsgdt v0.1.2
   Compiling rustc_data_structures v0.0.0 (/Users/jgleason/Code/lib/rust/compiler/rustc_data_structures)
thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: "invalid enum variant tag while decoding `PanicStrategy`, expected 0..2"', compiler/rustc_metadata/src/rmeta/decoder.rs:231:29
stack backtrace:
thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: "invalid enum variant tag while decoding `PanicStrategy`, expected 0..2"', compiler/rustc_metadata/src/rmeta/decoder.rs:231:29
stack backtrace:
thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: "invalid enum variant tag while decoding `PanicStrategy`, expected 0..2"', compiler/rustc_metadata/src/rmeta/decoder.rs:231:29
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: rustc_metadata::rmeta::decoder::MetadataBlob::get_root
   4: rustc_metadata::locator::CrateLocator::extract_one
   5: rustc_metadata::locator::CrateLocator::extract_lib
   6: rustc_metadata::locator::CrateLocator::find_library_crate
   7: rustc_metadata::locator::CrateLocator::maybe_load_library_crate
   8: rustc_metadata::creader::CrateLoader::load
   9: rustc_metadata::creader::CrateLoader::maybe_resolve_crate
  10: rustc_metadata::creader::CrateLoader::maybe_resolve_crate
  11: rustc_metadata::creader::CrateLoader::maybe_process_path_extern
  12: rustc_resolve::Resolver::extern_prelude_get
  13: rustc_resolve::macros::<impl rustc_resolve::Resolver>::early_resolve_ident_in_lexical_scope
  14: rustc_resolve::Resolver::resolve_path_with_ribs::{{closure}}
  15: rustc_resolve::Resolver::resolve_path_with_ribs
  16: rustc_resolve::imports::ImportResolver::resolve_imports
  17: rustc_resolve::macros::<impl rustc_expand::base::ResolverExpand for rustc_resolve::Resolver>::resolve_imports
  18: rustc_expand::expand::MacroExpander::fully_expand_fragment
  19: rustc_expand::expand::MacroExpander::expand_crate
  20: rustc_session::utils::<impl rustc_session::session::Session>::time
  21: rustc_interface::passes::configure_and_expand
  22: rustc_interface::queries::Queries::expansion
  23: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  24: rustc_span::with_source_map
  25: 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.

   0: _rust_begin_unwind
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
   1: core::panicking::panic_fmt

   2: core::result::unwrap_failed
note: rustc 1.55.0-dev running on x86_64-apple-darwin

   3: rustc_metadata::rmeta::decoder::MetadataBlob::get_root
note: compiler flags: -Z macro-backtrace -Z osx-rpath-install-name -Z tls-model=initial-exec -Z unstable-options -Z binary-dep-depinfo -Z force-unstable-if-unmarked -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -C link-args=-Wl,-rpath,@loader_path/../lib -C split-debuginfo=unpacked -C prefer-dynamic --crate-type lib
   4: rustc_metadata::locator::CrateLocator::extract_one

note: some of the compiler flags provided by cargo are hidden
   5: rustc_metadata::locator::CrateLocator::extract_lib

query stack during panic:
   6: rustc_metadata::locator::CrateLocator::find_library_crate
   7: rustc_metadata::locator::CrateLocator::maybe_load_library_crate
end of query stack
   8: rustc_metadata::creader::CrateLoader::load
   9: rustc_metadata::creader::CrateLoader::maybe_resolve_crate
  10: rustc_metadata::creader::CrateLoader::maybe_resolve_crate
  11: rustc_metadata::creader::CrateLoader::maybe_process_path_extern
  12: rustc_resolve::Resolver::extern_prelude_get
  13: rustc_resolve::macros::<impl rustc_resolve::Resolver>::early_resolve_ident_in_lexical_scope
  14: rustc_resolve::Resolver::resolve_path_with_ribs::{{closure}}
  15: rustc_resolve::Resolver::resolve_path_with_ribs
  16: rustc_resolve::imports::ImportResolver::resolve_imports
  17: rustc_resolve::macros::<impl rustc_expand::base::ResolverExpand for rustc_resolve::Resolver>::resolve_imports
  18: rustc_expand::expand::MacroExpander::fully_expand_fragment
  19: rustc_expand::expand::MacroExpander::expand_crate
  20: rustc_session::utils::<impl rustc_session::session::Session>::time
  21: rustc_interface::passes::configure_and_expand
  22: rustc_interface::queries::Queries::expansion
  23: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  24: rustc_span::with_source_map
  25: 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.55.0-dev running on x86_64-apple-darwin

note: compiler flags: -Z macro-backtrace -Z osx-rpath-install-name -Z tls-model=initial-exec -Z unstable-options -Z binary-dep-depinfo -Z force-unstable-if-unmarked -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -C link-args=-Wl,-rpath,@loader_path/../lib -C split-debuginfo=unpacked -C prefer-dynamic --crate-type lib

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

query stack during panic:
end of query stack
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: rustc_metadata::rmeta::decoder::MetadataBlob::get_root
   4: rustc_metadata::locator::CrateLocator::extract_one
   5: rustc_metadata::locator::CrateLocator::extract_lib
   6: rustc_metadata::locator::CrateLocator::find_library_crate
   7: rustc_metadata::locator::CrateLocator::maybe_load_library_crate
   8: rustc_metadata::creader::CrateLoader::load
   9: rustc_metadata::creader::CrateLoader::maybe_resolve_crate
  10: rustc_metadata::creader::CrateLoader::maybe_resolve_crate
  11: rustc_metadata::creader::CrateLoader::maybe_process_path_extern
  12: rustc_resolve::Resolver::extern_prelude_get
  13: rustc_resolve::macros::<impl rustc_resolve::Resolver>::early_resolve_ident_in_lexical_scope
  14: rustc_resolve::Resolver::resolve_path_with_ribs::{{closure}}
  15: rustc_resolve::Resolver::resolve_path_with_ribs
  16: rustc_resolve::imports::ImportResolver::resolve_imports
  17: rustc_resolve::macros::<impl rustc_expand::base::ResolverExpand for rustc_resolve::Resolver>::resolve_imports
  18: rustc_expand::expand::MacroExpander::fully_expand_fragment
  19: rustc_expand::expand::MacroExpander::expand_crate
  20: rustc_session::utils::<impl rustc_session::session::Session>::time
  21: rustc_interface::passes::configure_and_expand
  22: rustc_interface::queries::Queries::expansion
  23: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  24: rustc_span::with_source_map
  25: 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.55.0-dev running on x86_64-apple-darwin

note: compiler flags: -Z macro-backtrace -Z osx-rpath-install-name -Z tls-model=initial-exec -Z unstable-options -Z binary-dep-depinfo -Z force-unstable-if-unmarked -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -C link-args=-Wl,-rpath,@loader_path/../lib -C split-debuginfo=unpacked -C prefer-dynamic --crate-type lib

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

query stack during panic:
end of query stack
error: could not compile `rls-span`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: "invalid enum variant tag while decoding `PanicStrategy`, expected 0..2"', compiler/rustc_metadata/src/rmeta/decoder.rs:231:29
stack backtrace:
thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: "invalid enum variant tag while decoding `PanicStrategy`, expected 0..2"', compiler/rustc_metadata/src/rmeta/decoder.rs:231:29
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: rustc_metadata::rmeta::decoder::MetadataBlob::get_root
   4: rustc_metadata::locator::CrateLocator::extract_one
   5: rustc_metadata::locator::CrateLocator::extract_lib
   6: rustc_metadata::locator::CrateLocator::find_library_crate
   7: rustc_metadata::locator::CrateLocator::maybe_load_library_crate
   8: rustc_metadata::creader::CrateLoader::load
   9: rustc_metadata::creader::CrateLoader::maybe_resolve_crate
  10: rustc_metadata::creader::CrateLoader::maybe_resolve_crate
  11: rustc_metadata::creader::CrateLoader::process_extern_crate
  12: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_item
  13: rustc_ast::visit::walk_item
  14: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor as rustc_ast::visit::Visitor>::visit_item
  15: rustc_expand::expand::AstFragment::visit_with
  16: rustc_resolve::macros::<impl rustc_expand::base::ResolverExpand for rustc_resolve::Resolver>::visit_ast_fragment_with_placeholders
  17: rustc_expand::expand::MacroExpander::collect_invocations
  18: rustc_expand::expand::MacroExpander::fully_expand_fragment
  19: rustc_expand::expand::MacroExpander::expand_crate
  20: rustc_session::utils::<impl rustc_session::session::Session>::time
  21: rustc_interface::passes::configure_and_expand
  22: rustc_interface::queries::Queries::expansion
  23: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  24: rustc_span::with_source_map
  25: 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.55.0-dev running on x86_64-apple-darwin

note: compiler flags: -Z macro-backtrace -Z osx-rpath-install-name -Z tls-model=initial-exec -Z unstable-options -Z binary-dep-depinfo -Z force-unstable-if-unmarked -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -C link-args=-Wl,-rpath,@loader_path/../lib -C split-debuginfo=unpacked -C prefer-dynamic --crate-type lib

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

query stack during panic:
end of query stack
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: rustc_metadata::rmeta::decoder::MetadataBlob::get_root
   4: rustc_metadata::locator::CrateLocator::extract_one
   5: rustc_metadata::locator::CrateLocator::extract_lib
   6: rustc_metadata::locator::CrateLocator::find_library_crate
   7: rustc_metadata::locator::CrateLocator::maybe_load_library_crate
   8: rustc_metadata::creader::CrateLoader::load
   9: rustc_metadata::creader::CrateLoader::maybe_resolve_crate
  10: rustc_metadata::creader::CrateLoader::maybe_resolve_crate
  11: rustc_metadata::creader::CrateLoader::maybe_process_path_extern
  12: rustc_resolve::Resolver::extern_prelude_get
  13: rustc_resolve::macros::<impl rustc_resolve::Resolver>::early_resolve_ident_in_lexical_scope
  14: rustc_resolve::Resolver::resolve_path_with_ribs::{{closure}}
  15: rustc_resolve::Resolver::resolve_path_with_ribs
  16: rustc_resolve::imports::ImportResolver::resolve_imports
  17: rustc_resolve::macros::<impl rustc_expand::base::ResolverExpand for rustc_resolve::Resolver>::resolve_imports
  18: rustc_expand::expand::MacroExpander::fully_expand_fragment
  19: rustc_expand::expand::MacroExpander::expand_crate
  20: rustc_session::utils::<impl rustc_session::session::Session>::time
  21: rustc_interface::passes::configure_and_expand
  22: rustc_interface::queries::Queries::expansion
  23: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  24: rustc_span::with_source_map
  25: 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.55.0-dev running on x86_64-apple-darwin

note: compiler flags: -Z macro-backtrace -Z osx-rpath-install-name -Z tls-model=initial-exec -Z unstable-options -Z binary-dep-depinfo -Z force-unstable-if-unmarked -C opt-level=3 -C embed-bitcode=no -C debuginfo=0 -C link-args=-Wl,-rpath,@loader_path/../lib -C split-debuginfo=unpacked -C prefer-dynamic --crate-type lib

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

query stack during panic:
end of query stack
error: build failed
Build completed unsuccessfully in 0:00:03

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions