6cb03e
We configure Postgres with --disable-rpath because for the most part we
6cb03e
want to leave it to ldconfig to determine where libraries are.  However,
6cb03e
for some reason the Perl package puts libperl.so in a nonstandard place
6cb03e
and doesn't add that place to the ldconfig search path.  I think this
6cb03e
is a Perl packaging bug, myself, but apparently it's not going to change.
6cb03e
So work around it by adding an rpath spec to plperl.so (only).
6cb03e
Per bug #162198.
6cb03e
6cb03e
6cb03e
diff -Naur postgresql-9.1.5.orig/src/pl/plperl/GNUmakefile postgresql-9.1.5/src/pl/plperl/GNUmakefile
6cb03e
--- postgresql-9.1.5.orig/src/pl/plperl/GNUmakefile	2012-08-14 18:41:04.000000000 -0400
6cb03e
+++ postgresql-9.1.5/src/pl/plperl/GNUmakefile	2012-08-17 11:15:09.457116708 -0400
6cb03e
@@ -43,6 +43,9 @@
6cb03e
 
6cb03e
 SHLIB_LINK = $(perl_embed_ldflags)
6cb03e
 
6cb03e
+# Force rpath to be used even though we disable it everywhere else
6cb03e
+SHLIB_LINK += $(rpath)
6cb03e
+
6cb03e
 REGRESS_OPTS = --dbname=$(PL_TESTDB) --load-extension=plperl  --load-extension=plperlu
6cb03e
 REGRESS = plperl plperl_lc plperl_trigger plperl_shared plperl_elog plperl_util plperl_init plperlu plperl_array
6cb03e
 # if Perl can support two interpreters in one backend,