Skip to content

Unable to run Rust in cmd.exe or Powershell on Windows 7 64-bit #7500

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

Closed
vky opened this issue Jun 30, 2013 · 5 comments
Closed

Unable to run Rust in cmd.exe or Powershell on Windows 7 64-bit #7500

vky opened this issue Jun 30, 2013 · 5 comments
Labels
O-windows Operating system: Windows

Comments

@vky
Copy link

vky commented Jun 30, 2013

The error that comes up in cmd.exe is '...pthreadGC2.dll is missing...', PowerShell doesn't show any errors. After copying the pthreadGC2.dll[1] into the installation directory[2], things were working properly in PowerShell and cmd.exe.

[0] http://www.sourceware.org/pthreads-win32/ - pthread lib home page
[1] ftp://sourceware.org/pub/pthreads-win32/dll-latest/dll/x86/pthreadGC2.dll
[2] C:\MinGW\msys\1.0\local\bin

Edit: This was after compiling from source, the revision at the time was df39932.

@vky
Copy link
Author

vky commented Jun 30, 2013

A side issue, I attempted to compile the hello example (in PowerShell) from the tutorial while having Strawberry Perl installed, and that caused things to blow up. There were no issues compiling the same file (in PowerShell) after uninstalling Strawberry Perl though.

Here's the top few lines of the error that was thrown:

error: linking with `gcc` failed with code 1
note: gcc arguments: -LC:\MinGW\msys\1.0\local\bin\rustc\i686-pc-mingw32\bin -m32 -o hello~ hello~.o -LC:\MinGW\msys\1.0\local\bin\rustc\i686-pc-mingw32\bin -lstd-6c65cf4b443341b1-0.7-pre -lstack -lrustrt
note: c:/code/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/code/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6
./../../../x86_64-w64-mingw32/lib/libmingw32.a when searching for -lmingw32
c:/code/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/code/strawberry/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../
./../x86_64-w64-mingw32/lib\libmingw32.a when searching for -lmingw32

@thestinger
Copy link
Contributor

Visiting for triage.

@sanxiyn
Copy link
Member

sanxiyn commented Dec 16, 2013

Triage. Tagging @vadimcn. Had #9662 fixed this?

@vadimcn
Copy link
Contributor

vadimcn commented Dec 16, 2013

#9662 fixes this for stage0 and for installer distribution.

If the expectation is to run stage2\bin\rustc.exe without having dependency dlls on somewhere on the PATH, the answer is "no".

@alexcrichton
Copy link
Member

This is no longer an issue. The nightly installers work in cmd.exe as-is.

I imagine that this was fixed over time with various patches to remove the libpthread dependencies as well as the migration to mingw-w64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-windows Operating system: Windows
Projects
None yet
Development

No branches or pull requests

5 participants