Problem compiling latest lcr with Asterisk channel driver support against Asterisk 13
Anon Ymous <[email protected]> Mon, 6 Jun 2016 11:29:34 +0200
| Newsgroups | gmane.linux.isdn.i4l.user |
|---|---|
| Message-ID | <CAEbdhogLSrX3ucf_A=KFND10OC9wiqt9LEZY3ZmiVmjvWHftyg@mail.gmail.com> |
Running CentOS 7.2.1511 (Core)
Build and installed latest Asterisk release 13.9.1 from their github.com
mirror at https://github.com/asterisk/asterisk
Cloned latest lcr from git://git.misdn.eu/lcr.git/
./configure is picking up the Asterisk installation and offers me building
"with Asterisk channel driver support"
Added #define ASTERISK_VERSION_NUM 130000 to chan_lcr.c to use
ast_version.h instead of version.h
Yet make keeps failing:
make all-recursive
make[1]: Entering directory `/root/_INSTALL/lcr'
Making all in include
make[2]: Entering directory `/root/_INSTALL/lcr/include'
make[3]: Entering directory `/root/_INSTALL/lcr/include'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/root/_INSTALL/lcr/include'
make[2]: Leaving directory `/root/_INSTALL/lcr/include'
make[2]: Entering directory `/root/_INSTALL/lcr'
gcc -DWITH_MISDN -DWITH_CRYPT -Wall
-DCONFIG_DATA="\"/usr/local/etc/lcr\""
-DSHARE_DATA="\"/usr/local/share/lcr\""
-DLOG_DIR="\"/usr/local/var/log/lcr\""
-DEXTENSION_DATA="\"/usr/local/var/lib/lcr/extensions\""
-Dast_tone_zone_sound=ast_tone_zone_sound -DAST_1_8_OR_HIGHER -g -O2
-D_GNU_SOURCE -fPIC -c chan_lcr.c -o chan_lcr.po
chan_lcr.c: In function ‘send_message’:
chan_lcr.c:397:7: warning: variable ‘rc’ set but not used
[-Wunused-but-set-variable]
int rc;
^
chan_lcr.c: In function ‘send_setup_to_lcr’:
chan_lcr.c:700:2: warning: #warning DISABLED DUE TO DOUBLE LOCKING PROBLEM
[-Wcpp]
#warning DISABLED DUE TO DOUBLE LOCKING PROBLEM
^
chan_lcr.c: In function ‘lcr_in_setup’:
chan_lcr.c:962:2: warning: passing argument 8 of ‘__ast_channel_alloc’ from
incompatible pointer type [enabled by default]
ast = ast_channel_alloc(1, AST_STATE_RESERVED, NULL, NULL, "", NULL, "",
"", 0, "%s/%d", lcr_type, ++glob_channel);
^
In file included from chan_lcr.c:148:0:
/usr/include/asterisk/channel.h:1161:2: note: expected ‘const struct
ast_assigned_ids *’ but argument is of type ‘char *’
__ast_channel_alloc(int needqueue, int state, const char *cid_num,
^
chan_lcr.c:962:2: error: incompatible type for argument 10 of
‘__ast_channel_alloc’
ast = ast_channel_alloc(1, AST_STATE_RESERVED, NULL, NULL, "", NULL, "",
"", 0, "%s/%d", lcr_type, ++glob_channel);
^
In file included from chan_lcr.c:148:0:
/usr/include/asterisk/channel.h:1161:2: note: expected ‘enum ama_flags’ but
argument is of type ‘char *’
__ast_channel_alloc(int needqueue, int state, const char *cid_num,
^
chan_lcr.c:1210:2: warning: implicit declaration of function
‘ast_format_set’ [-Wimplicit-function-declaration]
ast_format_set(ast_channel_rawwriteformat(ast)
,(options.law=='a')?AST_FORMAT_ALAW:AST_FORMAT_ULAW , 0);
^
chan_lcr.c:1210:69: error: ‘AST_FORMAT_ALAW’ undeclared (first use in this
function)
ast_format_set(ast_channel_rawwriteformat(ast)
,(options.law=='a')?AST_FORMAT_ALAW:AST_FORMAT_ULAW , 0);
^
chan_lcr.c:1210:69: note: each undeclared identifier is reported only once
for each function it appears in
chan_lcr.c:1210:85: error: ‘AST_FORMAT_ULAW’ undeclared (first use in this
function)
ast_format_set(ast_channel_rawwriteformat(ast)
,(options.law=='a')?AST_FORMAT_ALAW:AST_FORMAT_ULAW , 0);
^
chan_lcr.c:1211:2: warning: implicit declaration of function
‘ast_format_copy’ [-Wimplicit-function-declaration]
ast_format_copy(ast_channel_rawreadformat(ast),
ast_channel_rawwriteformat(ast));
^
chan_lcr.c:1212:2: warning: implicit declaration of function
‘ast_format_cap_set’ [-Wimplicit-function-declaration]
ast_format_cap_set(ast_channel_nativeformats(ast),
ast_channel_rawwriteformat(ast));
^
chan_lcr.c: In function ‘lcr_in_proceeding’:
chan_lcr.c:1262:8: warning: variable ‘rc’ set but not used
[-Wunused-but-set-variable]
int rc;
^
chan_lcr.c: In function ‘lcr_in_alerting’:
chan_lcr.c:1284:8: warning: variable ‘rc’ set but not used
[-Wunused-but-set-variable]
int rc;
^
chan_lcr.c: In function ‘lcr_in_connect’:
chan_lcr.c:1307:8: warning: variable ‘rc’ set but not used
[-Wunused-but-set-variable]
int rc;
^
chan_lcr.c: In function ‘lcr_in_disconnect’:
chan_lcr.c:1353:9: warning: variable ‘rc’ set but not used
[-Wunused-but-set-variable]
int rc;
^
chan_lcr.c: In function ‘lcr_in_release’:
chan_lcr.c:1392:9: warning: variable ‘rc’ set but not used
[-Wunused-but-set-variable]
int rc;
^
chan_lcr.c: In function ‘lcr_in_information’:
chan_lcr.c:1423:3: warning: passing argument 1 of ‘snprintf’ from
incompatible pointer type [enabled by default]
snprintf(tmp,AST_MAX_EXTENSION,"%s%s",ast_channel_exten(ast),param->
information.id);
^
In file included from chan_lcr.c:114:0:
/usr/include/stdio.h:386:12: note: expected ‘char * __restrict__’ but
argument is of type ‘char **’
extern int snprintf (char *__restrict __s, size_t __maxlen,
^
chan_lcr.c:1424:3: warning: passing argument 2 of ‘ast_channel_exten_set’
from incompatible pointer type [enabled by default]
ast_channel_exten_set(ast, tmp);
^
In file included from chan_lcr.c:148:0:
/usr/include/asterisk/channel.h:4020:6: note: expected ‘const char *’ but
argument is of type ‘char **’
void ast_channel_exten_set(struct ast_channel *chan, const char *value);
^
chan_lcr.c:1442:8: warning: variable ‘rc’ set but not used
[-Wunused-but-set-variable]
int rc;
^
chan_lcr.c:1458:10: warning: variable ‘rc’ set but not used
[-Wunused-but-set-variable]
int rc;
^
chan_lcr.c: In function ‘lcr_in_pattern’:
chan_lcr.c:1520:8: warning: variable ‘rc’ set but not used
[-Wunused-but-set-variable]
int rc;
^
chan_lcr.c: In function ‘lcr_in_dtmf’:
chan_lcr.c:1551:7: warning: variable ‘rc’ set but not used
[-Wunused-but-set-variable]
int rc;
^
chan_lcr.c: In function ‘release_all_calls’:
chan_lcr.c:1736:8: warning: variable ‘rc’ set but not used
[-Wunused-but-set-variable]
int rc;
^
chan_lcr.c: In function ‘wake_event’:
chan_lcr.c:1885:6: warning: variable ‘rc’ set but not used
[-Wunused-but-set-variable]
int rc;
^
chan_lcr.c: In function ‘lcr_request’:
chan_lcr.c:2068:2: error: incompatible type for argument 10 of
‘__ast_channel_alloc’
ast = ast_channel_alloc(1, AST_STATE_RESERVED, NULL, NULL, NULL, NULL,
NULL, NULL, 0, "%s/%d", lcr_type, ++glob_channel);
^
In file included from chan_lcr.c:148:0:
/usr/include/asterisk/channel.h:1161:2: note: expected ‘enum ama_flags’ but
argument is of type ‘char *’
__ast_channel_alloc(int needqueue, int state, const char *cid_num,
^
chan_lcr.c:2095:2: warning: passing argument 1 of ‘ast_channel_redirecting’
discards ‘const’ qualifier from pointer target type [enabled by default]
req_redir = ast_channel_redirecting(requestor);
^
In file included from chan_lcr.c:148:0:
/usr/include/asterisk/channel.h:4156:31: note: expected ‘struct ast_channel
*’ but argument is of type ‘const struct ast_channel *’
struct ast_party_redirecting *ast_channel_redirecting(struct ast_channel
*chan);
^
chan_lcr.c:2096:2: warning: passing argument 1 of ‘ast_channel_caller’
discards ‘const’ qualifier from pointer target type [enabled by default]
req_caller = ast_channel_caller(requestor);
^
In file included from chan_lcr.c:148:0:
/usr/include/asterisk/channel.h:4151:26: note: expected ‘struct ast_channel
*’ but argument is of type ‘const struct ast_channel *’
struct ast_party_caller *ast_channel_caller(struct ast_channel *chan);
^
chan_lcr.c:2117:69: error: ‘AST_FORMAT_ALAW’ undeclared (first use in this
function)
ast_format_set(ast_channel_rawwriteformat(ast)
,(options.law=='a')?AST_FORMAT_ALAW:AST_FORMAT_ULAW , 0);
^
chan_lcr.c:2117:85: error: ‘AST_FORMAT_ULAW’ undeclared (first use in this
function)
ast_format_set(ast_channel_rawwriteformat(ast)
,(options.law=='a')?AST_FORMAT_ALAW:AST_FORMAT_ULAW , 0);
^
chan_lcr.c: In function ‘lcr_write’:
chan_lcr.c:2750:2: warning: passing argument 2 of
‘ast_format_cap_iscompatible’ from incompatible pointer type [enabled by
default]
if (!ast_format_cap_iscompatible(ast_channel_nativeformats(ast),
&f->subclass.format)) {
^
In file included from /usr/include/asterisk/data.h:29:0,
from /usr/include/asterisk/channel.h:176,
from chan_lcr.c:148:
/usr/include/asterisk/format_cap.h:292:5: note: expected ‘const struct
ast_format_cap *’ but argument is of type ‘struct ast_format **’
int ast_format_cap_iscompatible(const struct ast_format_cap *cap1, const
struct ast_format_cap *cap2);
^
chan_lcr.c:2768:3: warning: passing argument 2 of ‘ast_set_write_format’
from incompatible pointer type [enabled by default]
ast_set_write_format(ast, &f->subclass.format);
^
In file included from chan_lcr.c:148:0:
/usr/include/asterisk/channel.h:2037:5: note: expected ‘struct ast_format
*’ but argument is of type ‘struct ast_format **’
int ast_set_write_format(struct ast_channel *chan, struct ast_format
*format);
^
chan_lcr.c: In function ‘lcr_read’:
chan_lcr.c:2879:2: warning: implicit declaration of function
‘ast_best_codec’ [-Wimplicit-function-declaration]
ast_best_codec(ast_channel_nativeformats(ast),
&call->read_fr.subclass.format);
^
chan_lcr.c:2881:64: error: request for member ‘id’ in something not a
structure or union
call->read_fr.subclass.integer = call->read_fr.subclass.format.id;
^
chan_lcr.c: At top level:
chan_lcr.c:3321:2: warning: initialization from incompatible pointer type
[enabled by default]
.requester = lcr_request,
^
chan_lcr.c:3321:2: warning: (near initialization for ‘lcr_tech.requester’)
[enabled by default]
chan_lcr.c:3332:2: warning: initialization from incompatible pointer type
[enabled by default]
.call = lcr_call,
^
chan_lcr.c:3332:2: warning: (near initialization for ‘lcr_tech.call’)
[enabled by default]
chan_lcr.c:3333:2: error: unknown field ‘bridge’ specified in initializer
.bridge = lcr_bridge,
^
chan_lcr.c:3333:2: warning: initialization from incompatible pointer type
[enabled by default]
chan_lcr.c:3333:2: warning: (near initialization for ‘lcr_tech.hangup’)
[enabled by default]
chan_lcr.c: In function ‘load_module’:
chan_lcr.c:3523:20: error: storage size of ‘tmp’ isn’t known
struct ast_format tmp;
^
chan_lcr.c:3524:42: error: ‘AST_FORMAT_ALAW’ undeclared (first use in this
function)
ast_format_set(&tmp ,(options.law=='a')?AST_FORMAT_ALAW:AST_FORMAT_ULAW ,
0);
^
chan_lcr.c:3524:58: error: ‘AST_FORMAT_ULAW’ undeclared (first use in this
function)
ast_format_set(&tmp ,(options.law=='a')?AST_FORMAT_ALAW:AST_FORMAT_ULAW ,
0);
^
In file included from /usr/include/asterisk/data.h:29:0,
from /usr/include/asterisk/channel.h:176,
from chan_lcr.c:148:
chan_lcr.c:3525:32: error: expected expression before ‘)’ token
if (!(lcr_tech.capabilities = ast_format_cap_alloc())) {
^
chan_lcr.c:3528:2: warning: implicit declaration of function
‘ast_format_cap_add’ [-Wimplicit-function-declaration]
ast_format_cap_add(lcr_tech.capabilities, &tmp);
^
chan_lcr.c:3523:20: warning: unused variable ‘tmp’ [-Wunused-variable]
struct ast_format tmp;
^
chan_lcr.c: In function ‘unload_module’:
chan_lcr.c:3639:2: warning: implicit declaration of function
‘ast_format_cap_destroy’ [-Wimplicit-function-declaration]
lcr_tech.capabilities = ast_format_cap_destroy(lcr_tech.capabilities);
^
chan_lcr.c:3639:24: warning: assignment makes pointer from integer without
a cast [enabled by default]
lcr_tech.capabilities = ast_format_cap_destroy(lcr_tech.capabilities);
^
make[2]: *** [chan_lcr.po] Error 1
make[2]: Leaving directory `/root/_INSTALL/lcr'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/_INSTALL/lcr'
make: *** [all] Error 2
Did anybody try and succeed with this or am i wasting my time?
Thanks in advanced
Cheers
_______________________________________________
isdn4linux mailing list
[email protected]
https://www.isdn4linux.de/mailman/listinfo/isdn4linux