Skip to content

cargo compiling error 122 on windows 7 x64 platform #52377

Not planned
@jeppeter

Description

@jeppeter

To whom responsible for this:
I download https://static.rust-lang.org/dist/rust-1.27.1-x86_64-pc-windows-msvc.msi
and install on my windows 7 sp1 x64 , I select insert rust path into PATH environment variable , when i run cargo new hello and cargo build it is error ,(see attachment) the most eror is os error 122 , first i guess ,the compiler is not in the right environment ,but when i run command
rustc main.rs
it compiles ok ,so i am sure that the cargo and rustc not run in proper way ,
and i set the environment variable CARGO_INCREMENTAL=0
this makes ok

could somebody fixup this bug
thank you
best regards
error.txt

Activity

retep998

retep998 commented on Jul 15, 2018

@retep998
Member

What kind of drive is Z:? Is it a network drive? Is it a ram drive?

Related issue: #48249

jeppeter

jeppeter commented on Jul 15, 2018

@jeppeter
Author
retep998

retep998 commented on Jul 15, 2018

@retep998
Member

Please do all your Rust stuff on a normal drive, not a virtual memory drive, until this bug can be fixed.

jonas-schievink

jonas-schievink commented on Oct 13, 2019

@jonas-schievink
Contributor

Inlining error.txt so people don't have to download and open it:

   Compiling hello v0.1.0 (file:///Z:/hello)
error: incremental compilation: error canonicalizing path `Z:\hello\target\debug\incremental\hello-2tm11x4hww51g`: 传递给系统调用的数据区域太小。 (os error 122)

thread 'rustc' panicked at 'librustc\session\mod.rs:727: Trying to get session directory from IncrCompSession `NotInitialized`', librustc\session\mod.rs:1180:26
note: Run with `RUST_BACKTRACE=1` for a 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/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.25.0 (84203cac6 2018-03-25) running on x86_64-pc-windows-msvc

error: Could not compile `hello`.

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

jonas-schievink commented on Oct 13, 2019

@jonas-schievink
Contributor

Error 122 is ERROR_INSUFFICIENT_BUFFER.

added
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Apr 5, 2023
Enselic

Enselic commented on Aug 21, 2023

@Enselic
Member

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

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 compilationO-windowsOperating system: WindowsO-windows-7OS: Windows 7 or Windows Server 2008 R2 or etc.T-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

        Participants

        @Enselic@retep998@estebank@jonas-schievink@jeppeter

        Issue actions

          cargo compiling error 122 on windows 7 x64 platform · Issue #52377 · rust-lang/rust