-
Notifications
You must be signed in to change notification settings - Fork 847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failure to load LLVM-compiled WASM: undefined symbol: wasmer_raise_trap #2107
Comments
The final binary that uses engine-native must link with a flag that exposes the wasmer VM functions to the shared object that we load. Here's our .cargo/cargo.toml: https://github.com/wasmerio/wasmer/blob/master/.cargo/config.toml . Try adding that to your project! |
Thanks @nlewycky! Unfortunately I haven't been able to test this yet -- I'm running into issues getting LLVM running in my build container. Will report back when I'm up and running again :) |
Is that This
|
Sorry I deleted my comment, I realized after that it likely wasn't supposed to go on the .wasm However I also have it on the host binary which loads the .wasm, with the same result :( |
It sounds like you have two binaries, one on a mac which loads the |
I can confirm that I have the config.toml defined for the linux binary; is there a way to inspect the binary itself to make sure it's worked? If it's helpful at all, the linux binary is running in Docker under Alpine 3.13 & linked against glibc-2.32 |
I could use some help reproducing the issue, I've set up Alpine 3.14 with glibc 2.33 using packages from https://github.com/sgerrand/alpine-pkg-glibc but building with |
This issue may be fixed by #2475. |
We could solve this by having libcalls in the compilers be resolved by traversing the VMContext rather than using a static pointer at compile time |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Feel free to reopen the issue if it has been closed by mistake. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Feel free to reopen the issue if it has been closed by mistake. |
Describe the bug
I have written an executable which compiles WASM via LLVM and serializes the module to disk.
I am attempting to cross-compile to Amazon Linux via target triple
x86_64-linux-unknown
, from macOS 11.1 (uname:Darwin xlembox.local 20.2.0 Darwin Kernel Version 20.2.0: Wed Dec 2 20:39:59 PST 2020; root:xnu-7195.60.75~1/RELEASE_X86_64 x86_64
).On the Linux side, another executable attempts to load the binary to run via the Native engine in headless mode:
Deserialize panics on the unwrap with
Steps to reproduce
Expected behavior
The module loads and executes via the native headless engine.
Actual behavior
Deserialize panics with
CorruptedBinary
error.Additional context
This process works when using Cranelift instead of LLVM.
Snippet of code I use to cross-compile:
The text was updated successfully, but these errors were encountered: