-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 10 SDK detection broken with new SDK #30229
Comments
Fixes rust-lang#30229 Signed-off-by: Peter Atashian <retep998@gmail.com>
Alas, because this isn't a regression, even when my PR does land, this issue will continue to plague people until it proliferates into stable. |
…alexcrichton What I've done here is try to make the code match what vcvars does much more closely. It now chooses which SDK to find based on the version of MSVC that it found. It also bases the decision of whether to find all the things on whether `VCINSTALLDIR` has been set, which is more likely to have only been set by an invocation of vcvars, unlike previously where it would do some things only if `LIB` wasn't set even though there was a valid use case for libraries to add themselves to `LIB` without having invoked vcvars. There are still some debug `println!`s so people can test the PR and make sure it works correctly on various setups. It supports VS 2015, 2013, and 2012. People who want to use versions of VS older (or newer) than that will have to manually invoke the appropriate vcvars bat file to set the proper environment variables themselves. Do not merge yet. Fixes #30229
Can this be back ported to beta pls? ping @alexcrichton |
Fixes rust-lang#30229 Signed-off-by: Peter Atashian <retep998@gmail.com>
I ran into this today with someone, but the file was |
@steveklabnik In general when someone gets an error where the linker can't find a system library (rather than being unable to find the linker), this is typically because they have an incomplete Windows SDK. To debug this, you'd need to know which paths the linker is searching in (via the |
Thanks! In the end, my student uninstalled and reinstalled both the Windows stuff and Rust stuff, and it magically worked, so I bet that was it. |
The new Windows 10 SDK changed some registry values slightly which broke the current Windows 10 SDK detection code.
This results in the linker error
note: LINK : fatal error LNK1181: cannot open input file 'ws2_32.lib'
I am working on a PR to
fix thiscompletely overhaul the code for the better.In the meantime you can work around this issue by manually invoking vcvars as done here.
The text was updated successfully, but these errors were encountered: