wasmer
wasmer copied to clipboard
`wasmer create-exe` fails with `error: cannot get prefix for atom ...`
Describe the bug
When following the wasmer.io blog post WebAssembly as a Universal Binary Format (Part I: Native executables), wasmer create-exe ./wasm2wat.wasm -o ./wasm2wat.wasm.exe fails.
> curl -sLO https://registry-cdn.wapm.io/contents/_/wabt/1.0.12/out/wasi/wasm2wat.wasm
> wasmer create-exe ./wasm2wat.wasm -o ./wasm2wat.wasm.exe
Compiler: cranelift
Target: x86_64-pc-windows-msvc
Using path `C:\Users\Roy\AppData\Local\scoop\apps\wasmer\v4.2.0\cache\wasmer-windows-gnu64\lib\libwasmer-headless.a` as libwasmer path.
error: cannot get prefix for atom wasm2wat
Version Info
> wasmer -vV
wasmer 4.2.0 (20f1ae3 2023-09-05)
binary: wasmer-cli
commit-hash: 20f1ae3be5a8e1802f54a945da6a3666e906d13c
commit-date: 2023-09-05
host: x86_64-pc-windows-msvc
compiler: singlepass,cranelift,llvm
Possibly related to issue #3834?
The same issue occurs with Linux/Ubuntu.
I have the same issue when build exe with python-3.11.4.wasm and ruby-3.2.2.wasm using wasmer v4.2.3.
> wasmer create-exe python-3.11.4.wasm --target x86_64-pc-windows-msvc -o python-3.11.4.wa
sm.exe
Compiler: cranelift
Target: x86_64-pc-windows-msvc
Using path `D:\apps\wasmer\cache\wasmer-windows-gnu64\lib\libwasmer-headless.a` as libwasmer path.
error: cannot get prefix for atom python-3.11.4
> wasmer create-exe ruby-3.2.2.wasm -o ruby-3.2.2.wasm.exe   in cmd at 00:10:40
Compiler: cranelift
Target: x86_64-pc-windows-msvc
Using path `D:\apps\wasmer\cache\wasmer-windows-gnu64\lib\libwasmer-headless.a` as libwasmer path.
error: cannot get prefix for atom ruby-3.2.2
The wasm can be execute with wasmer normally.
> wasmer python-3.11.4.wasm --dir . hello.py
Hello World
> wasmer ruby-3.2.2.wasm --dir . hello.rb
Hello World
>