unispeech / asterisk-unimrcp

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

Doesnt compile on fresh ubuntu 14.04 #5

Closed gzvido closed 7 years ago

gzvido commented 8 years ago
****************************** REPORT ******************************

Asterisk version.............. : 11.7.0~dfsg-1ubuntu1
UniMRCP version............... : 1.3.0
UniMRCP modules version....... : 1.3.1

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

********************************************************************

Making all in res-speech-unimrcp
make[1]: Entering directory `/root/unimrcp/asterisk-unimrcp-1.3.1/res-speech-unimrcp'
  CC     res_speech_unimrcp.lo
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
../include/ast_compat_defs.h:56:5: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #if AST_VERSION_AT_LEAST(1,8,0)
     ^
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
../include/ast_compat_defs.h:65:6: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #if !AST_VERSION_AT_LEAST(11,0,0)
      ^
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
../include/ast_compat_defs.h:84:5: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #if AST_VERSION_AT_LEAST(10,0,0)
     ^
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
../include/ast_compat_defs.h:92:5: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #if AST_VERSION_AT_LEAST(1,8,0)
     ^
In file included from res_speech_unimrcp.c:28:0:
../include/ast_compat_defs.h:100:24: error: conflicting types for ‘ast_format_clear’
 static APR_INLINE void ast_format_clear(ast_format_compat *format)
                        ^
In file included from /usr/include/asterisk/abstract_jb.h:35:0,
                 from /usr/include/asterisk/channel.h:126,
                 from ../include/ast_compat_defs.h:32,
                 from res_speech_unimrcp.c:28:
/usr/include/asterisk/format.h:312:6: note: previous declaration of ‘ast_format_clear’ was here
 void ast_format_clear(struct ast_format *format);
      ^
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
../include/ast_compat_defs.h:106:5: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #if AST_VERSION_AT_LEAST(13,0,0)
     ^
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
../include/ast_compat_defs.h:176:5: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #if AST_VERSION_AT_LEAST(13,0,0)
     ^
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
../include/ast_compat_defs.h:177:7: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #elif AST_VERSION_AT_LEAST(10,0,0)
       ^
In file included from res_speech_unimrcp.c:28:0:
../include/ast_compat_defs.h: In function ‘ast_channel_set_readformat’:
../include/ast_compat_defs.h:189:2: warning: passing argument 2 of ‘ast_set_read_format’ makes pointer from integer without a cast [enabled by default]
  ast_set_read_format(chan, format->id);
  ^
In file included from ../include/ast_compat_defs.h:32:0,
                 from res_speech_unimrcp.c:28:
/usr/include/asterisk/channel.h:1802:5: note: expected ‘struct ast_format *’ but argument is of type ‘int’
 int ast_set_read_format(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_set_writeformat’:
../include/ast_compat_defs.h:193:2: warning: passing argument 2 of ‘ast_set_write_format’ makes pointer from integer without a cast [enabled by default]
  ast_set_write_format(chan, format->id);
  ^
In file included from ../include/ast_compat_defs.h:32:0,
                 from res_speech_unimrcp.c:28:
/usr/include/asterisk/channel.h:1827:5: note: expected ‘struct ast_format *’ but argument is of type ‘int’
 int ast_set_write_format(struct ast_channel *chan, struct ast_format *format);
     ^
../include/ast_compat_defs.h: At top level:
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
../include/ast_compat_defs.h:197:5: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #if AST_VERSION_AT_LEAST(11,0,0)
     ^
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
../include/ast_compat_defs.h:216:7: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #elif AST_VERSION_AT_LEAST(10,0,0)
       ^
In file included from res_speech_unimrcp.c:28:0:
../include/ast_compat_defs.h: In function ‘ast_channel_get_speechreadformat’:
../include/ast_compat_defs.h:238:22: error: dereferencing pointer to incomplete type
  raw_format.id = chan->rawreadformat;
                      ^
../include/ast_compat_defs.h: In function ‘ast_channel_get_speechwriteformat’:
../include/ast_compat_defs.h:245:22: error: dereferencing pointer to incomplete type
  raw_format.id = chan->rawwriteformat;
                      ^
../include/ast_compat_defs.h: In function ‘ast_channel_get_readformat’:
../include/ast_compat_defs.h:252:19: error: dereferencing pointer to incomplete type
  format->id = chan->readformat;
                   ^
../include/ast_compat_defs.h: In function ‘ast_channel_get_writeformat’:
../include/ast_compat_defs.h:259:19: error: dereferencing pointer to incomplete type
  format->id = chan->writeformat;
                   ^
../include/ast_compat_defs.h: In function ‘ast_frame_get_dtmfkey’:
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
../include/ast_compat_defs.h:270:5: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #if AST_VERSION_AT_LEAST(1,8,0)
     ^
In file included from res_speech_unimrcp.c:28:0:
../include/ast_compat_defs.h:273:2: error: incompatible types when returning type ‘union ast_frame_subclass’ but ‘int’ was expected
  return f->subclass;
  ^
../include/ast_compat_defs.h: In function ‘ast_frame_get_data’:
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
../include/ast_compat_defs.h:279:5: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #if AST_VERSION_AT_LEAST(1,6,1)
     ^
In file included from res_speech_unimrcp.c:28:0:
../include/ast_compat_defs.h:282:2: error: cannot convert to a pointer type
  return (void *)(f->data);
  ^
../include/ast_compat_defs.h: In function ‘ast_frame_set_data’:
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
../include/ast_compat_defs.h:288:5: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #if AST_VERSION_AT_LEAST(1,6,1)
     ^
In file included from res_speech_unimrcp.c:28:0:
../include/ast_compat_defs.h:291:10: error: incompatible types when assigning to type ‘union <anonymous>’ from type ‘void *’
  f->data = data;
          ^
../include/ast_compat_defs.h: In function ‘ast_frame_set_format’:
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
../include/ast_compat_defs.h:297:5: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #if AST_VERSION_AT_LEAST(13,0,0)
     ^
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
../include/ast_compat_defs.h:299:7: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #elif AST_VERSION_AT_LEAST(10,0,0)
       ^
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
../include/ast_compat_defs.h:301:7: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #elif AST_VERSION_AT_LEAST(1,8,0)
       ^
In file included from res_speech_unimrcp.c:28:0:
../include/ast_compat_defs.h:304:14: error: incompatible types when assigning to type ‘union ast_frame_subclass’ from type ‘int’
  f->subclass = format->id;
              ^
../include/ast_compat_defs.h: In function ‘ast_uri_encode_http’:
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
../include/ast_compat_defs.h:313:5: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #if AST_VERSION_AT_LEAST(10,0,0)
     ^
In file included from res_speech_unimrcp.c:28:0:
../include/ast_compat_defs.h:316:2: error: incompatible type for argument 4 of ‘ast_uri_encode’
  return ast_uri_encode(string, outbuf, buflen, 1);
  ^
In file included from /usr/include/asterisk/config.h:30:0,
                 from /usr/include/asterisk/channel.h:143,
                 from ../include/ast_compat_defs.h:32,
                 from res_speech_unimrcp.c:28:
/usr/include/asterisk/utils.h:280:7: note: expected ‘struct ast_flags’ but argument is of type ‘int’
 char *ast_uri_encode(const char *string, char *outbuf, int buflen, struct ast_flags spec);
       ^
res_speech_unimrcp.c: At top level:
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
res_speech_unimrcp.c:145:5: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #if AST_VERSION_AT_LEAST(1,8,0)
     ^
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
res_speech_unimrcp.c:172:5: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #if AST_VERSION_AT_LEAST(10,0,0)
     ^
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
res_speech_unimrcp.c:177:7: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #elif AST_VERSION_AT_LEAST(1,6,0)
       ^
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
res_speech_unimrcp.c:669:5: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #if AST_VERSION_AT_LEAST(12,0,0)
     ^
res_speech_unimrcp.c: In function ‘uni_recog_speech_result_build’:
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
res_speech_unimrcp.c:719:5: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #if AST_VERSION_AT_LEAST(1,6,0)
     ^
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
res_speech_unimrcp.c:766:5: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #if AST_VERSION_AT_LEAST(1,6,0)
     ^
res_speech_unimrcp.c:769:17: error: ‘struct ast_speech_result’ has no member named ‘next’
    speech_result->next = last_speech_result;
                 ^
res_speech_unimrcp.c: At top level:
res_speech_unimrcp.c:1208:2: warning: initialization from incompatible pointer type [enabled by default]
  uni_recog_create,
  ^
res_speech_unimrcp.c:1208:2: warning: (near initialization for ‘ast_engine.create’) [enabled by default]
res_speech_unimrcp.c:1210:2: warning: initialization from incompatible pointer type [enabled by default]
  uni_recog_load_grammar,
  ^
res_speech_unimrcp.c:1210:2: warning: (near initialization for ‘ast_engine.load’) [enabled by default]
res_speech_unimrcp.c:1211:2: warning: initialization from incompatible pointer type [enabled by default]
  uni_recog_unload_grammar,
  ^
res_speech_unimrcp.c:1211:2: warning: (near initialization for ‘ast_engine.unload’) [enabled by default]
res_speech_unimrcp.c:1212:2: warning: initialization from incompatible pointer type [enabled by default]
  uni_recog_activate_grammar,
  ^
res_speech_unimrcp.c:1212:2: warning: (near initialization for ‘ast_engine.activate’) [enabled by default]
res_speech_unimrcp.c:1213:2: warning: initialization from incompatible pointer type [enabled by default]
  uni_recog_deactivate_grammar,
  ^
res_speech_unimrcp.c:1213:2: warning: (near initialization for ‘ast_engine.deactivate’) [enabled by default]
res_speech_unimrcp.c:1217:2: warning: initialization from incompatible pointer type [enabled by default]
  uni_recog_change,
  ^
res_speech_unimrcp.c:1217:2: warning: (near initialization for ‘ast_engine.change’) [enabled by default]
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
res_speech_unimrcp.c:1218:5: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #if AST_VERSION_AT_LEAST(12,0,0)
     ^
res_speech_unimrcp.c: In function ‘uni_engine_config_load’:
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
res_speech_unimrcp.c:1284:5: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #if AST_VERSION_AT_LEAST(1,6,0)
     ^
res_speech_unimrcp.c:1288:60: error: macro "ast_config_load" requires 2 arguments, but only 1 given
  struct ast_config *cfg = ast_config_load(UNI_ENGINE_CONFIG);
                                                            ^
res_speech_unimrcp.c:1288:27: error: ‘ast_config_load’ undeclared (first use in this function)
  struct ast_config *cfg = ast_config_load(UNI_ENGINE_CONFIG);
                           ^
res_speech_unimrcp.c:1288:27: note: each undeclared identifier is reported only once for each function it appears in
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
res_speech_unimrcp.c:1294:5: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #if AST_VERSION_AT_LEAST(1,6,2)
     ^
res_speech_unimrcp.c: In function ‘load_module’:
<command-line>:0:25: error: missing binary operator before token "~"
../include/ast_compat_defs.h:43:20: note: in expansion of macro ‘ASTERISK_PATCH_VERSION’
      && (patch) <= ASTERISK_PATCH_VERSION))
                    ^
res_speech_unimrcp.c:1448:5: note: in expansion of macro ‘AST_VERSION_AT_LEAST’
 #if AST_VERSION_AT_LEAST(10,0,0)
     ^
res_speech_unimrcp.c:1471:21: warning: assignment makes pointer from integer without a cast [enabled by default]
  ast_engine.formats = AST_FORMAT_SLINEAR;
                     ^
make[1]: *** [res_speech_unimrcp.lo] Error 1
make[1]: Leaving directory `/root/unimrcp/asterisk-unimrcp-1.3.1/res-speech-unimrcp'
make: *** [all-recursive] Error 1
achaloyan commented 8 years ago

Since the Asterisk version "11.7.0~dfsg-1ubuntu1" is not in the canonical "MAJOR.MINOR.PATCH" format, the corresponding m4 macro failed to determine the version.

You can either enhance the macro to take into consideration additional optional suffixes like "~dfsg-1ubuntu1" or explicitly specify the version number by passing it to ./configure as follows:

./configure --with-asterisk-version=11.7.0

achaloyan commented 7 years ago

Starting from the commit c81b2877d48275713ed72f2c5464c07ae5c76a07, the Asterisk version number should be properly determined by stripping off trailing characters such as "~dfsg-1ubuntu1" in your case.

stolendata commented 7 years ago

Sorry to comment on a closed issue, but I'm just putting this info out here for others to find:

This problem also affects other version schemes of Asterisk such as f.e. Certified Asterisk version 13.13-cert2. If you run into the same problem you solve it the same way, by checking which patch-version your release is and then configuring --with-asterisk-version=13.13.0 (or what's appropriate).

achaloyan commented 7 years ago

Right, thanks for your note.