-
Notifications
You must be signed in to change notification settings - Fork 167
Closed
Description
Due to System Integrity Protection (SIP) on macOS systems, the binaries from the /bin (eg. /bin/bash) are not allowed to handle this environment variables. More information: https://support.apple.com/en-us/HT204899
Example of SIP:
- Create
./test.shfile
#!/bin/bash
echo $DYLD_LIBRARY_PATH
- Run with command:
DYLD_LIBRARY_PATH=/lalala ./test.sh
Result:
- Nothing is printed:
$ DYLD_LIBRARY_PATH=/lalala ./test.sh
The current generated alternative script files on macOS from the pkg_alternatives package are having as interpreter /bin/bash, eg. pip3:
$ head /usr/local/pkg/bin/pip3
#!/bin/bash
#
# $NetBSD: wrapper.sh,v 1.2 2012/06/13 15:35:32 jperkin Exp $
#
# pkg_alternatives - Generic wrappers for programs with similar interfaces
# Copyright (c) 2005 Julio M. Merino Vidal <jmmv@NetBSD.org>
...
This is a bit problematic in case of macOS as due to SIP protection for example declared environment variable like DYLD_LIBRARY_PATH is rejected.
This will lead eventually to problems for trying to do things like DYLD_LIBRARY_PATH=/path_with_dylibs /usr/local/pkg//bin/ctest which is pretty common.
Metadata
Metadata
Assignees
Labels
No labels