[petsc-dev] Mac OS X El Capitan does not propagate DYLD_LIBRARY_PATH from parent process

Satish Balay balay at mcs.anl.gov
Wed Oct 7 17:06:59 CDT 2015

Ok - works with homebrew [which installs to /usr/local] if python is
explicitly used [i.e without #!/usr/bin/env]


balay at imav^~/junk $ export FOOBAR=foobar
balay at imav^~/junk $ export DYLD_LIBRARY_PATH=foobar
balay at imav^~/junk $ which python
balay at imav^~/junk $ cat  env-test.py 
#!/usr/bin/env python
import os
if 'FOOBAR' in os.environ:
  print 'FOOBAR:', os.environ['FOOBAR']
  print 'FOOBAR not in env'

if 'DYLD_LIBRARY_PATH' in os.environ:
  print 'DYLD_LIBRARY_PATH:', os.environ['DYLD_LIBRARY_PATH']
  print 'DYLD_LIBRARY_PATH not in env'
balay at imav^~/junk $ ./env-test.py 
FOOBAR: foobar
balay at imav^~/junk $ python ./env-test.py 
FOOBAR: foobar
balay at imav^~/junk $ 

On Wed, 7 Oct 2015, Munson, Todd S. wrote:

> It seems that "core" stuff is anything located in one of the protected directories.
> Macports puts everything in /opt, which is not protected by SIP.  So, if you use
> all the macport utilities and bypass all executables in /usr, then in theory 
> you should be fine.

> > On Oct 7, 2015, at 4:45 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

> > Presumably you could also install the latest python download (not from Apple) and it won't have this "protection".

More information about the petsc-dev mailing list