I have a new MacBook Pro running Sierra.  I managed to get PostgreSQL
to build after install Xcode, installing MacPorts, installing the
documentation toolchain via some incantation that was apparently
wrong, and then uninstalling and reinstalling the documentation
toolchain per https://trac.macports.org/ticket/44464 - but even after
that, 'make check' was failing: 'psql' repeatedly died with an abort
trap.  Binaries worked fine when I ran them from the command line
(sometimes with DYLD_LIBRARY_PATH, if needed) but when run via
pg_regress, nothing worked.

At first, I thought that the problem was just the
/usr/lib/libpq.5.dylib which xcode had deposited, which I couldn't
move out of the way without disabling System Integrity Protection, but
eventually I got that done.  However, getting that out of the way
didn't fix anything: it turns out that System Integrity Protection
feature *also* prevents  DYLD_LIBRARY_PATH from being inherited by
child processes in some manner.  I *think* you can still set it for a
process that you invoke directly, but it can't be passed down multiple
levels. Because of that, psql, when run from the regression test
environment, can't find libpq at all (or finds the one you already
have installed rather than the one you just built), and bad stuff
happens.  So now I'm running with SIP disabled, and everything works

My main purpose in writing this email is to pass along what I learned
in the hopes of sparing somebody else some trouble, but perhaps there
is a way to modify our regression test setup so that the tests can
pass with System Integrity Protection enabled.  Disabling it requires
booting into recovery mode and then rebooting back into regular mode,
and is not recommended, so many users may find it inconvenient and


Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to