Re: BUG #13622: unsafe use of relative rpath libpq.5.dylib - Mailing list pgsql-bugs

From jhirsch
Subject Re: BUG #13622: unsafe use of relative rpath libpq.5.dylib
Date
Msg-id 1447256882811-5873522.post@n5.nabble.com
Whole thread Raw
In response to Re: BUG #13622: unsafe use of relative rpath libpq.5.dylib  (Serge <lord@const.ru>)
List pgsql-bugs
Yes, the issue is being caused by SIP. Here is a workaround. It is not
difficult but it is a bit cumbersome.

1. Boot into recovery mode and disable SIP.
2. reboot
3. You need to run the install_name_tool command to specify the absolute
path to the libpq.5.dylib library. You can see where it is pointing to with
another command, otool.

Ex. libpq.5.dylib is a relative path and that is causing the error.

bash-3.2# otool -L <Dir_Where_Your_postgres_lib_is>/pdo_pgsql.so
<Dir_Where_Your_postgres_lib_is>/pdo_pgsql.so:
    libpq.5.dylib (compatibility version 5.0.0, current version 5.6.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
1225.1.1)

Run this.

bash-3.2# install_name_tool -change libpq.5.dylib /usr/lib/libpq.5.dylib
<Dir_Where_Your_postgres_lib_is>/pdo_pgsql.so

After running when you check with otool you will see the change. (it says
/usr/lib/libpq.5.dylib)

bash-3.2# otool -L <Dir_Where_Your_postgres_lib_is>/pdo_pgsql.so
<Dir_Where_Your_postgres_lib_is>/pdo_pgsql.so:
    /usr/lib/libpq.5.dylib (compatibility version 5.0.0, current version 5.6.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
1225.1.1)

4. Boot back into recovery mode and enable SIP.
5. Reboot again. That should be it.



--
View this message in context:
http://postgresql.nabble.com/BUG-13622-unsafe-use-of-relative-rpath-libpq-5-dylib-tp5866235p5873522.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #13769: SELECT ... FROM a JOIN b FOR UPDATE a; BREAKS SNAPSHOT
Next
From: postgresql.org@gclough.com
Date:
Subject: BUG #13770: Extending recovery_min_apply_delay on Standby causes it to be unavailable for a while