WebAssembly / WebAssembly/binaryen
rpath setup doesn't take user-specified LIBDIR path into account
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 8.6k
- Forks
- 885
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 69
Description
The rpath set-up code in CMakeLists:81 doesn't account for setting CMAKE_INSTALL_LIBDIR and the built binaries cannot find libbinaryen.so:
asm2wasm: error while loading shared libraries: libbinaryen.so: cannot open shared object file: No such file or directory
rpath is always set to $ORIGIN/../lib, regardless of the user-specified install location. Is libbinaryen.so supposed to be installed system-wide for other software to consume or is it an internal implementation detail? If the former, then it should have a proper SONAME and care should be taken to avoid making incompatible ABI changes without bumping SONAME. If the latter, then it should not be installed into /usr/lib or /usr/lib64 by default.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading CMakeLists at line 81 and the handling of CMAKE_INSTALL_LIBDIR; reproduce the asm2wasm loader failure with a non-default install location. Resolve the project decision about libbinaryen.so's installation and public ABI, then verify the resulting rpath and installation behavior for that choice.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100