Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Rustwasmc install binaryen-version_90-x86_64-linux.tar.gz failure! #17

Closed
xlcbingo1999 opened this issue Oct 26, 2021 · 6 comments
Closed

Comments

@xlcbingo1999
Copy link

This issue is similar to this issue in wasm-pack: rustwasm/wasm-pack#864
I'm confused of this download failure, how can I fix it?

[INFO]: Checking for the Wasm target...
[INFO]: Compiling to Wasm...
    Finished release [optimized] target(s) in 0.03s
:-) [WARN]: origin crate has no README
[INFO]: Installing wasm-bindgen...
[INFO]: Installing wasm-opt...
Error: failed to download from https://github.com/WebAssembly/binaryen/releases/download/version_90/binaryen-version_90-x86_64-linux.tar.gz
To disable `wasm-opt`, add `wasm-opt = false` to your package metadata in your `Cargo.toml`.

My cargo.toml is:

[package]
name = "rust_mobilenet_food"
version = "0.1.0"
authors = ["ubuntu"]
edition = "2018"

[lib]
name = "rust_mobilenet_food_lib"
path = "src/lib.rs"
crate-type = ["cdylib"]

[dependencies]
wasm-bindgen = "=0.2.61"
wasmedge_tensorflow_interface = "^0.2.0"
image = { version = "0.23.0", default-features = false, features = ["jpeg", "png", "gif"] }
imageproc = "0.21.0"
serde = { version = "^1.0.59", features = ["derive"] }
serde_json = "^1.0.51"
urlencoding = "1.3.3"

my env:

  • rustc 1.50.0 (cb75ad5db 2021-02-10)
  • cargo 1.50.0 (f04e7fab7 2021-02-04)
  • rustwasmc 0.1.29
@juntao
Copy link
Member

juntao commented Oct 26, 2021

It might be a firewall issue ... Are you trying this in China?

@xlcbingo1999
Copy link
Author

It might be a firewall issue ... Are you trying this in China?

Yes! I tried it in China.
But I have tried to use github host and system proxy, it is possible to download files from ‘GitHub.com’ quickly.
Everything was OK when I used wget and curl to download file in ‘ https://github.com/WebAssembly/binaryen/releases/download/version_90/binaryen-version_90-x86_64-linux.tar.gz’.
I don’t know where this file will be used by Rustwasmc.

@DarumaDocker
Copy link
Member

Rustwasmc will use wasm-opt in this file to slim the wasm file. You know, in China, it is not stable to access github, so maybe you can try several times. And if your proxy protocol is SOCKS, maybe you can try using HTTP instead.

@xlcbingo1999
Copy link
Author

Rustwasmc will use wasm-opt in this file to slim the wasm file. You know, in China, it is not stable to access github, so maybe you can try several times. And if your proxy protocol is SOCKS, maybe you can try using HTTP instead.

It's very strange.
I have changed my proxy to http;
But it seemed no change when I typed rustwasmc -v --log-level=info build
I got this log still:

[INFO]: Checking for the Wasm target...
[INFO]: Compiling to Wasm...
    Finished release [optimized] target(s) in 0.03s
:-) [WARN]: origin crate has no README
[INFO]: Installing wasm-bindgen...
[INFO]: Installing wasm-opt...
Error: failed to download from https://github.com/WebAssembly/binaryen/releases/download/version_90/binaryen-version_90-x86_64-linux.tar.gz
To disable `wasm-opt`, add `wasm-opt = false` to your package metadata in your `Cargo.toml`.

@DarumaDocker
Copy link
Member

Try to change your ISP or connect to the 4G hotspot?

@xlcbingo1999
Copy link
Author

Try to change your ISP or connect to the 4G hotspot?

@wangshishuo Thanks for your help. I found it's my Internet problem. I tried for ten times, and succeeded in the last chance.

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

No branches or pull requests

3 participants