[asterisk-dev] undefined symbol: PQsetdbLogin

Joel Jn-Francois voirtech at gmail.com
Sun May 24 18:15:18 CDT 2009


After no success with everything I tried, I downgraded to asterisk 1.4.25
and went back to my original code which worked perfectly on asterisk
1.4.21.  However, I am getting the same undefined symbol: PQsetdbLogin error
in 1.4.25.  What I forgot to mention though, is that the module that is
working in asterisk 1.4.21 is running on a different server.  Below are the
specs for both servers:

*Server with asterisk 1.4.21 with my asterisk c module running perfectly:*
model name      : Intel(R) Pentium(R) 4 CPU 3.00GHz
processor       : 2
cpu MHz         : 3 Ghz
Operating System:  Fedora Core 5

*Server with asterisk 1.4.25/1.6.1 that gives me undefined symbol:
PQsetdbLogin when I tried to load the module in asterisk. This happens even
though I include <depend>pgsql</depend> in the MODULEINFO in my source code.
*model name      : Dual-Core AMD Opteron(tm) Processor 1216 HE
processor       : 2
cpu MHz         : 2.2 Ghz
cpu cores       : 2
clflush size    : 64
cache_alignment : 64
Operating System: Centos 5 (64 bit)

I hope this information will shed some more light into my problem.

Thanks everyone.




On Fri, May 22, 2009 at 9:23 PM, Joel Jn-Francois <voirtech at gmail.com>wrote:

> >>Do you build your module in the Asterisk tree or outside of it? The
> >>MODULEINFO section is used by the Asterisk build system when ou build a
> >>module in the tree.
>
> I do the build of my module in Asterisk tree.  The module is in the
> asterisk source apps folder.  I run make, then make install and  the module
> compiles perfectly without any errors.
>
>
>
>
>
> On Fri, May 22, 2009 at 8:10 PM, Tzafrir Cohen <tzafrir.cohen at xorcom.com>wrote:
>
>> On Fri, May 22, 2009 at 11:06:55AM -0400, Joel Jn-Francois wrote:
>> > >> You need to link against libpq when you link the asterisk binary (the
>> > >> gcc -o / ld stage), e.g. -lpq.
>> > >>
>> >
>> > > And the way to do this is to place the following comment within your C
>> > source
>> > > file:
>> > >
>> > >/*** MODULEINFO
>> > >  <depend>pgsql</depend>
>> > > ***/
>> >
>> >
>> > Thanks everyone for your help.  I did add the following to my code, but
>> I am
>> > still getting the exact error message.  I also made sure I deleted my
>> old
>> > module and made sure the new module that was created is the one with
>> > <depend>pgsql</depend>.
>> >
>> > /*** MODULEINFO
>> >    <depend>pgsql</depend>
>> >  ***/
>> >
>> > Is there something else that I am doing wrong?
>>
>> Do you build your module in the Asterisk tree or outside of it? The
>> MODULEINFO section is used by the Asterisk build system when you build a
>> module in the tree.
>>
>> --
>>               Tzafrir Cohen
>> icq#16849755              jabber:tzafrir.cohen at xorcom.com<jabber%3Atzafrir.cohen at xorcom.com>
>> +972-50-7952406           mailto:tzafrir.cohen at xorcom.com
>> http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir
>>
>> _______________________________________________
>> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>>
>> asterisk-dev mailing list
>> To UNSUBSCRIBE or update options visit:
>>   http://lists.digium.com/mailman/listinfo/asterisk-dev
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090524/2444d021/attachment.htm 


More information about the asterisk-dev mailing list