OS X El Capitan and DYLD_LIBRARY_PATH

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: OS X El Capitan and DYLD_LIBRARY_PATH
Date: 2015-10-14 15:24:27
Message-ID: 561E73AB.8060800@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The new OS X release 10.11 "El Capitan" has a "security" feature that
prevents passing DYLD_LIBRARY_PATH to child processes. Somehow, that
variable is stripped from the environment.

Consequently, the current in-tree "make check" test setup will no longer
work, because programs such as initdb and psql that are called several
layers down will no longer be pointed to the right libraries. If you
run "make install" before "make check", it will work; otherwise
something will either fail because it can't find the libraries, or it
might pick up libraries found somewhere else, with poor outcomes, in my
experience.

The exact specifications of this new behavior aren't clear to me yet.
For example, this C program works just fine:

```
#include <stdio.h>
#include <stdlib.h>

int
main()
{
printf("DYLD_LIBRARY_PATH = %s\n", getenv("DYLD_LIBRARY_PATH"));
return 0;
}
```

but this shell script does not:

```
echo "DYLD_LIBRARY_PATH = $DYLD_LIBRARY_PATH"
```

There is breakage all over the Internet if you search for this, but the
full details don't appear to be very clear.

One workaround is to disable System Integrity Protection, effectively
restoring the behavior of the previous OS release.

Or don't upgrade quite yet if you don't want to deal with this at the
moment.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amir Rohan 2015-10-14 15:27:12 Re: Proposal: pg_confcheck - syntactic & semantic validation of postgresql configuration files
Previous Message Andres Freund 2015-10-14 14:55:13 Re: Proposal: pg_confcheck - syntactic & semantic validation of postgresql configuration files