Skip to content

cargo nightly build with RUSTFLAGS having --remap-path-prefix broke since last nightly on Windows #7211

@pocesar

Description

@pocesar

Problem

When using remap-path-prefix before, I was able to set the paths to a common root like : "build/src/", now the generated .d files had wrong paths when trying to set the RUSTFLAGS with remap-path-prefix and cargo fails with:

   Compiling proc-macro2 v0.4.30
   Compiling unicode-xid v0.1.0
   Compiling serde v1.0.98
error: could not parse/generate dep info at: C:\ard\target\debug\deps\unicode_xid-d89e93a95ce7a9a5.d

Caused by:
  The system cannot find the path specified. (os error 3)
warning: build failed, waiting for other jobs to finish...
error: could not parse/generate dep info at: C:\ard\target\debug\build\serde-cbe4cec761dd61b5\build_script_build-cbe4cec761dd61b5.d

Caused by:
  The system cannot find the file specified. (os error 2)
warning: build failed, waiting for other jobs to finish...
error: could not parse/generate dep info at: C:\ard\target\debug\build\proc-macro2-c6a71a674b70c483\build_script_build-c6a71a674b70c483.d

Caused by:
  The system cannot find the file specified. (os error 2)
build failed, exit code 101 null

So at the moment, the builds are non reproducible (for me at least)

Steps

  1. Setup a simple bin with any dependencies, put some code that uses it
  2. set RUSTFLAGS=--remap-path-prefix=C:\ard\=\build\src\ on the console
  3. try to cargo build

N.B: used to work fine before
PS: if you put "quotes" around the value as in "C:\ard\=\build\src\", the remap fails

Possible Solution(s)

It seems that some commits regarding the remap-path-prefix and dealing with Windows paths, might have broken it:

d99b7fe
1140c52
c8a9f88
65e3885
3595de3
4f6553a

Notes

Output of cargo version: cargo 1.38.0-nightly (26092da 2019-07-31)

Windows 10 x64
rustc 1.38.0-nightly (d3f8a0b5d 2019-08-04)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions