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

cargo build --manifest-path <long-path> doesn't work on Windows #8965

Closed
stepancheg opened this issue Dec 10, 2020 · 3 comments
Closed

cargo build --manifest-path <long-path> doesn't work on Windows #8965

stepancheg opened this issue Dec 10, 2020 · 3 comments
Labels
C-bug Category: bug

Comments

@stepancheg
Copy link
Contributor

cargo build --manifest-path <very-long-path>

doesn't work on Windows: reports

error: manifest path `<very-long-path>` does not exist

Script which reproduces the problem: https://github.com/stepancheg/test-win-long-paths/blob/master/test.sh
Failed job on GitHub actions: https://github.com/stepancheg/test-win-long-paths/runs/1532597301

Why it is important

rustc has certain problems with long paths on Windows, which I need to reproduce. I tried to reproduce them with cargo and encountered this issue.

In certain build systems and certain CI environments build paths may be quite long. It is constant pain on Windows.

@stepancheg stepancheg added the C-bug Category: bug label Dec 10, 2020
@ehuss
Copy link
Contributor

ehuss commented Dec 10, 2020

There are several issues open for this (such as #7986, which explains a little why this is very difficult), and recent PRs such as #8874, #8881, #8964.

Last time I checked, the MSVC linker didn't support long paths, so even if Cargo supported them, it would likely still not work.
(Though that information may be outdated, it has been a long time since I've tried.)

@ehuss
Copy link
Contributor

ehuss commented Jan 7, 2021

Closing as a duplicate of #7986.

@ehuss ehuss closed this as completed Jan 7, 2021
@dylni
Copy link

dylni commented Jan 7, 2021

When #6198 is fixed, you can use a verbatim path instead (\\?\long\path). There's a PR open to fix it: #8881

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

3 participants