[SR-Users] undefined symbol error

Daniel-Constantin Mierla miconda at gmail.com
Tue May 24 20:48:34 CEST 2011


Hello,

On 5/24/11 8:41 PM, Bruno Bresciani wrote:
> Hi,
>
> Someone know tell me why kamailio generate the following error when I 
> try load the route.so module:
>
> May 24 10:21:43 sswpst00 kamailio: ERROR: <core> [sr_module.c:523]: 
> ERROR: load_module: could not open module 
> </home2/local/kamailio/lib/kamailio/modules/route.so>: 
> /home2/local/kamailio/lib/kamailio/modules/route.so: undefined symbol: 
> db_use_table
>
> I don't know why this error have been generate. I'm porting this 
> module to use with kamailio 3.1.2.
starting with v3.0, there are internal libraries that you have to link 
your module against.

Since your module uses connection to database, you need to link against 
lib srdb1. Probably you need also lib kcore if your module was developed 
for kamailio 1.x.

What you need to do is to list the libraries in Makefile of the module, 
in SER_LIBS variable. See modules_k/msilo/Makefile for some example that 
might fit your module dependencies as well.

Very likely you should have in Makefile the line:
DEFS+=-DOPENSER_MOD_INTERFACE

Be careful if you export MI commands and statistics, even if the 
attributes are in module exports structure, you have to register them in 
mod_init function (see msilo and dispatcher modules for some examples).

Cheers,
Daniel

-- 
Daniel-Constantin Mierla -- http://www.asipto.com
http://linkedin.com/in/miconda -- http://twitter.com/miconda




More information about the sr-users mailing list