[prev in list] [next in list] [prev in thread] [next in thread] 

List:       asterisk-dev
Subject:    Re: [asterisk-dev] Can't load module
From:       Alessandro Carminati <alessandro.carminati () gmail ! com>
Date:       2013-12-26 19:52:01
Message-ID: CAPp5cGR_U5PM0GdtD-J9CuReaOn8Bab4qvAfPduxmNLpKLJLGA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hello Kevin,
thanks for your answer.

I spent a little more time and I found myself a solution, but not an
explaination.
I found that my symbols stay in a part of spandsp library which normally is
not linked by make utility by default.
It's still not clear to me, I found my symbols within libspandsp.so.2.0.0
which is the main SpanDSP file, but my symbols were not linked without
libspandsp-sim.so.2.0.0
I fixed all adding -lspandsp-sim in the SPANDSP_LIB of the makeopts file.
Now I can begin to test my brand new app which let me receive a FSK message.
If it is of some interest for someone, I will post the updates.

Regards.
Alessandro Carminati



On Thu, Dec 26, 2013 at 7:02 PM, Kevin Harwell <kharwell@digium.com> wrote:

> 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
>
>
> --
> _____________________________________________________________________
> -- 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
>

[Attachment #5 (text/html)]

<div dir="ltr"><div><div><div><div><div><span name="Kevin Harwell" class="">Hello \
Kevin,<br></span></div><span name="Kevin Harwell" class="">thanks for your \
answer.<br><br></span></div><span name="Kevin Harwell" class="">I spent a little more \
time and I found myself a solution, but not an explaination.<br> I found that my \
symbols stay in a part of spandsp library which normally is not linked by make \
utility by default.<br>It&#39;s still not clear to me, I found my symbols within \
libspandsp.so.2.0.0 which is the main SpanDSP file, but my symbols were not linked \
without libspandsp-sim.so.2.0.0<br> I fixed all adding -lspandsp-sim in the \
SPANDSP_LIB of the makeopts file.<br></span></div><div><span name="Kevin Harwell" \
class="">Now I can begin to test my brand new app which let me receive a FSK \
message.<br></span></div> <div><span name="Kevin Harwell" class="">If it is of some \
interest for someone, I will post the updates.<br><br></span></div><div \
class="gmail_extra"><span name="Kevin Harwell" class="">Regards.</span><br \
clear="all"><div> <div dir="ltr">Alessandro Carminati<br><br></div></div>
<br><br><div class="gmail_quote">On Thu, Dec 26, 2013 at 7:02 PM, Kevin Harwell <span \
dir="ltr">&lt;<a href="mailto:kharwell@digium.com" \
target="_blank">kharwell@digium.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> <div class="HOEnZb"><div class="h5">On Tue, 2013-12-24 at \
22:39 +0100, Alessandro Carminati wrote:<br> &gt; Hello everyone and merry xmas!<br>
&gt;<br>
&gt; These winter vacation I decided to spend some time in coding.<br>
&gt; I&#39;m still far from any appreciable result, but I soon faced a problem<br>
&gt; I can&#39;t even understand.<br>
&gt; My goal is produce a dialplan application to encode and decode fsk<br>
&gt; messages on audio channel.<br>
&gt; I choosed to use SpanDSP, mainly because it is already there for FAX<br>
&gt; operations.<br>
&gt; After a day coding, I finally had something to test.<br>
&gt; The build of the application ends without problem, but after Asterisk<br>
&gt; doesn&#39;t load the module complaining that &quot;Loader.c:423<br>
&gt; load_dynamic_module: Error loading module<br>
&gt; &#39;app_fsk.so&#39;: /usr/lib/asterisk/modules/app_fsk.so: undefined \
symbol:<br> &gt; preset_fsk_specs&quot;.<br>
&gt; Can&#39;t understand. SpanDSP library has been loaded, and<br>
&gt; res_fax_spandsp.so is also there as cli command confirm.<br>
&gt; Looking at symbols exported within the library, nm confirms &quot;000b48c0<br>
&gt; D preset_fsk_specs&quot; is there too.<br>
&gt; Can somebody hints me where to look to solve this module load issue?<br>
<br>
</div></div>It could have something to do with module load order.  If your \
module,<br> app_fsk, depends on another module and that module (in this case<br>
res_fax_spandsp) loads after your&#39;s then the symbols your module is<br>
looking for won&#39;t be there...yet.  Thus your module won&#39;t load, but<br>
res_fax_spandsp will when it comes time for it to load later.<br>
<br>
Make sure any dependent modules load before your module.  You can<br>
preload them in modules.conf or in your code in the module<br>
info/definition section make sure your module&#39;s load priority is higher<br>
than the dependency&#39;s (see load_pri in struct ast_module_info in<br>
module.h).<br>
<br>
<br>
&gt; Regards<br>
&gt; Alessandro Carminati<br>
<br>
<br>
Hope that helps,<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Kevin Harwell<br>
Digium, Inc. | Software Developer<br>
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA<br>
Check us out at: <a href="http://digium.com" target="_blank">http://digium.com</a> \
&amp; <a href="http://asterisk.org" target="_blank">http://asterisk.org</a><br> <br>
<br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" \
target="_blank">http://www.api-digital.com</a> --<br> <br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" \
target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br> \
</font></span></blockquote></div><br></div></div></div></div>



-- 
_____________________________________________________________________
-- 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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic