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

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

Closed
purejgleason opened this issue Jul 11, 2021 · 6 comments
Closed
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@purejgleason
Copy link

purejgleason commented Jul 11, 2021

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
@purejgleason purejgleason added C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Jul 11, 2021
@jyn514 jyn514 changed the title Tracking Issue for ./x.py install error invalid enum variant tag while decoding PanicStrategy`` ./x.py install error invalid enum variant tag while decoding PanicStrategy`` Jul 11, 2021
@jyn514 jyn514 added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. and removed C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Jul 11, 2021
@jyn514
Copy link
Member

jyn514 commented Jul 11, 2021

@purejgleason this is probably #76720 - if you run rm -r build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-apple-darwin/release/incremental does it fix the issue?

@purejgleason
Copy link
Author

purejgleason commented Jul 13, 2021

@jyn514

rm: build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-apple-darwin/release/incremental: No such file or directory

I will look more at the link. Also will try deleting the full build since it is not in the repo

@jyn514
Copy link
Member

jyn514 commented Jul 13, 2021

If that doesn't work, try rm build/x86_64-apple-darwin/stage1-rustc/ - that should clear less than a full x.py clean.

@jyn514
Copy link
Member

jyn514 commented Jul 13, 2021

Err uhh I found the issue, I meant to paste rm -r build/x86_64-apple-darwin/stage1-rustc/x86_64-apple-darwin/release/incremental

@jyn514
Copy link
Member

jyn514 commented Aug 16, 2021

@purejgleason are you still running into trouble with this?

@jyn514
Copy link
Member

jyn514 commented Oct 11, 2021

I'm going to close this since it's likely a duplicate of #76720.

@jyn514 jyn514 closed this as completed Oct 11, 2021
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. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

2 participants