-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Rust on Windows Vista (crash with SetThreadErrorMode) #35471
Comments
The compiler itself requires at least Window 7 (Windows Server 2008 R2) to run. Programs compiled with Rust may run with Windows all the way back to XP, but some features exposed by the standard library (most notably locking) will not work. |
@nagisa is it possible to to use software emulation for missing features on development machines? It will help to save the day. Also, can Rust detect and warn when such feature would be missing on target platform and compiled program won't run? |
Sure, there's an issue about this: #26654 |
It would certainly be possible to switch out our use of SetThreadErrorMode with SetErrorMode, but I’m pretty sure there’s more cases like this, many of which are not as trivially solved.
Everything is possible, but not necessarily feasible. At the moment targetting Windows does not differentiate between you targetting Windows XP and Windows 10. Compiled code is the same. A number of user facing changes would be necessary to implement something like that and we’ve very consciously claimed only Tier 3 support for libstd only on XP. |
@nagisa Choosing which version of Windows you want to target could actually be done by telling winapi which version you want, and then it informs downstream dependencies of that choice rust-lang/cargo#2980. Of course it doesn't work too well for std at the moment but in a future where something like rust-lang/rfcs#1133 has been implemented it could even cover that. |
Is there any attempt to collect and document those issues for learning and making consensus? |
The problem here is that it's LLVM that requires at least Windows 7 to run, rather than the Rust compiler itself. Note that this only applies to rustc: most Rust programs will run fine on Windows XP and above (barring some issues with locking, which is a separate issue). |
So is there an issue in LLVM that can be referenced from here? |
Not that I know of. Dropping support for older versions of Windows was an explicit decision from the LLVM developers. See http://llvm.org/releases/3.8.1/docs/ReleaseNotes.html. |
I don't believe there's anything we can do about this, but I may be wrong. Perhaps @retep998 could comment? I feel like we should close this... |
If LLVM has decided to not support running on Windows Vista, then there is nothing we can do here. If rustc ever supports an alternate backend that does support Windows Vista, then this can be reconsidered then. |
rust-1.10.0-i686-pc-windows-gnu.msi
contains compiler that doesn't run on Vista - crashes with missingSetThreadErrorMode
inKERNEL32.dll
. I thought that I can use Rust as a platform independent C replacement, but it seems not possible. Maybe there are binaries without those Windows 10 specific optimizations that I missed?The text was updated successfully, but these errors were encountered: