[asterisk-dev] Asterisk - 13.6.0 - While bring up Asterisk seeing error "undefined symbol":

Matthew Jordan mjordan at digium.com
Thu Dec 31 08:32:29 CST 2015


On Thu, Dec 31, 2015 at 6:20 AM, Boobalan M <boobalan.mb at plintron.com>
wrote:

> Hi Team,
>
>
>
> We are encountering below issue often when try to make asterisk up.
>
>
>
> "
>
> [Dec 31 13:31:35] WARNING[17782]: loader.c:553 load_dynamic_module: Error
> loading module 'app_voicemail.so':
> /usr/lib64/asterisk/modules/app_voicemail.so: undefined symbol:
> ast_say_date_with_format
>
> "
>
>
>
> This issue we can able to solve rebuilding whole asterisk only. But some
> times, rebuild also doesn't work.
>
>
>
> Both Asterisk logs and symbols details of one of the modules(
> app_voicemail.so) from error list are attached.
>
>
>
> We could see “ast_say_date_with_format” is marked as undefined . This we
> are saying from “nm --demangle app_voicemail.so” output. But I am not
> sure why it often comes.
>
>
>
> Can you please suggestion on this to sort it out since we are facing this
> issue very often.
>
>
>

ast_say_date_with_format is a function pointer, defined in say.h:

SAY_EXTERN int (* ast_say_date_with_format)(struct ast_channel *chan,
time_t t, const char *ints, const char *lang, const char *format, const
char *timezone) SAY_INIT(ast_say_date_with_format);

As the documentation in that header file explains, a module must assign
these function pointers if they wish to change the default functionality
from the internal implementation in say.c. You'll note that this is done by
a constructor function in say.c:

/*! \brief
 * remap the 'say' functions to use those in this file
 */
static void __attribute__((constructor)) __say_init(void)
{
    ast_say_number_full = say_number_full;
    ast_say_enumeration_full = say_enumeration_full;
    ast_say_digit_str_full = say_digit_str_full;
    ast_say_character_str_full = say_character_str_full;
    ast_say_phonetic_str_full = say_phonetic_str_full;
    ast_say_datetime = say_datetime;
    ast_say_time = say_time;
    ast_say_date = say_date;
    ast_say_datetime_from_now = say_datetime_from_now;
    ast_say_date_with_format = say_date_with_format;
}

As well, if loaded, app_playback will override this in its say_init_mode
function. This allows it to change the hardcoded 'say' functions in the
core with the functionality provided by say.conf.

All of this is to say: ast_say_date_with_format is absolutely a defined
function pointer. I'm not sure what compiler you're using, what you've
modified, or how you're building Asterisk, but in all the tens of thousands
of builds I've seen done with both gcc and clang, I've never seen either
compiler have a problem finding the declaration of this function pointer.

The fact that your Errors.txt file is littered with many other symbol
resolution issues makes me think that you have 'tweaked' something,
attempted to build on a very non-standard platform, or are otherwise
operating outside the bounds of the usual build system.

Matt

-- 
Matthew Jordan
Digium, Inc. | Director of Technology
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20151231/79f27486/attachment.html>


More information about the asterisk-dev mailing list