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

Failure to load dependencies with long file names on Windows #7420

Closed
naim94a opened this issue Sep 23, 2019 · 4 comments
Closed

Failure to load dependencies with long file names on Windows #7420

naim94a opened this issue Sep 23, 2019 · 4 comments
Labels
A-git Area: anything dealing with git C-bug Category: bug O-windows OS: Windows S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

Comments

@naim94a
Copy link

naim94a commented Sep 23, 2019

Problem

When trying to build a crate on Windows that has dependencies with long file names, cargo fails to pull dependencies with a "path too long" error. This issue does not seem to appear on Linux (tested with WSL).

The output I got from cargo build

error: failed to load source for a dependency on `curve25519-fiat`

Caused by:
  Unable to update https://github.com/calibra/rust-curve25519-fiat.git#d7e30233

Caused by:
  failed to update submodule `fiat-crypto`

Caused by:
  failed to update submodule `coqprime`

Caused by:
  invalid path '\\?\C:\Users\User\.cargo\git\checkouts\rust-curve25519-fiat-d934e46b8646fad1\d7e3023\curve25519-fiat\src\external\fiat-crypto\coqprime\src\Coqprime\examples\prime216656403549020227250327256032933021325435259861468456540459488823774358486649614451547405419273433458932168893949521787.v' (path too long); class=Filesystem (30)

Steps

  1. git clone https://github.com/libra/libra.git
  2. cargo build

Possible Solution(s)

  • I assume this issue is related to this bug that exists in libgit2 since 2015: Support core.longpaths on Windows libgit2/libgit2#3053. If so, pushing for a fix in libgit2 may resolve this issue.
  • Make cargo use the system's git command, or add an option to use another binary instead of libgit2.

Notes
Output of cargo version:
cargo 1.37.0-nightly (4c1fa54 2019-06-24)

As of today, libra is locked on rust nightly-2019-07-08.

@naim94a naim94a added the C-bug Category: bug label Sep 23, 2019
@ehuss ehuss added the A-git Area: anything dealing with git label Sep 23, 2019
@alexcrichton
Copy link
Member

While still a bug in this crate, if you're getting this as an error through Cargo you can try using Cargo's git-fetch-with-cli option:

[net]
git-fetch-with-cli = true

@ehuss
Copy link
Contributor

ehuss commented Sep 24, 2019

I don't think git-fetch-with-cli helps because cargo still uses libgit2 to read/extract the repo, and it fails (at least in my testing).

@naim94a
Copy link
Author

naim94a commented Sep 24, 2019

I can confirm that adding git-fetch-with-cli doesn't fix the problem

@ehuss
Copy link
Contributor

ehuss commented Dec 8, 2023

I'm going to close this as a duplicate of #13020, even though this is older, that has more information.

@ehuss ehuss closed this as not planned Won't fix, can't repro, duplicate, stale Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-git Area: anything dealing with git C-bug Category: bug O-windows OS: Windows S-needs-design Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Projects
None yet
Development

No branches or pull requests

4 participants