pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #13622: unsafe use of relative rpath libpq.5.dylib
4+ messages / 4 participants
[nested] [flat]

* BUG #13622: unsafe use of relative rpath libpq.5.dylib
@ 2015-09-16 21:48  adamwizon@me.com
  0 siblings, 2 replies; 4+ messages in thread

From: adamwizon@me.com @ 2015-09-16 21:48 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      13622
Logged by:          Adam Wizon
Email address:      adamwizon@me.com
PostgreSQL version: 9.4.0
Operating system:   Mac OS X 10.11
Description:        

I was building Perl module DBD::Pg and received the following link error:

Reason: unsafe use of relative rpath libpq.5.dylib in
/Users/mydir/Perl_Modules/DBD-Pg-3.5.1/blib/arch/auto/DBD/Pg/Pg.bundle with
restricted binary at
/System/Library/Perl/5.18/darwin-thread-multi-2level/DynaLoader.pm line
194.

I believe I am running the 10.11 GM candidate.

Thanks,
Adam


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #13622: unsafe use of relative rpath libpq.5.dylib
@ 2015-09-17 03:48  Tom Lane <tgl@sss.pgh.pa.us>
  parent: adamwizon@me.com
  1 sibling, 0 replies; 4+ messages in thread

From: Tom Lane @ 2015-09-17 03:48 UTC (permalink / raw)
  To: adamwizon@me.com; +Cc: pgsql-bugs

adamwizon@me.com writes:
> I was building Perl module DBD::Pg and received the following link error:

> Reason: unsafe use of relative rpath libpq.5.dylib in
> /Users/mydir/Perl_Modules/DBD-Pg-3.5.1/blib/arch/auto/DBD/Pg/Pg.bundle with
> restricted binary at
> /System/Library/Perl/5.18/darwin-thread-multi-2level/DynaLoader.pm line
> 194.

Hm ... I think this represents a build bug in DBD::Pg.  You need to report
this to the authors of that module (who don't hang out here AFAIK).

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #13622: unsafe use of relative rpath libpq.5.dylib
@ 2015-10-02 15:41  Serge <lord@const.ru>
  parent: adamwizon@me.com
  1 sibling, 1 reply; 4+ messages in thread

From: Serge @ 2015-10-02 15:41 UTC (permalink / raw)
  To: pgsql-bugs

This is not BUG!
This is a new policy of secure SIP,  this library have permission
"restricted"
Use manual
http://www.macworld.com/article/2986118/security/how-to-modify-system-integrity-protection-in-el-cap...



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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: BUG #13622: unsafe use of relative rpath libpq.5.dylib
@ 2015-11-11 15:48  jhirsch <jonhirsch01@gmail.com>
  parent: Serge <lord@const.ru>
  0 siblings, 0 replies; 4+ messages in thread

From: jhirsch @ 2015-11-11 15:48 UTC (permalink / raw)
  To: 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....
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2015-11-11 15:48 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-09-16 21:48 BUG #13622: unsafe use of relative rpath libpq.5.dylib adamwizon@me.com
2015-09-17 03:48 ` Tom Lane <tgl@sss.pgh.pa.us>
2015-10-02 15:41 ` Serge <lord@const.ru>
2015-11-11 15:48   ` jhirsch <jonhirsch01@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox