Hi All

I've compiled kamailio 3.2.0 with snmpstats module.
When trying to start the module I received the following message:

 0(28197) DEBUG: <core> [sr_module.c:515]: load_module: trying to load </usr/lib/kamailio/modules_k/
snmpstats.so>
 0(28197) ERROR: <core> [sr_module.c:523]: ERROR: load_module: could not open module </usr/lib/kamailio/modules_k/snmpstats.so>: /usr/lib/libnetsnmpagent.so.10: undefined symbol: boot_DynaLoader

I run it on CentOS 5.7

After digging Internet, I found the solution for the problem. I had to modify Makefile in snmpstats module's directory and recompile it.
I had to change BUILDAGENTLIBS env param

before change:

        BUILDAGENTLIBS =-L$(LOCALBASE)/lib -lnetsnmpmibs -lnetsnmpagent \
                -lnetsnmphelpers -lnetsnmp

after change:

        BUILDAGENTLIBS =-L$(LOCALBASE)/lib -lnetsnmpmibs -lnetsnmpagent \
                -lnetsnmphelpers -lnetsnmp \
                -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE \
                -L/usr/local/lib /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/DynaLoader/DynaLoader.a \
                -L/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE \
                -lperl -lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc \
                -lwrap \
                -lsensors \
                -lrpmdb -lrpm

After that I successfully started snmpstats module.

I don't know why I didn't have compilation errors before adding this linking info, but got problem when trying to run compiled module. Can you explain it ?
Do you know another way to solve the problem ?

Regards Adam