Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support OS X 10.11 with system integrity protection enabled #5

Merged
merged 1 commit into from
Apr 26, 2016

Conversation

snrkiwi
Copy link
Contributor

@snrkiwi snrkiwi commented Feb 15, 2016

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:

… 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
@meyerj meyerj merged commit f6d57db into orocos-toolchain:toolchain-2.9 Apr 26, 2016
@snrkiwi snrkiwi deleted the rdt-support-osx1011 branch November 1, 2016 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants