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

Compiler panic while installing cargo-src on Windows 10 #54875

Closed
pip25 opened this issue Oct 6, 2018 · 3 comments
Closed

Compiler panic while installing cargo-src on Windows 10 #54875

pip25 opened this issue Oct 6, 2018 · 3 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ O-windows Operating system: Windows T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@pip25
Copy link

pip25 commented Oct 6, 2018

As per the documentation I've ran
"cargo +nightly install cargo-src"
It consistently produces the following result (with backtrace enabled):

    Updating crates.io index
  Installing cargo-src v0.1.5
   Compiling serde v1.0.79
   Compiling semver-parser v0.7.0
   Compiling version_check v0.1.5
   Compiling winapi v0.3.6
   Compiling winapi-build v0.1.1
   Compiling void v1.0.2
   Compiling rand_core v0.3.0
   Compiling stable_deref_trait v1.1.1
   Compiling nodrop v0.1.12
   Compiling cfg-if v0.1.5
   Compiling winapi v0.2.8
   Compiling scopeguard v0.3.3
   Compiling byteorder v1.2.6
   Compiling memoffset v0.2.1
   Compiling crossbeam-utils v0.5.0
   Compiling lazycell v1.2.0
   Compiling libc v0.2.43
   Compiling futures v0.1.24
   Compiling slab v0.4.1
   Compiling proc-macro2 v0.4.20
   Compiling unicode-xid v0.1.0
   Compiling ryu v0.2.6
   Compiling unicode-xid v0.0.4
   Compiling scoped-tls v0.1.2
   Compiling ucd-util v0.1.1
   Compiling rustc-serialize v0.3.24
   Compiling regex v1.0.5
   Compiling quote v0.3.15
   Compiling matches v0.1.8
   Compiling unicode-width v0.1.5
   Compiling rustc-demangle v0.1.9
   Compiling httparse v1.3.3
   Compiling take v0.1.0
   Compiling endian-type v0.1.2
   Compiling bitflags v1.0.4
   Compiling pest v1.0.6
   Compiling nibble_vec v0.0.4
   Compiling unicode-normalization v0.1.7
   Compiling slab v0.3.0
   Compiling try-lock v0.1.0
   Compiling smallvec v0.2.1
   Compiling safemem v0.3.0
   Compiling utf8-ranges v1.0.1
   Compiling itoa v0.4.3
   Compiling utf8-ranges v0.1.3
   Compiling regex-syntax v0.3.9
   Compiling vec_map v0.8.1
   Compiling strsim v0.7.0
   Compiling language-tags v0.2.2
   Compiling unicode_categories v0.1.1
   Compiling percent-encoding v1.0.1
   Compiling typed-arena v1.4.1
   Compiling entities v1.0.1
   Compiling rls-blacklist v0.1.2
   Compiling unreachable v1.0.0
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 1, kind: Other, message: "Nem megfelelő funkció." }', libcore\result.rs:1009:5
stack backtrace:
   0: <std::path::Iter<'a> as core::convert::AsRef<std::path::Path>>::as_ref
   1: std::panicking::take_hook
   2: std::panicking::take_hook
   3: <rustc::ty::sty::Binder<rustc::ty::ProjectionPredicate<'tcx>> as rustc::ty::ToPredicate<'tcx>>::to_predicate
   4: std::panicking::rust_panic_with_hook
   5: std::panicking::begin_panic_fmt
   6: rust_begin_unwind
   7: rustc_metadata::locator::Context::report_errs
   8: rustc_metadata::locator::Context::maybe_load_library_crate
   9: rustc_metadata::creader::CrateLoader::new
  10: rustc_metadata::creader::CrateLoader::new
  11: rustc_metadata::creader::CrateLoader::process_extern_crate
  12: rustc_resolve::build_reduced_graph::<impl rustc_resolve::ToNameBinding<'a> for (&'a rustc_resolve::ModuleData<'a>, rustc::ty::Visibility, syntax_pos::span_encoding::Span, syntax_pos::hygiene::Mark)>::to_name_binding
  13: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor<'a, 'b, 'cl> as syntax::visit::Visitor<'a>>::visit_item
  14: <rustc_resolve::BindingError as core::cmp::PartialOrd>::partial_cmp
  15: <unknown>
  16: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor<'a, 'b, 'cl> as syntax::visit::Visitor<'a>>::visit_item
  17: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor<'a, 'b, 'cl> as syntax::visit::Visitor<'a>>::visit_ty
  18: syntax::ext::expand::MacroExpander::expand_crate
  19: syntax::ext::expand::MacroExpander::expand_crate
  20: syntax::ext::expand::MacroExpander::expand_crate
  21: rustc_driver::target_features::add_configuration
  22: rustc_driver::target_features::add_configuration
  23: rustc_driver::driver::count_nodes
  24: rustc_driver::driver::compile_input
  25: rustc_driver::run_compiler
  26: <env_logger::filter::inner::Filter as core::fmt::Display>::fmt
  27: rustc_driver::run_compiler
  28: rustc_driver::target_features::add_configuration
  29: _rust_maybe_catch_panic
  30: <rustc_driver::derive_registrar::Finder as rustc::hir::itemlikevisit::ItemLikeVisitor<'v>>::visit_trait_item
  31: rustc_driver::main
  32: std::rt::lang_start_internal
  33: <unknown>
  34: BaseThreadInitThunk
  35: RtlValidSecurityDescriptor
  36: RtlValidSecurityDescriptor
  37: <unknown>
query stack during panic:
end of query stack

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/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.31.0-nightly (fddcd316a 2018-10-05) running on i686-pc-windows-msvc

note: compiler flags: -C opt-level=3 --crate-type lib

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

error: Could not compile `unreachable`.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-src v0.1.5`, intermediate artifacts can be found at `R:\Temp\cargo-install8Atx0e`

Caused by:
  build failed

Small added explanation: I'm running a Hungarian version of Windows; the error message "Nem megfelelő funkció" means "inappropriate function". Not sure if it matters, but since cargo is installed into the user directory by rustup, it might be relevant that my username has special characters and spaces in it.

The same result occurs if I try using the stable compiler (1.29.1), although that is less relevant since cargo-src requires nightly. Both compilers have only been installed an hour ago, so they are as recent as they can be.

I've also tried cloning the repo of the dependency and building "unreachable v1.0.0" separately, that build succeeds without issues.

@pip25
Copy link
Author

pip25 commented Oct 6, 2018

It seems I've found the cause: my TEMP directory is by default set to an ImDisk RAM drive. If I change the TEMP/TMP variables to a folder on a normal disk drive, the build succeeds. Strange though, since I've never experienced this kind of compatibility issue with ImDisk with any other Windows tool before, and I've been using this RAM drive for years.

@Havvy Havvy added O-windows Operating system: Windows I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ C-bug Category: This is a bug. labels Oct 7, 2018
@retep998
Copy link
Member

I suspect this may be due to Rust canonicalizing paths when it only needs normalization.

@Centril Centril added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 10, 2020
@Enselic
Copy link
Member

Enselic commented Aug 21, 2023

Triage: This is about problems canonicalizing paths on RAM drives. So is #48249, so closing as duplicate.

@Enselic Enselic closed this as not planned Won't fix, can't repro, duplicate, stale Aug 21, 2023
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) ❄️ O-windows Operating system: Windows 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

5 participants