Miguel Molina
2010-Mar-15 19:40 UTC
[asterisk-users] Installing cdr_pgsql on asterisk 1.6.0.26
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, -- Ing. Miguel Molina Grupo de Tecnolog?a Millenium Phone Center PBX: (+57 1)6500800 ext. 1201 Fax: (+57 1)6500816 M?vil: (+57)3138873587
Miguel Molina
2010-Mar-16 14:20 UTC
[asterisk-users] [solved] Installing cdr_pgsql on asterisk 1.6.0.26
Miguel Molina escribi?:> 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, > >Answering myself, I found the solution! I cheched the config.log file that ./configure leaves, finding this: configure:27619: checking for pg_config configure:27637: found /usr/bin/pg_config configure:27649: result: /usr/bin/pg_config configure:27693: checking for PQescapeStringConn in -lpq configure:27728: gcc -o conftest -g -O2 conftest.c -lpq -L/usr/lib -lz -lm >&5 */usr/bin/ld: cannot find -lz* collect2: ld returned 1 exit status configure:27734: $? = 1 configure: failed program was: 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! configure:27619: checking for pg_config configure:27637: found /usr/bin/pg_config configure:27649: result: /usr/bin/pg_config configure:27693: checking for PQescapeStringConn in -lpq configure:27728: gcc -o conftest -g -O2 conftest.c -lpq -L/usr/lib -lz -lm >&5 configure:27734: $? = 0 *configure:27752: result: yes* So it was not PostgreSQL fault... now everything worked and cdr_pgsql.so is checked on the menuconfig, yay! Learned a little bit more from this... hope it helps someone with a similar build issue. ;-) Cheers, -- Ing. Miguel Molina Grupo de Tecnolog?a Millenium Phone Center -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100316/014e81e4/attachment.htm