Skip to content

Commit

Permalink
build: add loader path to rpath for cctest
Browse files Browse the repository at this point in the history
Building on Mac OS/X as follows:

```
./configure --shared
make -j4 test
```

Results in:

```
dyld: Library not loaded: @rpath/libnode.67.dylib
  Referenced from: /Users/rubys/git/node-shared/out/Release/cctest
  Reason: image not found
make: *** [cctest] Abort trap: 6
```

This change adds the loader path to the runtime path for the `cctest` executable.

Backport-PR-URL: #25681
PR-URL: #23168
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
rubys authored and BethGriggs committed Mar 20, 2019
1 parent 2b2ad96 commit 6352288
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,11 @@
['OS=="solaris"', {
'ldflags': [ '-I<(SHARED_INTERMEDIATE_DIR)' ]
}],
[ 'node_shared=="true"', {
'xcode_settings': {
'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
},
}],
],
}
], # end targets
Expand Down

0 comments on commit 6352288

Please sign in to comment.