Skip to content

Catch the error when try to build wasm #7

@frostmark

Description

@frostmark

Hello. When I tried to build hello.rb I caught follow error:

Compiling hello.rb...warning: unexpected argument type i32 at index 1 in call to 'lseek', should be i64
warning: unexpected return type i32 in call to 'lseek', should be i64
error: asm2wasm seeing an invalid argument type at index 1 (this will not validate) in call from $_mrb_io_sysseek to $_lseek (this is likely due to undefined behavior in C, like defining a function one way and calling it in another, which is important to fix)
[wasm-validator error in function $_mrb_io_sysseek] 1 != 2: call param types must match, on 
[i64] (call $_lseek
 [i32] (local.get $12)
 [i32] (local.get $13)
 [i32] (local.get $4)
)
(on argument 1)
Fatal: error in validating output
shared:ERROR: '/Users/markfrost/emsdk/fastcomp/bin/asm2wasm build/app.temp.asm.js --total-memory=16777216 --trap-mode=allow --mem-init=build/app.js.mem --mem-base=1024 --wasm-only -o build/app.wasm --mvp-features' failed (1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions