bytecodealliance/cargo-wasi

Can't build rusty v8 - Failed to use `curl`

Ethan-Arrowood opened this issue · 1 comments

Hello, I'm fairly new to the WASI ecosystem, and am trying to use cargo-wasi to build and run an application that uses rusty v8 it fails with this output:

❯ cargo wasi build
   Compiling v8 v0.60.0
error: failed to run custom build command for `v8 v0.60.0`

Caused by:
  process didn't exit successfully: `/Users/ethanarrowood/Documents/Programming/github/ethan-arrowood/blegh/target/debug/build/v8-f3fd52c561ba89f3/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=.gn
  cargo:rerun-if-changed=BUILD.gn
  cargo:rerun-if-changed=src/binding.cc
  cargo:rerun-if-env-changed=CCACHE
  cargo:rerun-if-env-changed=CLANG_BASE_PATH
  cargo:rerun-if-env-changed=DENO_TRYBUILD
  cargo:rerun-if-env-changed=DOCS_RS
  cargo:rerun-if-env-changed=GN
  cargo:rerun-if-env-changed=GN_ARGS
  cargo:rerun-if-env-changed=HOST
  cargo:rerun-if-env-changed=NINJA
  cargo:rerun-if-env-changed=OUT_DIR
  cargo:rerun-if-env-changed=RUSTY_V8_ARCHIVE
  cargo:rerun-if-env-changed=RUSTY_V8_MIRROR
  cargo:rerun-if-env-changed=SCCACHE
  cargo:rerun-if-env-changed=V8_FORCE_DEBUG
  cargo:rerun-if-env-changed=V8_FROM_SOURCE
  cargo:rustc-link-lib=static=rusty_v8
  download lockfile: "/Users/ethanarrowood/Documents/Programming/github/ethan-arrowood/blegh/target/wasm32-wasi/debug/build/lib_download.fslock"
  static lib URL: https://github.com/denoland/rusty_v8/releases/download/v0.60.0/librusty_v8_release_wasm32-wasi.a
  cargo:rustc-link-search=/Users/ethanarrowood/Documents/Programming/github/ethan-arrowood/blegh/target/wasm32-wasi/debug/gn_out/obj
  Downloading https://github.com/denoland/rusty_v8/releases/download/v0.60.0/librusty_v8_release_wasm32-wasi.a
  Python downloader failed, trying with curl.

  --- stderr
  thread 'main' panicked at 'assertion failed: status.success()', /Users/ethanarrowood/.cargo/registry/src/github.com-1ecc6299db9ec823/v8-0.60.0/build.rs:411:3
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I looked into it and the error is cause from this part of the libraries build script: https://github.com/denoland/rusty_v8/blob/b7cfc588fd598440c9681cb20dbe923aa355421c/build.rs#L392-L411

This build script has no issue when run with cargo build. Is curl disabled or unavailable from cargo wasi build?

Ahh nevermind - this is not a curl issue. The url it is trying to download is not available. So something is up with the rusty v8 build script.