Support OS X 10.11 with system integrity protection enabled #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Downstream linking with this library is broken on OS X 10.11 with system integrity protection (SIP) enabled (which is the default). The OCL deployer will not launch in OS X 10.11, due to linking settings in the library generated from here.
cmake: Add INSTALL_NAME_DIR to library to fix OS X 10.11 dynamic path issues
OS X 10.11 with System Integrity Protection (SIP) [1] turned on (which is
the default), purges all DYLD_xxx env. var's before executing a program.
This means that dynamic libraries can not be found via DYLD_xxx paths, and
so all dynamic library dependencies must have a full path specified.
Without this property set, dependent libraries/executables that dynamically
link with log4cpp end up without the path information, and thus fail to
load in 10.11 w/ SIP enabled. Even if CMake provides a full path to the
log4cpp library, the output dependent dynamic library has a log4cpp
entry like
liblog4cpp.6.0.dylib (compatibility version 6.0.0, current version 6.0.0)
but with this property set in log4cpp (and no changes in the dependent
package), then the resulting log4cpp entry in the dependent library is
/opt/orocos/lib/liblog4cpp.6.0.dylib (compatibility version 6.0.0, current version 6.0.0)
Not entirely sure why this entry fixes the problem, but it does.
[1] https://support.apple.com/en-us/HT204899
Commit: