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

rust-crypto doesn't build on x86_64-pc-windows-msvc #324

Closed
briansmith opened this issue Oct 26, 2015 · 4 comments · Fixed by #326
Closed

rust-crypto doesn't build on x86_64-pc-windows-msvc #324

briansmith opened this issue Oct 26, 2015 · 4 comments · Fixed by #326

Comments

@briansmith
Copy link

When building crypto-bench for target x86_64-pc-windows-msvc, the build fails when building rust-crypto:

failed to run custom build command for `rust-crypto v0.2.33`
...
running: "C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\bin\\amd64\
\cl.exe" "/nologo" "/MD" "/O2" "/Fo:C:\\Users\\John\\Documents\\p\\crypto-bench\
\target\\release\\build\\rust-crypto-df42b86e93745fe2\\out\\src\\util_helpers.o"
 "/c" "src/util_helpers.c"
util_helpers.c
src/util_helpers.c(100) : error C2143: syntax error : missing ')' before ':'
ExitStatus(ExitStatus(2))
@DaGenix
Copy link
Owner

DaGenix commented Oct 28, 2015

Thanks for the PR. The issue is that MSVC support inline assembly differently than GCC - and on x86_64, that means not at all. #326 should fix this by implementing the assembly in a way that it can be compiled by MSVC's toolchain. The AES-NI optimized AES implementation won't work (since I didn't port that code), but everything else should (except on 32-bit MSVC since Rust doesn't support unwinding there yet).

@DaGenix
Copy link
Owner

DaGenix commented Oct 29, 2015

Ok, this problem should be fixed with v0.2.34. Please let me know if you're still seeing it.

Thanks!

@briansmith
Copy link
Author

Ok, this problem should be fixed with v0.2.34. Please let me know if you're still seeing it.

Thanks! I verified that the latest version of rust-crypto builds for -msvc. Also, FYI, the rust-crypto SHA-1/SHA-2 code is faster than the OpenSSL C code (not the assembly language code) on -msvc. Pretty cool!

@applejohnny
Copy link

I have similar problem :(

cargo build
   Compiling rust-crypto v0.2.34
failed to run custom build command for `rust-crypto v0.2.34`
Process didn't exit successfully: `C:\...\target\debug\build\rust-crypto-feefa0fa34543a2b\build-script-build` (exit code: 101)
--- stdout
TARGET = Some("x86_64-pc-windows-gnu")
OPT_LEVEL = Some("0")
PROFILE = Some("debug")
TARGET = Some("x86_64-pc-windows-gnu")
debug=true opt-level=0
HOST = Some("x86_64-pc-windows-gnu")
TARGET = Some("x86_64-pc-windows-gnu")
TARGET = Some("x86_64-pc-windows-gnu")
HOST = Some("x86_64-pc-windows-gnu")
CC_x86_64-pc-windows-gnu = None
CC_x86_64_pc_windows_gnu = None
HOST_CC = None
CC = None
TARGET = Some("x86_64-pc-windows-gnu")
HOST = Some("x86_64-pc-windows-gnu")
CFLAGS_x86_64-pc-windows-gnu = None
CFLAGS_x86_64_pc_windows_gnu = None
HOST_CFLAGS = None
CFLAGS = None
running: "gcc.exe" "-O0" "-ffunction-sections" "-fdata-sections" "-g" "-m64" "-o" "C:\\...\\target\\debug\\build\\rust-crypto-feefa0fa34543a2b\\out\\src\\util_helpers.o" "-c" "src/util_helpers.c"
ExitStatus(ExitStatus(1))
command did not execute successfully, got: exit code: 1

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

Successfully merging a pull request may close this issue.

3 participants