-
Notifications
You must be signed in to change notification settings - Fork 120
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
Windows build failed if the build path location is too long #1733
Comments
If I force the CMake Generator to be Ninja instead of CMake's Visual Studio generator, it compiles but I get a linker error |
The linker error was due to the fact that the CRT was embedded both by my rust internal library and by |
Thanks for the detailed write up.
Do you have a link for this documentation?
We updated our documentation in aws/aws-lc-rs#465 and the aws-lc-rs build only requires Ninja for the FIPS build. |
I did some googling on this. The "MSBuild" (i.e., CMake generator) part of the problem has been resolved, but other tooling around MSVC might still fail when path names exceed 260 chars. This link appears to be the relevant top-level tracking issue for Visual Studio. |
I was referring to this part of the documentation that mention that the CMake's Visual Studio generator is not tested regularly:
Thanks a lot for digging this up! So it's an upstream problem that we cannot fix here. Note that might happen more frequently with The workaround of using Edit: For completion, overriding the |
Problem:
On every Windows target, the project doesn't compile if the path to the build directory is too long, because of the Windows maximum path length limitation.
To reproduce you have to build inside several nested folders, so the path will be greater than 260 characters.
The current workaround is to set the build directory closer to the root of the file system, but this is not easily discoverable and reliable enough.
Relevant details
AWS-LC commit: (47333e1) (through
aws-lc-sys
0.20.0)System information:
Build log
From my understanding, they are several solutions to this problem:
\\?\
" to every path to remove the limitation. For instance, this was added to the rust standard library in Automatically convert paths to verbatim for filesystem operations that support it rust-lang/rust#89174aws-lc-rs
, as described in Windows doc.CMake
since version 3.4 know how to handle*.manifest
files listed as source filesPlease let me know what is your thought on this.
The text was updated successfully, but these errors were encountered: