-
Notifications
You must be signed in to change notification settings - Fork 51
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
Invalid numeric argument '/Wextra' with MSVC, how to build with Clang? #571
Comments
Hm, setting the
Fixing that temporarily causes
and then I got this by appending
|
Hello -- sorry for the delayed response. Building for Windows x86-64 using clang (or clang-cl) is not something that we've done much testing for. This might require changes upstream in AWS-LC before this build setup would work for aws-lc-sys. Thanks for letting us know about this. We'll keep this issue open until we've had a chance to investigate the issue. (Hopefully, soon!) |
Looking quickly at this error -- I think this is due to an assumption that
We might need to change the preprocessor condition so it picks up this alternative: https://github.com/aws/aws-lc/blob/925f64262365f4e7f2169e265d1de1423329fe2a/crypto/rand_extra/windows.c#L36-L56 |
Somewhat related, it looks like compilation could be failing on my Windows machine due to a space in the path. i.e. the path to cargo is "C:\Users\User Name\.cargo\registry..." where the build script is apparently trying to access "/Name/.cargo/registry/..." |
Thanks for mentioning this. This should be tested. There are also problems when the path name generated by cargo gets too long. I found a meta-issue relating to Cargo's handling of Windows paths here: rust-lang/cargo#9770 |
I could be wrong but I think the issue is with the I did confirm this is an issue on my machine. If I change users so that the home directory has a path of "C:\Users\Username\.cargo.." (instead of "C:\Users\User Name\.cargo..") that this crate will build properly. I also tried setting the environment variables to "%USERPROFILE%\.cargo" and "C:\Users\UserNa~1\.cargo" to workaround the apparent space problem, but it looks like both workarounds end up getting expanded to "C:\Users\User Name\.cargo" at some point and the built script fails anyway |
This PR appears to address one of the issues reported above: aws/aws-lc#1972 |
Hello @leontoeides -- The problem related to build failing when the path contains spaces should now be resolved with the release of aws-lc-rs v1.11.1. Please let us know if you continue to have problems with this after upgrading. |
Hello @theoparis -- the compiler error related to |
Problem:
I am trying to build facebook's buck2 project with updated dependencies with Clang on Windows, and aws-lc-sys seems to be trying to use msvc cl.exe instead of clang.exe which causes errors.
While it would be great if this msvc issue can be fixed, is there any way to force aws-lc-sys to use
clang.exe
orclang-cl.exe
directly from LLVM instead of msvc cl.exe?Relevant details
AWS-LC for Rust versions or commit: 92ffba9c29a34b22
System information: for linux, below info can be collected by running
uname -srvmp
Build log:
The text was updated successfully, but these errors were encountered: