This repository was archived by the owner on Jun 20, 2023. It is now read-only.
This repository was archived by the owner on Jun 20, 2023. It is now read-only.
Building markdown failed while validating input. #19
Closed
Description
I tried to compile the markdown example, but unfortunately compilation fails.
$ wasm-pack --version
wasm-pack 0.9.1
$ cargo --version
cargo 1.41.0 (626f0f40e 2019-12-03)
Here are the steps to reproduce. Not that I didn't copy full logs:
$ wasm-pack build
�[1m�[2m[INFO]�[0m: Checking for the Wasm target...
�[1m�[2m[INFO]�[0m: Checking for the Wasm target...
�[1m�[2m[INFO]�[0m: Compiling to Wasm...
�[1m�[2m[INFO]�[0m: Compiling to Wasm...
Finished Finished release [optimized] target(s) in 0.02s
release [optimized] target(s) in 0.02s
�[1m�[2m[INFO]�[0m: Installing wasm-bindgen...
�[1m�[2m[INFO]�[0m: Installing wasm-bindgen...
�[1m�[2m[INFO]�[0m: Optimizing wasm binaries with `wasm-opt`...
�[1m�[2m[INFO]�[0m: Optimizing wasm binaries with `wasm-opt`...
[wasm-validator error in function render\20multivalue\20shim] (i32, i32) != i32: block with value and last element with value must match types, on
[(i32, i32)] [(i32, i32)] (block (result i32 i32)
[none] (global.set $global$0
[i32] (local.tee $2
[i32] (i32.sub
[i32] (global.get $global$0)
[i32] (i32.const 16)
)
)
)
[none] (call $render
[i32] (local.get $2)
[i32] (local.get $0)
[i32] (local.get $1)
)
[none] (local.set $3
[i32] (i32.load
[i32] (local.get $2)
)
)
[none] (drop
[i32] (i32.load offset=4
[i32] (local.get $2)
)
)
[none] (global.set $global$0
[i32] (i32.add
[i32] (local.get $2)
[i32] (i32.const 16)
)
)
[i32] (local.get $3)
) ;; end block
[...]
(func $<T\20as\20core::any::Any>::type_id::ha8033cc8aaed9e29 (; 212 ;) (param $0 i32) (result i64)
(i64.const 1229646359891580772)
)
(func $<T\20as\20core::any::Any>::type_id::h26c6ec07af71e373 (; 213 ;) (param $0 i32) (result i64)
(i64.const -225553400743110688)
)
(func $<T\20as\20core::any::Any>::type_id::hf03814fcf300737e (; 214 ;) (param $0 i32) (result i64)
(i64.const 2849073579228188672)
)
(func $std::process::abort::h83667d4dc61f8ff4 (; 215 ;)
(unreachable)
)
(func $__rust_start_panic (; 216 ;) (param $0 i32) (result i32)
(unreachable)
)
(func $dlmalloc::dlmalloc::Dlmalloc::malloc_alignment::hcee1c950df17a4f7 (; 217 ;) (param $0 i32) (result i32)
(i32.const 8)
)
(func $<T\20as\20core::any::Any>::type_id::hcbe1e308a536e760 (; 218 ;) (param $0 i32) (result i64)
(i64.const -225553400743110688)
)
(func $core::panic::Location::caller::h4586dda5eb624bd0 (; 219 ;) (param $0 i32) (result i32)
(local.get $0)
)
(func $core::ptr::drop_in_place::hdf3ac4f0aee1b486 (; 220 ;) (param $0 i32)
)
(func $core::ptr::drop_in_place::ha08c4b3d9252f877 (; 221 ;) (param $0 i32)
)
(func $core::ptr::drop_in_place::he9358e90f45c44df (; 222 ;) (param $0 i32)
)
(func $core::ptr::drop_in_place::h01349a483699dc28 (; 223 ;) (param $0 i32)
)
(func $core::ptr::drop_in_place::h0293f9ecfaa56c65 (; 224 ;) (param $0 i32)
)
(func $core::ptr::drop_in_place::h86bf89378777bea4 (; 225 ;) (param $0 i32)
)
(func $core::ptr::drop_in_place::h3a3c6f3f877fe4f5 (; 226 ;) (param $0 i32)
)
(func $core::ptr::drop_in_place::h08414e5d2954751c (; 227 ;) (param $0 i32)
)
(func $std::alloc::default_alloc_error_hook::h9f234f4112b0e55e (; 228 ;) (param $0 i32) (param $1 i32)
)
(func $core::ptr::drop_in_place::h04478f7f402db464 (; 229 ;) (param $0 i32)
)
;; custom section "producers", size 121
;; custom section "webidl-bindings", size 50
)
Fatal: error in validating input
Error: failed to execute `wasm-opt`: exited with exit code: 1
full command: "/home/developer/.cache/.wasm-pack/wasm-opt-4d7a65327e9363b7/wasm-opt" "/home/developer/projects/wasmtime-demos/markdown/pkg/markdown.wasm" "-o" "/home/developer/projects/wasmtime-demos/markdown/pkg/markdown.wasm-opt.wasm" "-O"
To disable `wasm-opt`, add `wasm-opt = false` to your package metadata in your `Cargo.toml`.
I've tried the suggestion and modified the Cargo.toml
and added the following lines:
[package.metadata.wasm-pack.profile.dev]
wasm-opt = false
But that didn't help
Metadata
Metadata
Assignees
Labels
No labels