[asterisk-speech-rec] Asterisk Restarting 127 Error with Lumenvox, Fix doesnt seem to work

David Merel david.merel at gmail.com
Sat Oct 11 15:39:48 CDT 2008


If you go to current issues with that latest Lumenvox release:
http://www.lumenvox.com/help/speechEngineAsterisk/installation/current-issues.htm
You will see they provided a fix to adjust the loader.c file in the Asterisk
source code.

I went ahead and downloaded the lastest Source code using the following
link:
http://downloads.digium.com/pub/asterisk/asterisk-1.4-current.tar.gz

I then editied the file Exactly as instructed, I am including a snippet of
that files AFTER adding the Lumenvox fix

In fact I am pasting before some of the code that comes before as well as
after just in case the instructions were incorrect and that the IF statement
needs to be modified or placed elsewhere

    wants_global = ast_test_flag(mod->info, AST_MODFLAG_GLOBAL_SYMBOLS);

    /* if we are being asked only to load modules that provide global
symbols,
       and this one does not, then close it and return */
    if (global_symbols_only && !wants_global) {
        while (!dlclose(lib));
        return NULL;
    }

    if ( !strcmp(resource, "res_speech_lumenvox.so") )
    {
    ast_log(LOG_NOTICE, "sleeping 2 seconds before loading module %s.\n",
resource);
    sleep(2);
    }

    /* if the system supports RTLD_NOLOAD, we can just 'promote' the flags
       on the already-opened library to what we want... if not, we have to
       close it and start over
    */
#if defined(HAVE_RTLD_NOLOAD) && !defined(__Darwin__)
    if (!dlopen(fn, RTLD_NOLOAD | (wants_global ? RTLD_LAZY | RTLD_GLOBAL :
RTLD_NOW | RTLD_LOCAL))) {
        ast_log(LOG_WARNING, "Unable to promote flags on module '%s': %s\n",
resource_in, dlerror());
        while (!dlclose(lib));
        free(resource_being_loaded);
        return NULL;
    }
#else
    while (!dlclose(lib));
    resource_being_loaded = NULL;

    /* start the load process again */

    if (!(resource_being_loaded = ast_calloc(1,
sizeof(*resource_being_loaded) + strlen(resource) + 1)))
        return NULL;

    strcpy(resource_being_loaded->resource, resource);

    if (!(lib = dlopen(fn, wants_global ? RTLD_LAZY | RTLD_GLOBAL : RTLD_NOW
| RTLD_LOCAL))) {
        ast_log(LOG_WARNING, "Error loading module '%s': %s\n", resource_in,
dlerror());
        free(resource_being_loaded);
        return NULL;
    }

    /* since the module was successfully opened, and it registered itself
       the previous time we did that, we're going to assume it worked this
       time too :) */
#endif

    AST_LIST_LAST(&module_list)->lib = lib;
    resource_being_loaded = NULL;

    return AST_LIST_LAST(&module_list);
}


After changing this I went to proceed with compiling

I went ahead and downloaded all the utilities needed to compile yum install
automake gcc-c++ autoconf libtool

Then I do a ./confgure no problems
Then I do a make, no problems
as soon as I do either make install or make bininstall (tried this as well
on a seperate machine)

I get a ton of errors which go on forever, but the following is the very end
where it quits

no such parameter
/usr/include/bits/types.h:45: error: declaration for parameter â__uint32_tâ
but           no such parameter
/usr/include/bits/types.h:44: error: declaration for parameter â__int32_tâ
but n          o such parameter
/usr/include/bits/types.h:43: error: declaration for parameter â__uint16_tâ
but           no such parameter
/usr/include/bits/types.h:42: error: declaration for parameter â__int16_tâ
but n          o such parameter
/usr/include/bits/types.h:41: error: declaration for parameter â__uint8_tâ
but n          o such parameter
/usr/include/bits/types.h:40: error: declaration for parameter â__int8_tâ
but no           such parameter
/usr/include/bits/types.h:37: error: declaration for parameter â__u_longâ
but no           such parameter
/usr/include/bits/types.h:36: error: declaration for parameter â__u_intâ but
no           such parameter
/usr/include/bits/types.h:35: error: declaration for parameter â__u_shortâ
but n          o such parameter
/usr/include/bits/types.h:34: error: declaration for parameter â__u_charâ
but no           such parameter
/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stddef.h:214: error:
declaration fo          r parameter âsize_tâ but no such parameter
loader.c:1007: error: expected â{â at end of input
make[1]: *** [loader.o] Error 1
make[1]: Leaving directory `/usr/src/asterisk-1.4.22/main'
make: *** [main-install] Error 2


Any ideas??? This is with the latest Bridge B22, following every direction
in Lumenvox as well as using Asterisk 1.4 and lumenvox 8.5 Engine

NOTE:
Btw, if I remove the modification specified in by Lumenvox in the loader.c
file, everything works with make install


I have also attached a zip file containing my loader.c file just in case
(this is with the lumenvox modification to fix the Asterisk restarting
problem)

Any help would be very appreciated
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-speech-rec/attachments/20081011/b0943c9f/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: loader.zip
Type: application/zip
Size: 8047 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-speech-rec/attachments/20081011/b0943c9f/attachment.zip 


More information about the asterisk-speech-rec mailing list