[asterisk-dev] Can't load module
Kevin Harwell
kharwell at digium.com
Thu Dec 26 12:02:24 CST 2013
On Tue, 2013-12-24 at 22:39 +0100, Alessandro Carminati wrote:
> Hello everyone and merry xmas!
>
> These winter vacation I decided to spend some time in coding.
> I'm still far from any appreciable result, but I soon faced a problem
> I can't even understand.
> My goal is produce a dialplan application to encode and decode fsk
> messages on audio channel.
> I choosed to use SpanDSP, mainly because it is already there for FAX
> operations.
> After a day coding, I finally had something to test.
> The build of the application ends without problem, but after Asterisk
> doesn't load the module complaining that "Loader.c:423
> load_dynamic_module: Error loading module
> 'app_fsk.so': /usr/lib/asterisk/modules/app_fsk.so: undefined symbol:
> preset_fsk_specs".
> Can't understand. SpanDSP library has been loaded, and
> res_fax_spandsp.so is also there as cli command confirm.
> Looking at symbols exported within the library, nm confirms "000b48c0
> D preset_fsk_specs" is there too.
> Can somebody hints me where to look to solve this module load issue?
It could have something to do with module load order. If your module,
app_fsk, depends on another module and that module (in this case
res_fax_spandsp) loads after your's then the symbols your module is
looking for won't be there...yet. Thus your module won't load, but
res_fax_spandsp will when it comes time for it to load later.
Make sure any dependent modules load before your module. You can
preload them in modules.conf or in your code in the module
info/definition section make sure your module's load priority is higher
than the dependency's (see load_pri in struct ast_module_info in
module.h).
> Regards
> Alessandro Carminati
Hope that helps,
--
Kevin Harwell
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
More information about the asterisk-dev
mailing list