<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3243" name=GENERATOR></HEAD>
<BODY>
<DIV>
<DIV><FONT face=Arial size=2>Hi </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I am facing problems while loading lwpostgis.sql in
PostGIS. Below is a detailed explanation.<BR>psql -d test -f
/usr/share/lwpostgis.sql</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>/******************************************************************************/<BR><STRONG>ERROR:
could not access file "$libdir/liblwgeom.so.1.2": No such file or
directory<BR>ERROR: current transaction is aborted, commands ignored until
end of transaction
block</STRONG><BR>/******************************************************************************/</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Hence , I tried creating a simple test.sql which
has the create replace functions for histogram. I have detailed the environmnent
that we are </FONT></DIV>
<DIV><FONT face=Arial size=2>using, the statement of lwpostgis.sql we executed
and the error encountered </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Environment:<BR>============</FONT></DIV>
<DIV><FONT face=Arial size=2>Operationg System : Red Hat Linux
3.4.5-2</FONT></DIV>
<DIV><FONT face=Arial size=2>Database : PostgreSQL 8.2.6 </FONT></DIV>
<DIV><FONT face=Arial size=2>Extensions : geos-3.0.0, proj-4.6.0,
postgis-1.2.1</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>test.sql (three sql commands that I have taken from
lwpostgis.sql to check)<BR>========</FONT></DIV>
<DIV><BR><FONT face=Arial size=2>BEGIN;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>CREATE OR REPLACE FUNCTION
histogram2d_in(cstring)<BR> RETURNS
histogram2d<BR> AS
'$libdir/liblwgeom.so.1.2',
'lwhistogram2d_in'<BR> LANGUAGE 'C'
IMMUTABLE STRICT; -- WITH (isstrict);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>CREATE OR REPLACE FUNCTION
histogram2d_out(histogram2d)<BR>
RETURNS cstring<BR> AS
'$libdir/liblwgeom.so.1.2',
'lwhistogram2d_out'<BR> LANGUAGE 'C'
IMMUTABLE STRICT; -- WITH (isstrict);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>CREATE TYPE histogram2d
(<BR> alignment =
double,<BR> internallength =
variable,<BR> input =
histogram2d_in,<BR> output =
histogram2d_out,<BR> storage =
main<BR>);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>COMMIT;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>ERROR Encountered<BR>================</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>BEGIN<BR>psql:test.sql:6: NOTICE: type
"histogram2d" is not yet defined<BR>DETAIL: Creating a shell type
definition.<BR>psql:test.sql:6: ERROR: could not access file
"$libdir/liblwgeom.so.1.2": No such file or directory<BR>psql:test.sql:11:
ERROR: current transaction is aborted, commands ignored until end of
transaction block<BR>psql:test.sql:19: ERROR: current transaction is
aborted, commands ignored until end of transaction
block<BR>ROLLBACK</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Varions Options we
tried:<BR>==================<BR></FONT><FONT face=Arial size=2><SPAN
class=928192705-01022008>a) /usr/local/lib is present in
/etc/ld.so.conf<BR>b) ldconfig was executed</SPAN></FONT></DIV>
<DIV><FONT><SPAN class=928192705-01022008></SPAN><SPAN
class=928192705-01022008></SPAN><FONT face=Arial size=2>c<SPAN
class=928192705-01022008>) Changed the permissions $libdir i.e.
/usr/lib/pgs<SPAN class=928192705-01022008>q</SPAN>l to 777</SPAN><BR><SPAN
class=928192705-01022008>d</SPAN>) Hardcoded the path /usr/lib/pgsql in this
test.sql<BR><SPAN class=928192705-01022008>e</SPAN>) We also tried hardcoding
the path /usr/lib/pgsql instead of $libdir in lwpostgis.sql when we tried
loading functions and types in lwpostgis.sql</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=928192705-01022008>f) When I hardcode
the path /usr/lib/pgsql - it gives the following error - <STRONG><U>could not
load library "/usr/lib/pgsql/liblwgeom.so.1.2": /usr/lib/pgsql/liblwgeom.so.1.2:
undefined symbol: nth</U></STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=928192705-01022008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=928192705-01022008> </SPAN></FONT></DIV>
<DIV><BR><FONT face=Arial size=2>Can somebody please guide us or give directions
what can be done. </FONT></DIV></DIV><p class=MsoNormal><strong><span style='font-size:24.0pt;font-family:Webdings;
color:green'>P</span></strong><strong><span style='font-size:10.0pt;font-family:
"Palatino Linotype","serif";color:green'> Please do not print this email unless it is absolutely necessary. Spread environmental awareness.</span></strong><span style='font-family:"Arial","sans-serif"'><o:p></o:p></span></p>
<p> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. </p>
<p>WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. </p>
<p>
www.wipro.com
</p>
</BODY></HTML>