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.

PR-URL: #23168
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
rubys authored and targos committed Oct 5, 2018
1 parent ed01b38 commit 49b0ec4
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 @@ -959,6 +959,11 @@
[ 'OS=="win" and node_shared=="true"', {
'type': 'none',
}],
[ 'node_shared=="true"', {
'xcode_settings': {
'OTHER_LDFLAGS': [ '-Wl,-rpath,@loader_path', ],
},
}],
],
}, # cctest
], # end targets
Expand Down

0 comments on commit 49b0ec4

Please sign in to comment.