unispeech / asterisk-unimrcp

UniMRCP modules for Asterisk
http://www.unimrcp.org/asterisk
GNU General Public License v2.0
48 stars 35 forks source link

Issue in Installing UniMRCP with Asterisk 16 in AWS EC2 instance #33

Closed siptain closed 4 years ago

siptain commented 5 years ago

Hi,

I am trying to install UniMRCP packages with Asterisk 16 but system is not able to do, please find errors logs below: In file included from ../include/ast_compat_defs.h:45:0, from res_speech_unimrcp.c:28: /usr/include/asterisk.h:20:1: error: unknown type name 'define' define AST_MODULE_SELF_SYM ^~ In file included from /usr/lib/gcc/x86_64-amazon-linux/7/include/stdint.h:9:0, from /usr/include/inttypes.h:27, from /usr/include/asterisk/compat.h:31, from /usr/include/asterisk.h:28, from ../include/ast_compat_defs.h:45, from res_speech_unimrcp.c:28: /usr/include/stdint.h:36:1: error: expected '=', ',', ';', 'asm' or 'attribute' before 'typedef' typedef signed char int8_t; ^~~ In file included from ../include/ast_compat_defs.h:45:0, from res_speech_unimrcp.c:28: /usr/include/asterisk.h:302:2: error: #error "Externally compiled modules must declare AST_MODULE_SELF_SYM."

error "Externally compiled modules must declare AST_MODULE_SELF_SYM."

^~~~~ In file included from res_speech_unimrcp.c:28:0: ../include/ast_compat_defs.h:118:23: error: conflicting types for 'ast_channel_set_readformat' static APR_INLINE int ast_channel_set_readformat(struct ast_channel chan, ast_format_compat format) ^~~~~~ In file included from ../include/ast_compat_defs.h:47:0, from res_speech_unimrcp.c:28: /usr/include/asterisk/channel.h:4144:6: note: previous declaration of 'ast_channel_set_readformat' was here void ast_channel_set_readformat(struct ast_channel chan, struct ast_format format); ^~~~~~ In file included from res_speech_unimrcp.c:28:0: ../include/ast_compat_defs.h:122:23: error: conflicting types for 'ast_channel_set_writeformat' static APR_INLINE int ast_channel_set_writeformat(struct ast_channel chan, ast_format_compat format) ^~~~~~~ In file included from ../include/ast_compat_defs.h:47:0, from res_speech_unimrcp.c:28: /usr/include/asterisk/channel.h:4145:6: note: previous declaration of 'ast_channel_set_writeformat' was here void ast_channel_set_writeformat(struct ast_channel chan, struct ast_format format); ^~~~~~~ In file included from res_speech_unimrcp.c:28:0: ../include/ast_compat_defs.h: In function 'ast_channel_get_rawreadformat': ../include/ast_compat_defs.h:140:2: warning: implicit declaration of function 'ast_format_copy'; did you mean 'ast_format_cmp'? [-Wimplicit-function-declaration] ast_format_copy(format, ast_channel_rawreadformat(chan)); ^~~~~~~ ast_format_cmp res_speech_unimrcp.c: At top level: res_speech_unimrcp.c:31:23: error: expected declaration specifiers or '...' before string constant ASTERISK_FILE_VERSION(FILE, "$Revision: $") ^~~~ res_speech_unimrcp.c:31:33: error: expected declaration specifiers or '...' before string constant ASTERISK_FILE_VERSION(FILE, "$Revision: $") ^~~~~~ res_speech_unimrcp.c:1205:2: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] uni_recog_change_results_type, ^~~~~~~~~ res_speech_unimrcp.c:1205:2: note: (near initialization for 'ast_engine.get_setting') res_speech_unimrcp.c:1206:2: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] uni_recog_get ^~~~~ res_speech_unimrcp.c:1206:2: note: (near initialization for 'ast_engine.change_results_type') res_speech_unimrcp.c: In function 'load_module': res_speech_unimrcp.c:1420:23: warning: implicit declaration of function 'ast_format_cap_alloc_nolock'; did you mean 'ast_format_cap_alloc'? [-Wimplicit-function-declaration] ast_engine.formats = ast_format_cap_alloc_nolock(); ^~~~~~~ ast_format_cap_alloc res_speech_unimrcp.c:1420:21: warning: assignment makes pointer from integer without a cast [-Wint-conversion] ast_engine.formats = ast_format_cap_alloc_nolock(); ^ res_speech_unimrcp.c:1426:20: error: storage size of 'format' isn't known struct ast_format format; ^~ res_speech_unimrcp.c:1427:2: warning: implicit declaration of function 'ast_format_set'; did you mean 'ast_format_cmp'? [-Wimplicit-function-declaration] ast_format_set(&format, AST_FORMAT_SLINEAR, 0); ^~~~~~ ast_format_cmp res_speech_unimrcp.c:1427:26: error: 'AST_FORMAT_SLINEAR' undeclared (first use in this function); did you mean 'AST_FORMAT_CMP_EQUAL'? ast_format_set(&format, AST_FORMAT_SLINEAR, 0); ^~~~~~ AST_FORMAT_CMP_EQUAL res_speech_unimrcp.c:1427:26: note: each undeclared identifier is reported only once for each function it appears in res_speech_unimrcp.c:1428:2: warning: implicit declaration of function 'ast_format_cap_add'; did you mean 'ast_format_cap_alloc'? [-Wimplicit-function-declaration] ast_format_cap_add(ast_engine.formats, &format); ^~~~~~ ast_format_cap_alloc make[1]: [res_speech_unimrcp.lo] Error 1 make[1]: Leaving directory `/usr/src/uni-ast-package-1.1.0/modules/res-speech-unimrcp' make: [all-recursive] Error 1 Making install in res-speech-unimrcp make[1]: Entering directory `/usr/src/uni-ast-package-1.1.0/modules/res-speech-unimrcp' if /bin/sh ../libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME=\"asterisk-unimrcp\" -DPACKAGE_TARNAME=\"asterisk-unimrcp\" -DPACKAGE_VERSION=\"1.1.0\" -DPACKAGE_STRING=\"asterisk-unimrcp\ 1.1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"asterisk-unimrcp\" -DVERSION=\"1.1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DUNIMRCP_DIR_LOCATION=\"/usr/local/unimrcp\" -DASTERISK_MAJOR_VERSION=14 -DASTERISK_MINOR_VERSION=6 -DASTERISK_PATCH_VERSION=0 -I. -I. -I../include -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread -I/usr/local/unimrcp/include -I/usr/local/unimrcp/include/apr-1 -I/usr/include -g -O2 -MT res_speech_unimrcp.lo -MD -MP -MF ".deps/res_speech_unimrcp.Tpo" -c -o res_speech_unimrcp.lo res_speech_unimrcp.c; \ then mv -f ".deps/res_speech_unimrcp.Tpo" ".deps/res_speech_unimrcp.Plo"; else rm -f ".deps/res_speech_unimrcp.Tpo"; exit 1; fi gcc -DPACKAGE_NAME=\"asterisk-unimrcp\" -DPACKAGE_TARNAME=\"asterisk-unimrcp\" -DPACKAGE_VERSION=\"1.1.0\" "-DPACKAGE_STRING=\"asterisk-unimrcp 1.1.0\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"asterisk-unimrcp\" -DVERSION=\"1.1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DUNIMRCP_DIR_LOCATION=\"/usr/local/unimrcp\" -DASTERISK_MAJOR_VERSION=14 -DASTERISK_MINOR_VERSION=6 -DASTERISK_PATCH_VERSION=0 -I. -I. -I../include -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread -I/usr/local/unimrcp/include -I/usr/local/unimrcp/include/apr-1 -I/usr/include -g -O2 -MT res_speech_unimrcp.lo -MD -MP -MF .deps/res_speech_unimrcp.Tpo -c res_speech_unimrcp.c -fPIC -DPIC -o .libs/res_speech_unimrcp.o In file included from ../include/ast_compat_defs.h:45:0, from res_speech_unimrcp.c:28: /usr/include/asterisk.h:20:1: error: unknown type name 'define' define AST_MODULE_SELF_SYM ^~ In file included from /usr/lib/gcc/x86_64-amazon-linux/7/include/stdint.h:9:0, from /usr/include/inttypes.h:27, from /usr/include/asterisk/compat.h:31, from /usr/include/asterisk.h:28, from ../include/ast_compat_defs.h:45, from res_speech_unimrcp.c:28: /usr/include/stdint.h:36:1: error: expected '=', ',', ';', 'asm' or 'attribute' before 'typedef' typedef signed char int8_t; ^~~ In file included from ../include/ast_compat_defs.h:45:0, from res_speech_unimrcp.c:28: /usr/include/asterisk.h:302:2: error: #error "Externally compiled modules must declare AST_MODULE_SELF_SYM."

error "Externally compiled modules must declare AST_MODULE_SELF_SYM."

^~~~~ In file included from res_speech_unimrcp.c:28:0: ../include/ast_compat_defs.h:118:23: error: conflicting types for 'ast_channel_set_readformat' static APR_INLINE int ast_channel_set_readformat(struct ast_channel chan, ast_format_compat format) ^~~~~~ In file included from ../include/ast_compat_defs.h:47:0, from res_speech_unimrcp.c:28: /usr/include/asterisk/channel.h:4144:6: note: previous declaration of 'ast_channel_set_readformat' was here void ast_channel_set_readformat(struct ast_channel chan, struct ast_format format); ^~~~~~ In file included from res_speech_unimrcp.c:28:0: ../include/ast_compat_defs.h:122:23: error: conflicting types for 'ast_channel_set_writeformat' static APR_INLINE int ast_channel_set_writeformat(struct ast_channel chan, ast_format_compat format) ^~~~~~~ In file included from ../include/ast_compat_defs.h:47:0, from res_speech_unimrcp.c:28: /usr/include/asterisk/channel.h:4145:6: note: previous declaration of 'ast_channel_set_writeformat' was here void ast_channel_set_writeformat(struct ast_channel chan, struct ast_format format); ^~~~~~~ In file included from res_speech_unimrcp.c:28:0: ../include/ast_compat_defs.h: In function 'ast_channel_get_rawreadformat': ../include/ast_compat_defs.h:140:2: warning: implicit declaration of function 'ast_format_copy'; did you mean 'ast_format_cmp'? [-Wimplicit-function-declaration] ast_format_copy(format, ast_channel_rawreadformat(chan)); ^~~~~~~ ast_format_cmp res_speech_unimrcp.c: At top level: res_speech_unimrcp.c:31:23: error: expected declaration specifiers or '...' before string constant ASTERISK_FILE_VERSION(FILE, "$Revision: $") ^~~~ res_speech_unimrcp.c:31:33: error: expected declaration specifiers or '...' before string constant ASTERISK_FILE_VERSION(FILE, "$Revision: $") ^~~~~~ res_speech_unimrcp.c:1205:2: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] uni_recog_change_results_type, ^~~~~~~~~ res_speech_unimrcp.c:1205:2: note: (near initialization for 'ast_engine.get_setting') res_speech_unimrcp.c:1206:2: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] uni_recog_get ^~~~~ res_speech_unimrcp.c:1206:2: note: (near initialization for 'ast_engine.change_results_type') res_speech_unimrcp.c: In function 'load_module': res_speech_unimrcp.c:1420:23: warning: implicit declaration of function 'ast_format_cap_alloc_nolock'; did you mean 'ast_format_cap_alloc'? [-Wimplicit-function-declaration] ast_engine.formats = ast_format_cap_alloc_nolock(); ^~~~~~~ ast_format_cap_alloc res_speech_unimrcp.c:1420:21: warning: assignment makes pointer from integer without a cast [-Wint-conversion] ast_engine.formats = ast_format_cap_alloc_nolock(); ^ res_speech_unimrcp.c:1426:20: error: storage size of 'format' isn't known struct ast_format format; ^~ res_speech_unimrcp.c:1427:2: warning: implicit declaration of function 'ast_format_set'; did you mean 'ast_format_cmp'? [-Wimplicit-function-declaration] ast_format_set(&format, AST_FORMAT_SLINEAR, 0); ^~~~~~ ast_format_cmp res_speech_unimrcp.c:1427:26: error: 'AST_FORMAT_SLINEAR' undeclared (first use in this function); did you mean 'AST_FORMAT_CMP_EQUAL'? ast_format_set(&format, AST_FORMAT_SLINEAR, 0); ^~~~~~ AST_FORMAT_CMP_EQUAL res_speech_unimrcp.c:1427:26: note: each undeclared identifier is reported only once for each function it appears in res_speech_unimrcp.c:1428:2: warning: implicit declaration of function 'ast_format_cap_add'; did you mean 'ast_format_cap_alloc'? [-Wimplicit-function-declaration] ast_format_cap_add(ast_engine.formats, &format); ^~~~~~ ast_format_cap_alloc make[1]: [res_speech_unimrcp.lo] Error 1 make[1]: Leaving directory `/usr/src/uni-ast-package-1.1.0/modules/res-speech-unimrcp' make: [install-recursive] Error 1

achaloyan commented 5 years ago

The question is which version of astersik-unimrcp package you use. Support for Asterisk 16 has been added in 1.5.2 version, which can be downloaded from

http://unimrcp.org/project/component-view/asterisk

siptain commented 5 years ago

Hi Arsen,

Thanks for your response. Please find below the Environment detail:

** REPORT **

Asterisk version.............. : 16.4.1 UniMRCP version............... : 1.1.0 UniMRCP modules version....... : 1.5.2

Compiler...................... : gcc Compiler flags................ : -g -O2 Preprocessor definitions...... : Linker flags.................. :

Modules install path...........: /usr/lib/asterisk/modules Configuration install path.....: /etc/asterisk XML doc install path...........: /var/lib/asterisk/documentation/thirdparty

Speech resource module.........: yes Application module.............: yes


[root@ip-172-31-91-35 asterisk-unimrcp-1.5.2]# make Making all in res-speech-unimrcp make[1]: Entering directory `/usr/src/asterisk-unimrcp-1.5.2/res-speech-unimrcp' CC res_speech_unimrcp.lo res_speech_unimrcp.c:45:28: fatal error: unimrcp_client.h: No such file or directory

include

                        ^

compilation terminated. make[1]: [res_speech_unimrcp.lo] Error 1 make[1]: Leaving directory `/usr/src/asterisk-unimrcp-1.5.2/res-speech-unimrcp' make: [all-recursive] Error 1

Best Regards Siptain

Am 16.07.2019 um 00:41 schrieb Arsen Chaloyan notifications@github.com:

The question is which version of astersik-unimrcp package you use. Support for Asterisk 16 has been added in 1.5.2 version, which can be downloaded from

http://unimrcp.org/project/component-view/asterisk

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

achaloyan commented 5 years ago

Hi Siptain,

UniMRCP version............... : 1.1.0

UniMRCP 1.1.0 was released back in 2013. Make sure you have the latest packages installed listed here

http://unimrcp.org/project/featured-view

siptain commented 5 years ago

Hi Arsen,

We have installed latest version of uniMRCP 1.6.0 but still same error while on physical server it works.

On physical server during setup uniMRCP update takes 500+ dependencies but in case of AWS it takes 30-40 dependencies while update.

Is there any configuration requirement for AWS installation ?

Thanks Siptain

Am 18.07.2019 um 01:53 schrieb Arsen Chaloyan notifications@github.com:

Hi Siptain,

UniMRCP version............... : 1.1.0

UniMRCP 1.1.0 was released back in 2013. Make sure you have the latest packages installed listed here

http://unimrcp.org/project/featured-view

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

achaloyan commented 5 years ago

Hi Siptain,

UniMRCP can certainly be installed on both physical and virtual servers, including on AWS. There might be certain differences between the two installations in compiler, autotools, etc.

If you still encounter the following error

res_speech_unimrcp.c:45:28: fatal error: unimrcp_client.h: No such file or directory

include

then this simply means that the compiler cannot find the header file, which is supposed to be in /usr/local/unimrcp/include, if you install UniMRCP from source and in /opt/unimrcp/include for binary installation.

On physical server during setup uniMRCP update takes 500+ dependencies but in case of AWS it takes 30-40 dependencies while update.

Can you elaborate how you installed the packages and what the dependencies are that you refer to.