You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This error has been replicated on both Arch Linux (by installing binaryen via $ yay binaryen) and OSX (by installing binaryen via $ brew install binaryen).
After installing binaryen with the preferred installation method, running $ cargo +nightly contract build fails with the following error:
ERROR: Unable to extract version information from wasm-opt version 100.
Your wasm-opt version is most probably too old. Make sure you use a version >= 99.
However, the wasm-opt version installed is the latest:
$ wasm-opt --version
> wasm-opt version 100
I also tried building the tagged wasm-opt version 99, which confusingly installed wasm-opt version 98. When trying to build with this version, it expectedly does not work.
The work around to this is by using the unpreferred method of building binaryen as a dependency when installing cargo-contract:
It looks like wasm-opt version checking regex assumes additional string after version number. Solution:
change: let re = Regex::new(r"wasm-opt version (\d+)\s+").unwrap();
to: let re = Regex::new(r"wasm-opt version (\d+)\s*+").unwrap();
Thanks @rrybarczyk and @netrikare! Sorry about the late response, just saw it this morning, the easter holidays collided with this ticket unfortunately 🙈.
We just issued a new release which fixes this issue and will make some adaptions to our CI setup to catch stuff like this earlier.
This error has been replicated on both Arch Linux (by installing
binaryen
via$ yay binaryen
) and OSX (by installingbinaryen
via$ brew install binaryen
).After installing
binaryen
with the preferred installation method, running$ cargo +nightly contract build
fails with the following error:However, the
wasm-opt
version installed is the latest:I also tried building the tagged
wasm-opt
version 99, which confusingly installedwasm-opt
version 98. When trying to build with this version, it expectedly does not work.The work around to this is by using the unpreferred method of building
binaryen
as a dependency when installing cargo-contract:The text was updated successfully, but these errors were encountered: