kobigurk / phase2-bn254

71 stars 234 forks source link

Requires cc on windows #42

Open Divide-By-0 opened 1 year ago

Divide-By-0 commented 1 year ago

Error on WSL::

error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: could not compile `log` (build script) due to previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `maybe-uninit` (build script) due to previous error
error: could not compile `libc` (build script) due to previous error
error: could not compile `proc-macro2` (build script) due to previous error
error: could not compile `byteorder` (build script) due to previous error
error: could not compile `crossbeam-utils` (build script) due to previous error
error: could not compile `typenum` (build script) due to previous error
error: could not compile `proc-macro-hack` (lib) due to previous error

Error on gitbash on regular windows outside WSL:

error: failed to run custom build command for `rust-crypto v0.2.36`

Caused by:
  process didn't exit successfully: `C:\Users\Aayush\Documents\phase2-bn254\powersoftau\target\release\build\rust-crypto-f98aaebd821c4dc0\build-script-build` (exit code: 101)
  --- stdout
  TARGET = Some("x86_64-pc-windows-gnu")
  OPT_LEVEL = Some("3")
  TARGET = Some("x86_64-pc-windows-gnu")
  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
  DEBUG = Some("false")
  running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-m64" "-Wall" "-Wextra" "-o" "C:\\Users\\Aayush\\Documents\\phase2-bn254\\powersoftau\\target\\release\\build\\rust-crypto-363494e62ea2646e\\out\\src/util_helpers.o" "-c" "src/util_helpers.c"

  --- stderr
  thread 'main' panicked at C:\Users\Aayush\.cargo\registry\src\index.crates.io-6f17d22bba15001f\gcc-0.3.55\src\lib.rs:1672:5:

  Internal error occurred: Failed to find tool. Is `cc` installed? (see https://github.com/alexcrichton/gcc-rs#compile-time-requirements for help)

  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

Which also seems to be caused by cc linker not being found on windows.