Building on MinGW32 fails
error: failed to run custom build command for `rust-crypto v0.2.36`
Process didn't exit successfully: `C:\Users\kaoD\rustocin\target\debug\build\rust-crypto-0caf103d2b9a229d\build-script-build` (exit code: 101)
--- stdout
TARGET = Some("i686-pc-windows-gnu")
OPT_LEVEL = Some("0")
PROFILE = Some("debug")
TARGET = Some("i686-pc-windows-gnu")
debug=true opt-level=0
TARGET = Some("i686-pc-windows-gnu")
HOST = Some("i686-pc-windows-gnu")
CFLAGS_i686-pc-windows-gnu = None
CFLAGS_i686_pc_windows_gnu = None
HOST_CFLAGS = None
CFLAGS = None
running: "cc" "-O0" "-ffunction-sections" "-fdata-sections" "-g" "-m32" "-o" "C:\\Users\\kaoD\\rustocin\\target\\debug\\build\\rust-crypto-0caf103d2b9a229d\\out\\src\\util_helpers.o" "-c" "src/util_helpers.c"
failed to execute command: El sistema no puede encontrar el archivo especificado. (os error 2)
Is `cc` not installed? (see https://github.com/alexcrichton/gcc-rs#compile-time-requirements for help)
According to the link in the error message gcc-rs should be using gcc under my system. This hardcoded "cc" in build.rs seems to be the problem.
Setting envvar CC=gcc fixes it, but AFAICT it probably should use the default gcc-rs strategy for that else branch.
This is not so much a bug as a missing dependency. I was experiencing the same problem but a little searching around the web pointed me towards installing this:
http://win-builds.org/doku.php/download_and_installation_from_windows
Also ensure the 'bin' directory residing within the installation path is present in your PATH - as usual - and away you go. You'll find 'cc.exe' within the bin directory.
I'm suffering from this error too.Thanks for the tip:"Setting envvar CC=gcc fixes it."@alvaro-cuesta.
I think gcc should be use as default also.
How do I set the envvar CC=gcc under Windows 7/8.1/10???
http://www.computerhope.com/issues/ch000549.htm @Trodis
Yep, just hit this problem myself on Windows 10. I'll set the env var for now, is there a proper fix coming for this?
Setting envvar 'CC=gcc' fixes it,
@alvaro-cuesta What does it means? How can I do it too?
I ran across this problem in appveyor, where CC doesn't seem to be available with TARGET=x86_64-pc-windows-gnu. I found the solution in the appveyor.yml of this project:
environment:
matrix:
- TARGET: nightly-x86_64-pc-windows-msvc
- TARGET: nightly-x86_64-pc-windows-gnu
MSYS_BITS: 64
[...]
install:
[...]
- if defined MSYS_BITS set PATH=C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin;%PATH%
In thise file, every mingw build has MSYS_BITS defined which adds the mingw bin folder to the PATH prior to starting the build. This fixes the mingw build without breaking the -msvc builds.
how do you set cc=gcc ? what does it mean. I have installed migwin. nothing resolved after.

@steelx https://rustsec.org/advisories/RUSTSEC-2016-0005.html
@steelx https://rustsec.org/advisories/RUSTSEC-2016-0005.html
I'm using openssl. And internally it uses this it seems
No, OpenSSL does not use rust-crypto, neither the other way around. If you have issues with OpenSSL bindings try asking in respective repositories, e.g. in https://github.com/sfackler/rust-openssl.