Skip to content
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

failed to run custom build command for wasm-opt-sys v0.112.0 #1131

Open
viiccwen opened this issue May 26, 2023 · 1 comment
Open

failed to run custom build command for wasm-opt-sys v0.112.0 #1131

viiccwen opened this issue May 26, 2023 · 1 comment

Comments

@viiccwen
Copy link

viiccwen commented May 26, 2023

System:
windows 10
Visual studio 2022 (Visual studio 2019 has the problem too.)

cargo version:
cargo 1.69.0 (6e9a83356 2023-04-12)

rustup version:
rustc 1.69.0 (84c898d65 2023-04-16)

The version of cargo-contract want to download:
cargo-contract v3.0.1

Problem:
error: failed to run custom build command for wasm-opt-sys v0.112.0
Caused by:
process didn't exit successfully: C:\Users\vic\AppData\Local\Temp\cargo-install7DjSCM\release\build\wasm-opt-sys-831808aa737fad05\build-script-build (exit code: 1)
--- stderr
CXX include path:
C:\Users\vic\AppData\Local\Temp\cargo-install7DjSCM\release\build\wasm-opt-sys-28e8b6d6ae6a1241\out\cxxbridge\include
C:\Users\vic\AppData\Local\Temp\cargo-install7DjSCM\release\build\wasm-opt-sys-28e8b6d6ae6a1241\out\cxxbridge\crate
C:\Users\vic.cargo\registry\src\github.com-1ecc6299db9ec823\wasm-opt-sys-0.112.0\binaryen\src
C:\Users\vic.cargo\registry\src\github.com-1ecc6299db9ec823\wasm-opt-sys-0.112.0\binaryen\src\tools
C:\Users\vic\AppData\Local\Temp\cargo-install7DjSCM\release\build\wasm-opt-sys-28e8b6d6ae6a1241\out

error occurred: Command "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.34.31933\bin\HostX64\x64\cl.exe" "-nologo" "-MD" "-O2" "-Brepro" "-I" "C:\Users\vic\AppData\Local\Temp\cargo-install7DjSCM\release\build\wasm-opt-sys-28e8b6d6ae6a1241\out\cxxbridge\include" "-I" "C:\Users\vic\AppData\Local\Temp\cargo-install7DjSCM\release\build\wasm-opt-sys-28e8b6d6ae6a1241\out\cxxbridge\crate" "-I" "C:\Users\vic\.cargo\registry\src\github.com-1ecc6299db9ec823\wasm-opt-sys-0.112.0\binaryen\src" "-I" "C:\Users\vic\.cargo\registry\src\github.com-1ecc6299db9ec823\wasm-opt-sys-0.112.0\binaryen\src\tools" "-I" "C:\Users\vic\AppData\Local\Temp\cargo-install7DjSCM\release\build\wasm-opt-sys-28e8b6d6ae6a1241\out" "-W4" "/std:c++17" "/DTHROW_ON_FATAL" "-FoC:\Users\vic\AppData\Local\Temp\cargo-install7DjSCM\release\build\wasm-opt-sys-28e8b6d6ae6a1241\out\f24188e5de54a447-literal.o" "-c" "C:\Users\vic\.cargo\registry\src\github.com-1ecc6299db9ec823\wasm-opt-sys-0.112.0\binaryen\src\wasm\literal.cpp" with args "cl.exe" did not execute successfully (status code exit code: 2).

I already went to wasm-opt-rs to build from source. However, It still didn't work for me.

If you have any solution, please tell me, thank u.

@Skyfacon
Copy link

wasm-opt-sys can not be compiled in windows. Try it in Unix/Linux system,it works for me.

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

No branches or pull requests

2 participants