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

Use windows unicode paths to get around windows 260 char path limit. #339

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

MarkJGx
Copy link

@MarkJGx MarkJGx commented Apr 8, 2021

libtorch fails to extract on Windows when the project is near the 260 char windows path limit, this adds a windows check and adjusts the path. Secondly, this normalizes paths using to_verbatim, normalizing paths should fix any issues while using a custom CARGO_TARGET_DIR on Windows. This PR still needs some work.

@MarkJGx MarkJGx closed this Apr 8, 2021
@MarkJGx MarkJGx deleted the windows-fixes branch April 8, 2021 11:08
@MarkJGx MarkJGx restored the windows-fixes branch April 8, 2021 11:08
@MarkJGx MarkJGx reopened this Apr 9, 2021
@MarkJGx
Copy link
Author

MarkJGx commented Apr 9, 2021

Accidentally closed this. Anyhow while this does fix the extraction issues on windows by using the long unicode paths, it reveals a new issue. MSVC's compiler driver cl.exe fails to find certain include headers when building, which coincidentally are longer than 260 characters on my windows file system. I'm not sure if there's a flag that could be passed through cc that could fix this, might be an unresolved cl issue.

I'm currently working with a much older commit (0.3.1), I've made changes that provide linux function fallbacks without looking as bad as this PR with the cfg macros. Most likely will forward port later when I've resolved the cl issues.

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

Successfully merging this pull request may close these issues.

None yet

1 participant