eclipse-iceoryx / eclipse-iceoryx/iceoryx2
FFI 'dylib' build on macOS is broken
- Dominant language
- Rust
- Stars
- 2.5k
- Forks
- 185
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 34
Description
## Required information
**Operating system:**
macOS; any version
**Rust version:**
any version
**Cargo version:**
any version
**iceoryx2 version:**
main branch
**Observed result or behaviour:**
The `dylib` generated by Rust has a dependency to the `target` folder. Using `cmake` to install the library retains this dependency.
Run `otool -L libiceoryx2_ffi.dylib` to list all the dependencies.
**Expected result or behaviour:**
The `dylib` should not have a dependency to the `target` folder
**Conditions where it occurred / Performed steps:**
Check if the discovery C example links to shared libs.
```sh
cmake -B target/ffi/build -DCMAKE_INSTALL_PREFIX="target/ffi/install" .
cmake --build target/ffi/build
cmake --install target/ffi/build
```
Run the discovery C example
```sh
cmake -B target/ffi/out-of-tree -CMAKE_PREFIX_PATH="full/path/to/target/ffi/install" -Hexamples/c
target/ffi/out-of-tree/discovery/example-c-discovery
```
Run `otool`
```sh
otool -L target/ffi/build/rust/release/libiceoryx2_ffi.dylib
```
Contributor guide
Research direction
Reproduce the install with the provided CMake commands, then inspect target/ffi/build/rust/release/libiceoryx2_ffi.dylib using otool -L. Check the discovery C example under examples/c and its shared-library linking. Done means the installed macOS dylib has no dependency on the target folder and the discovery example links and runs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, rust
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100