-
Re: DYLD_LIBRARY_PATH and make
aburgh Jul 14, 2015 3:55 PM (in response to gtoronto)It may have been changed in the name of security. On Yosemite:
bash-3.2$ DYLD_PRINT_LIBRARIES=1 X=1 /usr/bin/printenv dyld: loaded: /usr/bin/printenv dyld: loaded: /usr/lib/libSystem.B.dylib dyld: loaded: /usr/lib/system/libcache.dylib ... dyld: loaded: /usr/lib/libc++.1.dylib dyld: loaded: /usr/lib/libDiagnosticMessagesClient.dylib X=1 DYLD_PRINT_LIBRARIES=1 TERM_PROGRAM=Apple_Terminal ...
But on El Capitan, all the `dyld: loaded:` messages are not printed and DYLD_PRINT_LIBRARIES is not in the list of variables, but X is. I have the same problem with makefiles that you do.
-
Re: DYLD_LIBRARY_PATH and make
JGD Jul 17, 2015 8:23 AM (in response to aburgh)I'm seeing similar problems with a build system that consists entirely of shell scripts and C programs. I'll post again if/when I figure it out.
-
Re: DYLD_LIBRARY_PATH and make
JGD Jul 17, 2015 9:35 AM (in response to aburgh)OK, I have at least part of the story. If a script file begins with "#!/bin/bash", or any other #!/path/to/interpreter, the DYLD environment variables are omitted from the set of environment variables passed to that interpreter. This applies even if the current and new interpreters are instances of the same interpreter.
This doesn't seem to apply to executables. Here's a really minimal program to print an environment variable:
#include <stdio.h> #include <stdlib.h> int main( int argc, char *argv[]) { if( argc >= 2) { printf( "$ENV{%s} is \"%s\"\n", argv[1], getenv( argv[1])); } return 0; }and that can see $DYLD_FALLBACK_LIBRARY_PATH quite happily.
I don't know about the "uic" command the OP was using: is that a script?
John
-
Re: DYLD_LIBRARY_PATH and make
JGD Jul 23, 2015 4:03 AM (in response to JGD)The DYLD_FALLBACK_LIBRARY_PATH feature is still in 10.11 Beta 4.
-
Re: DYLD_LIBRARY_PATH and make
JGD Jul 23, 2015 9:58 AM (in response to JGD)... and is reported in Apple Bug Reporter.
-
Re: DYLD_LIBRARY_PATH and make
Fritzt Aug 16, 2015 7:23 AM (in response to JGD)Having exactly the same issue. Our cross-platform build system (written in Python and using Qt qmake + make) is broken on El Capitan, disabling system integrity protection doesn't prevent this. Is there any way to allow passing of the DYLD_ variables to shells and using them from there? At least I would expect this behavior to respect the system integrity protection settings!
-
Re: DYLD_LIBRARY_PATH and make
Fritzt Aug 16, 2015 7:32 AM (in response to Fritzt)filed as bug report 22300976
-
-
-
-
-
-
Re: DYLD_LIBRARY_PATH and make
khoyt Oct 9, 2015 7:24 AM (in response to gtoronto)Since I ran into this too, from the System Integrity Protection Guide:
Spawning children processes of processes restricted by System Integrity Protection, such as by launching a helper process in a bundle with NSTask or calling the exec(2) command, resets the Mach special ports of that child process. Any dynamic linker (dyld) environment variables, such as DYLD_LIBRARY_PATH, are purged when launching protected processes.
Level 1