yomaytk / elfconv

An experimental AOT compiler that translates Linux ELF binary to WebAssembly
Apache License 2.0
166 stars 9 forks source link

Error: failed to run main module `exe.wasm` #68

Open LeeJU0912 opened 1 day ago

LeeJU0912 commented 1 day ago

I am struggling with this error while following Quick Start.

~/elfconv/bin# wasmtime exe.wasm

Error: failed to run main module `exe.wasm`

Caused by:
    0: failed to instantiate "exe.wasm"
    1: unknown import: `env::__syscall_readlinkat` has not been defined

I built container on CentOS7(amd64) and just followed instructions at Quickstart - Host (WASI runtimes)

yomaytk commented 12 hours ago

Thank you for the report. It seems that bin/elfconv.sh has a bug. I have not maintained the bin/elfconv.sh for a while, so it has some problems. I will make a PR to fix it entirely. However, simply changing "wasm-host" on lines 25 and 44 to "wasi" will work.

Can you try it again?