-
Notifications
You must be signed in to change notification settings - Fork 79
Build fails on Windows 10 #11
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
Comments
Thanks for the report! I think this happened because the build script couldn't find What does your installation of VS look like? e.g. is it relatively standard? If so, what version are you using? |
I'll check this with another Windows 10 machine. The case here was a build service running as system account as can be seen from the path C:\Windows\system32\config\systemprofile.cargo Don't know if it makes difference. Should have normal VS2015 installation as the machine is used for other C++ builds as well. |
Ah ok. In that case it's probably a failure of this logic to find the Unfortunately though I'm not sure exactly why this would be happening... |
It looks about the same when running as normal user in Win10: r>cargo build --- stderr |
Could you try checking out gcc-rs and poking around |
No luck either with GCC 5.3 from MinGW project and rust-1.12.1-x86_64-pc-windows-gnu Edit: Now I see what you meant :) Tested again that rust-1.12.1-i686-pc-windows-msvc works fine and rust-1.12.1-x86_64-pc-windows-msvc fails on Windows 10. If I run "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall" and then cargo build again I get a different error: r>cargo run |
Oh that error looks like the wrong vcvarsall script was run perhaps? You may have to run the one in either the x64 or amd64 directory, I forget what it's called... |
I'm having this issue as well when trying to compile RLS on Windows 10:
|
And compiling in MINGW gives a completely different error altogether!
|
I am also seeing this error compiling RLS on Windows 10. EDIT3: The issue for me was that it could not find After installing make, Cygwin, MinGW... then uninstalling all those and installing MSYS2 as documented here this is no longer an issue for me... though I have hit this one next: alexcrichton/curl-rust#92 (comment) |
@cramertj as you found your original problem was not being able to find Something like that should reproduce on AppVeyor, if at all, I would have though. (or for me locally). I'll take a look. |
@alexcrichton Yea, I realized I only had Edit: posted this before I saw your second message. I'm checking. |
@hoqhuuep did you install Rust through rustup or the official installers? |
I'll check! |
@alexcrichton That fixed it. Thanks! |
@alexcrichton Through rustup. Here are my versions.
I tried removing the executables from this directory but it did not make a difference:
This was my attempt at "just delete the bundled linker that comes with Rust". |
@hoqhuuep hm yes so the resolution (if you're getting the same error as this issue) is to remove the bundled linker, which you've found the right location for. Did the build not succeed after that was removed though? If not, could you gist the full error you're seeing? |
Absolutely, thanks a lot for taking a look! That gist also includes versions, path, etc. at the start. EDIT: I notice it's still trying to use the C RunTime (?) from the rust directory, is this expected?
I tried removing this too, but then it just errors because it cannot find this file. |
@hoqhuuep I think there's a bunch of vendored libraries that come with the rust-mingw component as well, could you try deleting them as well? |
Huzzah! After much trial and error I now have the RLS extension working in VSCode 😃 Thanks so much for your pointers! For anyone else having the same issue, here's what finally worked for me:
This feels pretty clunky, especially the dynamic linking part... But fortunately none of this should be a problem when they start distributing RLS as a binary from Beta. |
@hoqhuuep what dll dependencies did you find were there? I know that the ones in |
@alexcrichton it will not run without these 3 DLLs from /mingw64/bin
|
@hoqhuuep ah yeah that makes sense, those are all required by LLVM (in the compiler) which the rls links to. Sounds like the issues here have been solved though! So I'm going to close tis. |
Have this issue on my machine as well. MSVC toolchain:
GNU toolchain:
cargo 1.28.0-nightly (e2348c2db 2018-06-07) I do believe that it's |
@Pzixel are you running from the VS tools prompt? If that's the case you'll want to make sure you're using the 64-bit prompt, not the x86 one |
@alexcrichton yep, x64 promt did the trick. thank you. However, do you plan to make it run on GNU toolchain somewhere in a lifetime? :) I actually doesn't run msvc toolchain because gdb is not compatible with it, I only installed the whole toolchain just to make |
@Pzixel oh this crate should already be compatible with the GNU toolchain! We use it extensively in rustc which works with the GNU toolchain |
Well, as I have shown before it doesn't work well (see I'm building |
@Pzixel yeah something is going wrong there, it looks like |
@alexcrichton I'm using git bash for such a purpose, so I'm pretty sure I do :) 3221225781 = 0xc0000135 = STATUS_DLL_NOT_FOUND. I'm not sure what DLL it talks about. |
Alas :( That still looks like isn't not an issue with this crate though but rather one with your environment. You may want to try executing |
Just since this is somehow the top result on Google for "STATUS_DLL_NOT_FOUND cargo build". How to trace and solve any random occurence: Download SysInternals procexp64.exe (or just every tool). After startup immediately hit the looking glass 'Stop capture' button (Ctrl+E). And 'Clear' (Ctrl+X). Set filters for:
Start capture again (Ctrl+E). Run For me that was VCRUNTIM140.dll, so I installed the VC++ 2015 redistributable. |
I'm trying to compile rust-curl as part of my binary on a build machine which runs Windows 10. The build fails with following error logs. Any tips to get it working? Rust version 1.12 MSVC 64 bit.
[08:45:38][Step 1/1] error: failed to run custom build command for libz-sys v1.0.6
[08:45:38][Step 1/1] process didn't exit successfully: C:\BuildAgent-01\work\dac4b43613e8c67e\target\release\build\libz-sys-abc54d15a9de5c22\build-script-build (exit code: 101)
[08:45:38][Step 1/1] --- stdout
[08:45:38][Step 1/1] running: "nmake.exe" "/nologo" "/f" "C:\Windows\system32\config\systemprofile.cargo\registry\src\github.1485827954.workers.dev-1ecc6299db9ec823\libz-sys-1.0.6\src/zlib-1.2.8\win32/Makefile.msc" "zlib.lib"
[08:45:38][Step 1/1]
[08:45:38][Step 1/1] --- stderr
[08:45:38][Step 1/1] thread 'main' panicked at 'failed to run: The system cannot find the file specified. (os error 2)', C:\Windows\system32\config\systemprofile.cargo\registry\src\github.1485827954.workers.dev-1ecc6299db9ec823\libz-sys-1.0.6\build.rs:130
[08:45:38][Step 1/1] stack backtrace:
[08:45:38][Step 1/1] 0: 0x7ff7e81e290e - _<std..rand..ThreadRng as rand..Rng>::next_u64::h75a21f4cede609ad
[08:45:38][Step 1/1] 1: 0x7ff7e81e0de3 - std::rt::lang_start::h53bf99b0829cc03c
[08:45:38][Step 1/1] 2: 0x7ff7e81e17ed - std::panicking::rust_panic_with_hook::h4cbd7ca63ce1aee9
[08:45:38][Step 1/1] 3: 0x7ff7e81e1636 - std::panicking::begin_panic_fmt::hd0daa02942245d81
[08:45:38][Step 1/1] 4: 0x7ff7e81e1594 - std::panicking::begin_panic_fmt::hd0daa02942245d81
[08:45:38][Step 1/1] 5: 0x7ff7e81a9014 - __ImageBase
[08:45:38][Step 1/1] 6: 0x7ff7e81a3806 - __ImageBase
[08:45:38][Step 1/1] 7: 0x7ff7e81e4ad1 - _rust_maybe_catch_panic
[08:45:38][Step 1/1] 8: 0x7ff7e81e068a - std::rt::lang_start::h53bf99b0829cc03c
[08:45:38][Step 1/1] 9: 0x7ff7e81e9fb8 - __scrt_common_main_seh
[08:45:38][Step 1/1] at f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253
[08:45:38][Step 1/1] 10: 0x7fff33418101 - BaseThreadInitThunk
[08:45:38][Step 1/1]
[08:45:38][Step 1/1] Process exited with code 101
The text was updated successfully, but these errors were encountered: