Skip to content
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

cargo build on Windows doesn't work out of the box #12

Closed
retep998 opened this issue Sep 2, 2015 · 8 comments
Closed

cargo build on Windows doesn't work out of the box #12

retep998 opened this issue Sep 2, 2015 · 8 comments

Comments

@retep998
Copy link

retep998 commented Sep 2, 2015

C:\msys64\home\Peter\ring> cargo build
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling ring v0.1.0 (file:///C:/msys64/home/Peter/ring)
   Compiling rustc-serialize v0.3.16
   Compiling libc v0.1.10
Build failed, waiting for other jobs to finish...
failed to run custom build command for `ring v0.1.0 (file:///C:/msys64/home/Peter/ring)`
Process didn't exit successfully: `C:\msys64\home\Peter\ring\target\debug\build\ring-761370bdb05fc17f\build-script-build` (exit code: 101)
--- stdout
APPDATA: C:\Users\Peter\AppData\Roaming
PROMPT: $P$G
HOMEPATH: \Users\Peter
OPT_LEVEL: 0
COMMONPROGRAMW6432: C:\Program Files\Common Files
VS120COMNTOOLS: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\
COMPUTERNAME: WIN81-SSD
PROCESSOR_IDENTIFIER: AMD64 Family 21 Model 19 Stepping 1, AuthenticAMD
PROGRAMW6432: C:\Program Files
: C:=C:\msys64\home\Peter
OUT_DIR: C:\msys64\home\Peter\ring\target\debug\build\ring-761370bdb05fc17f\out
PROCESSOR_LEVEL: 21
LOCALAPPDATA: C:\Users\Peter\AppData\Local
TARGET: x86_64-pc-windows-msvc
PROCESSOR_REVISION: 1301
USERDOMAIN_ROAMINGPROFILE: WIN81-SSD
CARGO_PKG_VERSION_MINOR: 1
COMMONPROGRAMFILES(X86): C:\Program Files (x86)\Common Files
HOMEDRIVE: C:
PSMODULEPATH: C:\Users\Peter\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules\
PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL
PROGRAMDATA: C:\ProgramData
VS110COMNTOOLS: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools\
CARGO_PKG_VERSION_PATCH: 0
WINDIR: C:\WINDOWS
FPS_BROWSER_USER_PROFILE_STRING: Default
PROGRAMFILES(X86): C:\Program Files (x86)
NUM_JOBS: 4
SESSIONNAME: Console
VBOX_MSI_INSTALL_PATH: C:\Program Files\Oracle\Virtualbox\
HOST: x86_64-pc-windows-msvc
PUBLIC: C:\Users\Public
PATH: C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\AMD\ATI.ACE\Core-Static;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files (x86)\nodejs\;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\Skype\Phone\;;C:\Users\Peter\AppData\Local\Code\bin;C:\Users\Peter\AppData\Roaming\npm;C:\rust64-msvc\bin;C:\Program Files (x86)\CMake\bin;C:\Program Files (x86)\Git\bin;C:\msys64\home\Peter\ring\target\debug\deps
SYSTEMDRIVE: C:
USERPROFILE: C:\Users\Peter
CARGO_PKG_VERSION_PRE:
VS140COMNTOOLS: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
FPS_BROWSER_APP_PROFILE_STRING: Internet Explorer
NUMBER_OF_PROCESSORS: 4
TEMP: C:\Users\Peter\AppData\Local\Temp
SSH_AGENT_PID: 748
HOME: C:\Users\Peter
CARGO_PKG_VERSION_MAJOR: 0
DXSDK_DIR: C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\
VSSDK140INSTALL: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VSSDK\
USERNAME: Peter
SSH_AUTH_SOCK: /tmp/ssh-l2ycI5SLhjmF/agent.3796
CARGO_PKG_VERSION: 0.1.0
COMMONPROGRAMFILES: C:\Program Files\Common Files
OS: Windows_NT
PROCESSOR_ARCHITECTURE: AMD64
DEBUG: true
USERDOMAIN: WIN81-SSD
PROFILE: debug
CARGO_MANIFEST_DIR: C:\msys64\home\Peter\ring
SYSTEMROOT: C:\WINDOWS
COMSPEC: C:\WINDOWS\system32\cmd.exe
LOGONSERVER: \\MicrosoftAccount
ALLUSERSPROFILE: C:\ProgramData
FP_NO_HOST_CHECK: NO
PROGRAMFILES: C:\Program Files
TMP: C:\Users\Peter\AppData\Local\Temp

--- stderr
thread '<main>' panicked at 'failed to execute msbuild: The system cannot find the file specified. (os error 2)', build.rs:87

I have VS 2015 installed, so it would be nice if ring could find where msbuild is.

@briansmith
Copy link
Owner

I think this is due to a known problem with Cargo: rust-lang/cargo#1889.

If you run in the "VS2015 x64 Native Tools Command Prompt" or the "VS2015 x85 Native Tools Command Prompt" or use vcvarsall.bat to set up the environment before building ring, it should work. Could you please try that and report back?

IMO, the best place to fix this issue is within Cargo. I will ask Alex about it.

@retep998
Copy link
Author

retep998 commented Sep 2, 2015

Yep, works fine if I use one of the vcvars bat files.

@briansmith
Copy link
Owner

Thanks. I will update the build documentation to indicate that, at least for now, that is required. Also, I'm going to keep working with the Cargo people to find an automatic solution.

@briansmith
Copy link
Owner

@briansmith
Copy link
Owner

I think recent improvements in Cargo have made this work for cases where you're not cross-compiling. Could you please retest? Thanks!

@briansmith
Copy link
Owner

Closing this. I've been building with cargo build/test without having to start a MSVC command prompt for a while now, thanks to improvements in cargo. There's probably more that we can do, but not without more specific input.

@trosel
Copy link

trosel commented Jul 28, 2018

Hey all, what exactly is the fix for this. 2 years later and I think I'm running into the same issue even after rustup update just today...

@briansmith
Copy link
Owner

Hey all, what exactly is the fix for this. 2 years later and I think I'm running into the same issue even after rustup update just today...

It can't be the same issue because ring's build system doesn't use msbuild on anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants