-
Notifications
You must be signed in to change notification settings - Fork 409
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
no prebuilt wasm-opt binaries error #913
Comments
I ran into a completely different issue with wasm-opt as well which was solved by downgrading to 0.8.1. I reckon that will not solve anything for you considering the lack of binaries. Have you tried disabling wasm-opt altogether? |
I think this is a duplicate of #886 |
No, because that bug occurs when wasm-opt is actually running. In my case, the wasm-opt binaries are not found at all. |
Same issue here with a raspberry-pi 4 everything compiles well but wasm-opt fails. |
Same problem on an ARM Mac. |
Same problem occurs on 12.2-STABLE FreeBSD 12.2-STABLE GENERIC amd64 |
exactly the same issue on m1 Mac. Any resolution? |
Running into the same problem: everything but
There are two solutions I think:
|
I also can't |
try add
to your Cargo.toml to disable wasm-opt step. |
That's what the first reply says. But it's not a fix, but a work-around. |
For M1 users, you can manually run Disable automatic wasm-opt in your Cargo.toml:
Install standalone wasm-opt binary:
Run it on your built wasm file, for example:
|
I want to build a wasm in a container without any network access. @willmcpherson2 may be a work-around solution to this (pre-installed it), but hope |
change the |
As an alternative to the above, if you would like the
This allows me to just run Note that you'll also need to follow the instructions above to download or build a working |
yep, same issue here.. starting to regret this M1 Mac purchase |
Which instruction? where can I download and build M1 mac Thanks |
As far as I can tell, the original repo from @bloveless has been made private (or removed). I presume this is because the changes were merged into the Any assistance here is appreciated. |
Just a quick follow up. I tried something. I cannot say if it is "correct", but it did seem to work. Although I should make clear that this installs an unreleased version of
If anybody has any reason to think one of these steps is incorrect, please speak up. I just thought an update was in order since some of the previous instructions seem to be out of date now. Hopefully the next release of Hope that helps. |
Wanted to follow up to @mtiller's instructions with changes I had to make for my M1 Mac running macOS Monterey. After installing homebrew and running
This sets the deployment target as specified in this issue to resolve the linker issues in Monterey. |
I think the bug is caused by the binaryen version_90 doesn't have a macos_aarch prebuild release Tool::WasmOpt => {
Ok(format!(
"https://github.com/WebAssembly/binaryen/releases/download/{vers}/binaryen-{vers}-{target}.tar.gz",
vers = "version_90",
target = target,
))
} and 'os-configuration' in #![allow(missing_docs)]
pub const LINUX: bool = cfg!(target_os = "linux");
pub const MACOS: bool = cfg!(target_os = "macos");
pub const WINDOWS: bool = cfg!(target_os = "windows");
#[allow(non_upper_case_globals)]
pub const x86_64: bool = cfg!(target_arch = "x86_64");
#[allow(non_upper_case_globals)]
pub const x86: bool = cfg!(target_arch = "x86"); It should be solved by a new binaryen osx_aarch64 release |
I just submitted a PR (#1088) to fix this issue for Apple Sillicon. |
You can test @d3lm's change with: cargo install wasm-pack --git https://github.com/d3lm/wasm-pack --rev 713868b204f151acd1989c3f29ff9d3bc944c306 It did the trick for me! |
wasm-opt has a known issue on Apple Silicon: rustwasm/wasm-pack#913 The workaround currently seems to be running wasm-opt locally instead of defining it as part of the Rust package's build pipeline in Cargo.toml. I hope this is okay!
Same issue RPI 4 - Bookworm v12 64 Bit Error: no prebuilt wasm-opt binaries are available for this platform: Unrecognized target! |
Same issue on M3 Mac while running |
🐛 Bug description
I'm running wasm-pack on a raspberry pie 3b (arm v71). and are trying the game of life tutorial. Build 'fails' with an error. (I say 'fails', as I get something that works after all.)
~/rust/wasm-game-of-life $ wasm-pack build [INFO]: Checking for the Wasm target... [INFO]: Compiling to Wasm... Finished release [optimized] target(s) in 0.50s [INFO]: Installing wasm-bindgen... Error: no prebuilt wasm-opt binaries are available for this platform: Unrecognized target! To disable
wasm-opt, add
wasm-opt = falseto your package metadata in your 'Cargo.toml'.
🤔 Expected Behavior
Looking at
wasm-opt.rs
, I would have expected the build to successfully complete, giving the message "Skipping wasm-opt because it is not supported on this platform".It also doesn't seem to look for a local wasm-opt in the path, as described above
pub fn find_wasm_opt
. I downloaded the wasm-opt source, build it locally and added the bin dir it to the path... source doesn't show any signs of looking at the path...👟 Steps to reproduce
Get a raspberry pie, install raspbian OS, install git, rust, wasm, etc
git clone https://github.com/rustwasm/wasm_game_of_life.git
cd wasm_game_of_life/
wasm_pack build
🌍 Your environment
Include the relevant details of your environment.
wasm-pack version: 0.9.1
rustc version: 1.46.0
The text was updated successfully, but these errors were encountered: