Commit 7afa849
committed
emit an -rpath for tbb in LdFlags() on macos
The TBB libraries RcppParallel ships on macOS record an '@rpath'-relative
install name, but LdFlags() emitted only a '-L' search path. That satisfies
the linker, so downstream packages built fine, but the resulting binary
carried no LC_RPATH at all: dyld could resolve '@rpath/libtbb.dylib' only
when RcppParallel -- and hence TBB -- had already been loaded into the
process. Loading such a binary on its own failed with "Library not loaded:
@rpath/libtbb.dylib".
Pair the '-L' with a matching '-rpath', as the TBB_LIB branch just above
already does. A stale rpath (e.g. in a binary package built where
RcppParallel lived at a different path) is harmless: dyld skips a path that
does not resolve and falls back to matching the already-loaded image, which
is the current behaviour.
Fixes #209.1 parent 39afcb3 commit 7afa849
3 files changed
Lines changed: 49 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
3 | 11 | | |
4 | 12 | | |
5 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
111 | 118 | | |
112 | | - | |
| 119 | + | |
113 | 120 | | |
114 | 121 | | |
115 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
0 commit comments