Skip to content

Cargo panics when attempting to compile project on shared partition #52440

Closed as not planned

Description

@tdoylend

I have a machine which dual-boots between Windows and Linux (Mint 18.3.) Rust is installed on both platforms. A shared partition (formatted Ext4 and accessed on Windows via Ext2Fsd) holds current projects, for easy inter-platform access.

I created a Rust project on the shared partition in Linux (just the default "Hello World" example), and compiled and ran it without errors. On rebooting to Windows and attempting to compile again, however, the following error was reported:

warning: could not canonicalize path: 'J:\projects\realmworld\realmclient'
warning: could not canonicalize path: 'J:\projects\realmworld\realmclient'
warning: could not canonicalize path: 'J:\projects\realmworld'
warning: could not canonicalize path: 'J:\projects'
warning: could not canonicalize path: 'J:\'
   Compiling realmclient v0.1.0 (file:///J:/projects/realmworld/realmclient)
error: incremental compilation: error canonicalizing path 
`J:\projects\realmworld\realmclient\target\debug\incremental\realmclient-2s66szn1ud36l`: The system cannot find the file specified. (os error 2)

thread 'main' panicked at 'librustc\session\mod.rs:795: Trying to get session directory from IncrCompSession `NotInitialized`', librustc\session\mod.rs:1281:26
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: aborting due to previous error


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.27.1 (5f2b325f6 2018-07-07) running on x86_64-pc-windows-gnu

note: compiler flags: -C debuginfo=2 -C incremental --crate-type bin

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

error: Could not compile `realmclient`.

To learn more, run the command again with --verbose.

Activity

  1. added
    O-windowsOperating system: Windows
    O-linuxOperating system: Linux
    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
    A-incr-compArea: Incremental compilation
    on Jul 16, 2018
  2. added
    C-bugCategory: This is a bug.
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Aug 6, 2019
  3. Enselic commented on Aug 21, 2023

    @Enselic
    Member

    Triage: This seems a like a duplicate to #48249 in practice (problems canonicalizing paths on special drives on Windows), so closing as such.

  4. added a commit that references this issue on Sep 3, 2026
  5. added 3 commits that reference this issue on Sep 3, 2026
  6. added a commit that references this issue on Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-incr-compArea: Incremental compilationC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️O-linuxOperating system: LinuxO-windowsOperating system: WindowsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions