-
Notifications
You must be signed in to change notification settings - Fork 294
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
C API: dylib on macOS has ID with rpath #1297
Comments
I've solved this for now by post-processing the library manually with e.g. $ install_name_tool -id libwasmi.dylib libwasmi.dylib wasmtime has a build step to do this automatically, this could be maybe adopted here: |
@turbolent Thanks a lot for the issue report! Since you already know what needs to be done (e.g. Wasmtime's solution), would you be willing to open a PR? :) |
It looks like wasmi's CMake configuration already has code for this: wasmi/crates/c_api/CMakeLists.txt Lines 115 to 133 in 7a302a9
I'm not familiar enough with the macOS linker to say what the behaviour should be. |
Describe the bug
Similar to bytecodealliance/wasmtime#984:
On macOS, the built dylib has an ID with a relative path,
@rpath
:Loading the dynamic library then results in
Expected behavior
Loading the built dynamic library should work.
To Reproduce
68205d4
Wasmi C library
.wasm
) or Wat (.wat
) file to reproduce.N/A
Follow steps in https://lib.rs/crates/wasmi_c_api_impl
Link against the dylib and run the binary
The text was updated successfully, but these errors were encountered: