Re: SHARED LIBRARY IS NOT CREATED:Postgres could not create support for plperl

From: John R Pierce <pierce(at)hogranch(dot)com>
To: PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: SHARED LIBRARY IS NOT CREATED:Postgres could not create support for plperl
Date: 2008-11-12 07:58:22
Message-ID: 491A8C9E.3060807@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Dey, Sutapa wrote:
<blockquote
cite="mid:D264563FEECCAD4FBDE4B92D3863256A4B4909EBD9(at)GVW0440EXB(dot)americas(dot)hpqcorp(dot)net"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Book Antiqua";
panose-1:2 4 6 2 5 3 5 3 3 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.5pt;
font-family:Consolas;}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:Consolas;}
.MsoChpDefault
{mso-style-type:export-only;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
/* List Definitions */
@list l0
{mso-list-id:1804539877;
mso-list-type:hybrid;
mso-list-template-ids:-1030557180 67698711 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-number-format:alpha-lower;
mso-level-text:"%1\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
margin-left:48.0pt;
text-indent:-.25in;}
@list l0:level2
{mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level3
{mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level4
{mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level5
{mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level6
{mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level7
{mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level8
{mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level9
{mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="Section1">
<p class="MsoPlainText"><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">Hi
All,<o:p></o:p></span></p>
<p class="MsoPlainText"><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoPlainText"><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">I
am trying to build/enable plperl support for postgres.<o:p></o:p></span></p>
<p class="MsoPlainText"><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoPlainText"><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">1.
The system info is :<o:p></o:p></span></p>
<p class="MsoPlainText"><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">#
uname -a<o:p></o:p></span></p>
<p class="MsoPlainText"><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">HP-UX
unknown B.11.23 U 9000/800 1178464650 unlimited-user license<o:p></o:p></span></p>
<p class="MsoPlainText"><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoPlainText"><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">2.
The steps I followed:<o:p></o:p></span></p>
<p class="MsoPlainText"
style="margin-left: 48pt; text-indent: -0.25in;"><!--[if !supportLists]--><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;"><span
style="">a)<span
style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><!--[endif]--><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">In
postgres user&#8217;s .profile file I had set :<o:p></o:p></span></p>
<p class="MsoPlainText" style="margin-left: 48pt;"><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">export
LD_LIBRARY_PATH=/opt/pgsql/lib/:/opt/pgsql/vsm-lib:/usr/lib:</span><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">/opt/pgsql/lib/hpux32</span></p>
<p class="MsoPlainText" style="margin-left: 48pt;"><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">export
libdir=/opt/pgsql/lib<o:p></o:p></span></p>
<p class="MsoPlainText"
style="margin-left: 48pt; text-indent: -0.25in;"><!--[if !supportLists]--><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;"><span
style="">b)<span
style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><!--[endif]--><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">I
linked the libperl.sl from the perl library
&#8220;/usr/local/perl5/lib/5.8.3/PA-RISC2.0/CORE/libperl.sl&#8221; to:<o:p></o:p></span></p>
<p class="MsoPlainText" style="margin-left: 48pt;"><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">/opt/iexpress/postgresql/lib/libperl.sl<o:p></o:p></span></p>
<p class="MsoPlainText" style="margin-left: 48pt;"><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">/opt/iexpress/postgresql/lib/hpux32/libperl.sl<o:p></o:p></span></p>
<p class="MsoPlainText" style="margin-left: 48pt;"><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoPlainText"
style="margin-left: 48pt; text-indent: -0.25in;"><!--[if !supportLists]--><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;"><span
style="">c)<span
style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><!--[endif]--><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">In
the postgres &#8220;src&#8221; directory,&nbsp; I set the environment variables
(export CC=&#8221;cc &#8211;v&#8221;, LDOPTS="+nodefaultrpath")<o:p></o:p></span></p>
<p class="MsoPlainText"
style="margin-left: 48pt; text-indent: -0.25in;"><!--[if !supportLists]--><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;"><span
style="">d)<span
style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><!--[endif]--><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">./configure
--prefix=/opt/iexpress/postgresql --with-perl
--enable-integer-datetimes
--with-openssl --libdir=/opt/iexpress/postgresql/lib/hpux32
--without-readline
--without-zlib --without-docdir<o:p></o:p></span></p>
<p class="MsoPlainText"
style="margin-left: 48pt; text-indent: -0.25in;"><!--[if !supportLists]--><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;"><span
style="">e)<span
style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><!--[endif]--><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">/usr/local/bin/gmake
-f /opt/pgsql/src/postgresql-8.2.4/GNUmakefile all<o:p></o:p></span></p>
<p class="MsoPlainText"
style="margin-left: 48pt; text-indent: -0.25in;"><!--[if !supportLists]--><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;"><span
style="">f)<span
style="font-family: &quot;Times New Roman&quot;; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><!--[endif]--><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">/usr/local/bin/gmake
-f /opt/pgsql/src/postgresql-8.2.4/GNUmakefile install<o:p></o:p></span></p>
<p class="MsoPlainText" style="margin-left: 48pt;"><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoPlainText"><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">3.
After these steps when I try to create plperl language with postgres<o:p></o:p></span></p>
<p class="MsoPlainText"><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">&nbsp;&nbsp;
$ /opt/iexpress/postgresql/bin/createlang --echo --dbname=vsm
--username=postgres plperl<o:p></o:p></span></p>
<p class="MsoPlainText"><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;"><o:p>&nbsp;</o:p></span></p>
<p class="MsoPlainText"><b><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">&nbsp;&nbsp;
SELECT oid FROM pg_catalog.pg_language WHERE lanname = 'plperl';<o:p></o:p></span></b></p>
<p class="MsoPlainText"><b><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">&nbsp;
CREATE LANGUAGE "plperl";<o:p></o:p></span></b></p>
<p class="MsoPlainText"><b><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">&nbsp;&nbsp;
createlang: language installation failed: ERROR:&nbsp; could not access file
"$libdir/plperl": No such file or directory<o:p></o:p></span></b></p>
<p class="MsoPlainText"><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;"><o:p>&nbsp;</o:p></span></p>
</div>
</blockquote>
<br>
first, let me say, I don't know squat about HPUX, just Unix in
general...<br>
<br>
assuming the postgres server is running as a daemon launched by some
sort of system service manager, chances are VERY good its not running
the .profile and isn't seeing that LD_LIBRARY_PATH.&nbsp; you could add
this same thing to the launcher script that loads the postmaster
daemon....<br>
<br>
however, at least in most newer unix systems, using LD_LIBRARY_PATH is
deprecated, you want to link the programs so they KNOW where they are
expecting to find their libaries and aren't dependent on additional
custom settings of environment variables at runtime...&nbsp; often this is
done with the --rpath option to the linker...&nbsp; perhaps step E could be
prefixed with...<br>
<br>
LDFLAGS = --rpath <span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">/opt/iexpress/postgresql/lib/
--rpath </span><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">/opt/pgsql/lib/hpux32
--rpath </span><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">/opt/pgsql/vsm-lib
\<br>
&nbsp;&nbsp;&nbsp; </span><span
style="font-size: 11pt; font-family: &quot;Book Antiqua&quot;,&quot;serif&quot;;">/usr/local/bin/gmake
-f /opt/pgsql/src/postgresql-8.2.4/GNUmakefile all</span><br>
<br>
<br>
<br>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 12.5 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Zou Yong 2008-11-12 08:34:34 BUG #4522: autovacuum working send SIGUSR1 to the wrong pid
Previous Message Dey, Sutapa 2008-11-12 07:31:17 SHARED LIBRARY IS NOT CREATED:Postgres could not create support for plperl