Closed
Description
After using the 0.6 installer (with add to PATH checked), and MinGW (with GCC 4.7.2) on Windows 8, attempting to launch rustc
or rustc.exe
results with the message boxed error:
The application was unable to start correctly (0xc0000142). Click OK to close the application.
Running under ollydbg, it seems to segfault when doing some stuff with libstdc++. Rust 0.5 worked fine.
Activity
nettok commentedon Apr 4, 2013
I am having the same problem using the latest mingw (gcc 4.7.2). Here is the segmentation fault.
bstrie commentedon May 10, 2013
Nominating this for 0.7.
bstrie commentedon May 10, 2013
Also, I'm not certain off the top of my head if that's the correct version of MinGW that Rust needs. However, even if it's not, the installer needs to detect this and abort rather than complete the install.
mschorsch commentedon May 13, 2013
You have to downgrade your "libstdc++-6.dll".
graydon commentedon May 16, 2013
accepted for production-ready milestone
pnkfelix commentedon Jul 25, 2013
Visiting for triage from 2013-07-22 email.
One can readily reproduce this (and toggle between working/non-working) by running
mingw-get upgrade "libstdc++>=4.7"
in a MinGW window. (I do not personally know where things will fail if you upgrade your gcc to 4.7 or beyond; upgrading it did not immediately fail for me, but I did not test it thoroughly.)(It is also not too hard to have two distinct installation of MinGW, and then toggle between then by modifying your
PATH
accordingly so that the dll lookup proceeds in whichever MinGW installation you wish to test. For example, I am playing with a wrapper.bat
file that is just the followingwhich opens a command window with the
PATH
set to look up the corresponding dll's.)I do not yet know if we should/must fail the installation outright if the user has not yet installed the appropriate
libstdc++-6.dll
variant. It might be better if we can detect the situation fromrust.exe
and instruct the user as to how to fix the problem at runtime, especially since someone might inadvertently upgrade their MinGW libraries after having installed Rust, and at that point an install-time check will be of no use.darkf commentedon Jul 25, 2013
Why is there a requirement for the old libstdc++? Is it an ABI thing that can be fixed in rustc/rustrt or is there a deeper issue? Why do later versions work on Linux? Could we have an option to statically link libstdc++? (GCC provides this with
-static-libstdc++
)sanyer commentedon Sep 7, 2013
Only after deleting the libstdc++ (mingw-get remove libstdc++) and installing libstdc++ for gcc 4.5 (mingw-get install "libstdc++<4.6") rustc was finally able to start.
And also I appended "c:\mingw\bin" to PATH environment variable.
auto merge of #9662 : vadimcn/rust/package-runtime-deps, r=brson
Rollup merge of rust-lang#5712 - ijijn:master, r=flip1995
Auto merge of rust-lang#5741 - flip1995:rollup-8chbwhy, r=flip1995