wasmer-python
wasmer-python copied to clipboard
`undefined symbol: wasmer_vm_probestack` when using Native cranelift engine
Describe the bug
Using v1.1.0 of wasmer + wasmer-compiler-cranelift, on Ubuntu 22.04, I get a compilation error:
Traceback (most recent call last):
File "//simple.py", line 9, in <module>
module = Module(store, open(__dir__ + '/simple.wasm', 'rb').read())
RuntimeError: Compilation error: /tmp/wasmer_dylib_MBR1pc.so: undefined symbol: wasmer_vm_probestack
Steps to reproduce
Here's a sample dockerfile that shows the problem:
FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
python3 python3-venv python3-pip
RUN pip3 install \
pip==22.1.1 \
wasmer==1.1.0 \
wasmer-compiler-cranelift==1.1.0
# these are from the wasmer-python/examples/appendices examples
COPY simple.py simple.wasm /
CMD ["python3", "simple.py"]
I've pushed that to docker hub, so it can be run just like this:
❯ docker run --rm noahpendleton/test-wasmer
Traceback (most recent call last):
File "//simple.py", line 9, in <module>
module = Module(store, open(__dir__ + '/simple.wasm', 'rb').read())
RuntimeError: Compilation error: /tmp/wasmer_dylib_LuPa1T.so: undefined symbol: wasmer_vm_probestack
The symbol does appear to be present in the library:
❯ nm -D --defined-only venv/lib/python3.10/site-packages/wasmer/wasmer.cpython-310-x86_64-linux-gnu.so | grep wasmer_vm_probestack
0000000000651530 D wasmer_vm_probestack
❯ nm -D --defined-only venv/lib/python3.10/site-packages/wasmer_compiler_cranelift/wasmer_compiler_cranelift.cpython-310-x86_64-linux-gnu.so | grep wasmer_vm_probestack
00000000006da208 D wasmer_vm_probestack
Though it's a D
ata symbol. I'll admit I'm pretty far out of my depth on this.
This problem does't exist on v1.0.0 of wasmer/wasmer_compiler_cranelift (the vm_probestack was added later).