<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Miguel Molina escribió:
<blockquote cite="mid:4B9E8D11.9000103@millenium.com.co" type="cite">
<pre wrap="">Hi folks,
I am struggling to install cdr_pgsql in asterisk 1.6.0.26. When I do the
./configure, it complains about the function PQescapeStringConn not
existing in -lpq, so when I do a make menuconfig, I can't select the
cdr_pgsql module.
I am using CentOS 5.4 with the yum PGDG repository for 8.4 version. Some
of the installed packages are postgresql-libs, compat-postgresql-libs,
postgres, postgresql-contrib.
Any help would be very appreciated.
Thanks,
</pre>
</blockquote>
Answering myself, I found the solution!<br>
<br>
I cheched the config.log file that ./configure leaves, finding this:<br>
<br>
configure:27619: checking for pg_config<br>
configure:27637: found /usr/bin/pg_config<br>
configure:27649: result: /usr/bin/pg_config<br>
configure:27693: checking for PQescapeStringConn in -lpq<br>
configure:27728: gcc -o conftest -g -O2 conftest.c -lpq -L/usr/lib
-lz -lm >&5<br>
<b>/usr/bin/ld: cannot find -lz</b><br>
collect2: ld returned 1 exit status<br>
configure:27734: $? = 1<br>
configure: failed program was:<br>
<br>
Googling a little, I found that -lz is provided by the zlib-devel
package, which was not present. I installed it in a breeze with yum,
and voila!<br>
<br>
configure:27619: checking for pg_config<br>
configure:27637: found /usr/bin/pg_config<br>
configure:27649: result: /usr/bin/pg_config<br>
configure:27693: checking for PQescapeStringConn in -lpq<br>
configure:27728: gcc -o conftest -g -O2 conftest.c -lpq -L/usr/lib
-lz -lm >&5<br>
configure:27734: $? = 0<br>
<b>configure:27752: result: yes</b><br>
<br>
So it was not PostgreSQL fault... now everything worked and
cdr_pgsql.so is checked on the menuconfig, yay!<br>
<br>
Learned a little bit more from this... hope it helps someone with a
similar build issue. ;-)<br>
<br>
Cheers,<br>
<pre class="moz-signature" cols="72">--
Ing. Miguel Molina
Grupo de Tecnología
Millenium Phone Center
</pre>
</body>
</html>