MaxSok / asterisk-chan-dongle

Automatically exported from code.google.com/p/asterisk-chan-dongle
Other
0 stars 0 forks source link

Doesn't compile on Asterisk 11 (next LTS version) #92

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
chan_dongle-1.1.r10# make

gcc -g -O2 -O6 -I.  -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H 
 -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT app.o -MF .app.o.d -MP  -o 
app.o -c app.c
In file included from app.c:21:0:
/usr/include/asterisk/version.h:1:2: error: #error "Do not include 
'asterisk/version.h'; use 'asterisk/ast_version.h' instead."
app.c: In function 'app_register':
app.c:162:3: warning: passing argument 2 of 'ast_register_application2' from 
incompatible pointer type [enabled by default]
In file included from app.c:20:0:
/usr/include/asterisk/module.h:458:5: note: expected 'int (*)(struct 
ast_channel *, const char *)' but argument is of type 'int (*)(struct 
ast_channel *, void *)'
make: *** [app.o] Error 1

-

chan_dongle-1.1.r10# grep version.h *

app.c:#include <asterisk/version.h>     /* ASTERISK_VERSION_NUM */
channel.c:#include <asterisk/version.h>                 /* ASTERISK_VERSION_NUM 
*/
cli.c:#include <asterisk/version.h>                     /* ASTERISK_VERSION_NUM 
*/

-

chan_dongle-1.1.r10# make

gcc -g -O2 -O6 -I.  -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H 
 -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT app.o -MF .app.o.d -MP  -o 
app.o -c app.c
app.c: In function 'app_register':
app.c:162:3: warning: passing argument 2 of 'ast_register_application2' from 
incompatible pointer type [enabled by default]
In file included from app.c:20:0:
/usr/include/asterisk/module.h:458:5: note: expected 'int (*)(struct 
ast_channel *, const char *)' but argument is of type 'int (*)(struct 
ast_channel *, void *)'
gcc -g -O2 -O6 -I.  -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H 
 -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT at_command.o -MF 
.at_command.o.d -MP  -o at_command.o -c at_command.c
gcc -g -O2 -O6 -I.  -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H 
 -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT at_parse.o -MF .at_parse.o.d 
-MP  -o at_parse.o -c at_parse.c
gcc -g -O2 -O6 -I.  -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H 
 -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT at_queue.o -MF .at_queue.o.d 
-MP  -o at_queue.o -c at_queue.c
gcc -g -O2 -O6 -I.  -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H 
 -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT at_read.o -MF .at_read.o.d -MP 
 -o at_read.o -c at_read.c
gcc -g -O2 -O6 -I.  -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H 
 -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT at_response.o -MF 
.at_response.o.d -MP  -o at_response.o -c at_response.c
at_response.c: In function 'start_pbx':
at_response.c:854:16: error: dereferencing pointer to incomplete type
at_response.c:861:10: error: dereferencing pointer to incomplete type
at_response.c: In function 'at_response_clcc':
at_response.c:922:23: error: dereferencing pointer to incomplete type
make: *** [at_response.o] Error 1

Original issue reported on code.google.com by Tiago.Ge...@gmail.com on 1 Sep 2012 at 11:16

GoogleCodeExporter commented 9 years ago
There are a few problems here...

1) version.h has been fully replaced now with ast_version.h
2) ast_version.h doesn't define a version string or version num anymore, only 
functions to obtain the version are presented.
3) ast_channel lists and structs have been hidden behind setters and getters, 
any code that gets or sets values from within an ast_channel needs to be 
modified to use the new function calls.

Original comment by d...@tucny.com on 7 Sep 2012 at 5:44

GoogleCodeExporter commented 9 years ago
any plans to support asterisk 11?

Original comment by Tiago.Ge...@gmail.com on 13 Sep 2012 at 10:38

GoogleCodeExporter commented 9 years ago
I'm interested too. Someone can fix this? Thanks so much!

Original comment by giacomo1...@gmail.com on 27 Oct 2012 at 8:01

GoogleCodeExporter commented 9 years ago
Jacub Stasiac make patch 
https://github.com/jstasiak/asterisk-chan-dongle/commit/3485ac50c337bb0f70d68f2f
a4d62ea3beee568a

Original comment by bk@raskon.ru on 5 Nov 2012 at 9:17

GoogleCodeExporter commented 9 years ago
WoW! Builded. Thanks so much!! Later i'll do some tests

Original comment by giacomo1...@gmail.com on 8 Nov 2012 at 10:12

GoogleCodeExporter commented 9 years ago
I cloned the github repo and tried to build . Exact error as listed above can 
you leave a note on what you did to build it successfully?

Original comment by guyt1...@gmail.com on 8 Nov 2012 at 8:49

GoogleCodeExporter commented 9 years ago
Mine is working flawlessy on Asterisk 11.0.1

Original comment by giacomo1...@gmail.com on 13 Nov 2012 at 10:10

GoogleCodeExporter commented 9 years ago
YUP. Downloaded this 
https://github.com/jstasiak/asterisk-chan-dongle/archive/asterisk11.zip

Then

https://github.com/jstasiak/asterisk-chan-dongle/blob/asterisk11/INSTALL

Original comment by giacomo1...@gmail.com on 13 Nov 2012 at 10:13

GoogleCodeExporter commented 9 years ago
YUP. Downloaded this 
https://github.com/jstasiak/asterisk-chan-dongle/archive/asterisk11.zip

Then

https://github.com/jstasiak/asterisk-chan-dongle/blob/asterisk11/INSTALL

Original comment by giacomo1...@gmail.com on 13 Nov 2012 at 10:13

GoogleCodeExporter commented 9 years ago
Yes, patch is functioning. Many thanks to Jacub Stasiac for do that.

Original comment by gino.maf...@gmail.com on 14 Nov 2012 at 11:59

GoogleCodeExporter commented 9 years ago
Thanks

Original comment by bg_...@mail.ru on 21 Nov 2012 at 8:41

GoogleCodeExporter commented 9 years ago
Thanks.You have delivered me.Works in Asterisk 11.3.0-rc1

Original comment by korolom on 27 Feb 2013 at 7:55

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Works with Freebsd too!

Original comment by jersonju...@gmail.com on 13 Jun 2013 at 7:46

GoogleCodeExporter commented 9 years ago
aclocal && autoconf && automake -a
./configure
gmake
gmake install

Original comment by jersonju...@gmail.com on 13 Jun 2013 at 7:48

GoogleCodeExporter commented 9 years ago
I still can't get this to work.  Is it a patch that has to be applied to the 
original source code? How do I do this correctly? I've already tried to patch 
the whole directory with patch -p1 but it does not work.

Original comment by j...@tegelaers.de on 21 Jul 2013 at 7:49

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[root@localhost dongle-read-only]# make
gcc -g -O2 -O6 -I.  -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H 
 -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT app.o -MF .app.o.d -MP  -o 
app.o -c app.c
app.c:18:59: error: asterisk/app.h: No such file or directory
app.c:19:60: error: asterisk/pbx.h: No such file or directory
app.c:20:92: error: asterisk/module.h: No such file or directory
app.c:21:57: error: asterisk/version.h: No such file or directory
In file included from app.c:24:
chan_dongle.h:13:27: error: asterisk/lock.h: No such file or directory
chan_dongle.h:14:34: error: asterisk/linkedlists.h: No such file or directory
In file included from mixbuffer.h:11,
                 from chan_dongle.h:16,
                 from app.c:24:
ringbuffer.h: In function ‘rb_write’:
ringbuffer.h:71: error: ‘memmove’ undeclared (first use in this function)
ringbuffer.h:71: error: (Each undeclared identifier is reported only once
ringbuffer.h:71: error: for each function it appears in.)
In file included from chan_dongle.h:16,
                 from app.c:24:
mixbuffer.h: At top level:
mixbuffer.h:14: error: expected specifier-qualifier-list before 
‘AST_LIST_ENTRY’
mixbuffer.h:20: error: expected specifier-qualifier-list before 
‘AST_LIST_HEAD_NOLOCK’
mixbuffer.h: In function ‘mixb_init’:
mixbuffer.h:28: warning: implicit declaration of function 
‘AST_LIST_HEAD_INIT_NOLOCK’
mixbuffer.h:28: error: ‘struct mixbuffer’ has no member named ‘streams’
mixbuffer.h:29: error: ‘struct mixbuffer’ has no member named ‘rb’
mixbuffer.h:30: error: ‘struct mixbuffer’ has no member named ‘attached’
mixbuffer.h: In function ‘mixb_free’:
mixbuffer.h:42: error: ‘const struct mixbuffer’ has no member named ‘rb’
mixbuffer.h:42: error: ‘const struct mixstream’ has no member named 
‘used’
mixbuffer.h: In function ‘mixb_used’:
mixbuffer.h:48: error: ‘const struct mixbuffer’ has no member named ‘rb’
mixbuffer.h: In function ‘mixb_read_all_iov’:
mixbuffer.h:60: error: ‘const struct mixbuffer’ has no member named ‘rb’
mixbuffer.h: In function ‘mixb_read_n_iov’:
mixbuffer.h:66: error: ‘const struct mixbuffer’ has no member named ‘rb’
mixbuffer.h: In function ‘mixb_streams’:
mixbuffer.h:72: error: ‘const struct mixbuffer’ has no member named 
‘attached’
In file included from chan_dongle.h:18,
                 from app.c:24:
cpvt.h:9:56: error: asterisk/frame.h: No such file or directory
In file included from cpvt.h:13,
                 from chan_dongle.h:18,
                 from app.c:24:
mutils.h: In function ‘str2enum’:
mutils.h:36: warning: implicit declaration of function ‘strcasecmp’
In file included from chan_dongle.h:18,
                 from app.c:24:
cpvt.h: At top level:
cpvt.h:50: error: expected specifier-qualifier-list before ‘AST_LIST_ENTRY’
In file included from chan_dongle.h:18,
                 from app.c:24:
cpvt.h:91: warning: ‘struct pvt’ declared inside parameter list
cpvt.h:91: warning: its scope is only this definition or declaration, which is 
probably not what you want
cpvt.h:94: warning: ‘struct pvt’ declared inside parameter list
cpvt.h:95: warning: ‘struct pvt’ declared inside parameter list
In file included from chan_dongle.h:20,
                 from app.c:24:
dc_config.h:8:66: error: asterisk/channel.h: No such file or directory
In file included from chan_dongle.h:20,
                 from app.c:24:
dc_config.h:65: error: ‘AST_MAX_CONTEXT’ undeclared here (not in a function)
dc_config.h:66: error: ‘AST_MAX_EXTENSION’ undeclared here (not in a 
function)
dc_config.h:67: error: ‘MAX_LANGUAGE’ undeclared here (not in a function)
dc_config.h:98: error: field ‘jbconf’ has incomplete type
dc_config.h:126: warning: ‘struct ast_config’ declared inside parameter list
dc_config.h:127: warning: ‘struct ast_config’ declared inside parameter list
dc_config.h:128: warning: ‘struct ast_config’ declared inside parameter list
In file included from app.c:24:
chan_dongle.h:48: error: expected specifier-qualifier-list before ‘uint32_t’
chan_dongle.h:59: error: expected specifier-qualifier-list before ‘uint32_t’
chan_dongle.h:95: error: expected specifier-qualifier-list before 
‘AST_LIST_ENTRY’
In file included from app.c:24:
chan_dongle.h:205: error: expected specifier-qualifier-list before 
‘AST_RWLIST_HEAD’
chan_dongle.h:245: warning: ‘struct ast_channel’ declared inside parameter 
list
chan_dongle.h:248: warning: ‘struct ast_channel’ declared inside parameter 
list
chan_dongle.h: In function ‘find_device_by_resource’:
chan_dongle.h:250: warning: passing argument 4 of 
‘find_device_by_resource_ex’ from incompatible pointer type
chan_dongle.h:245: note: expected ‘const struct ast_channel *’ but argument 
is of type ‘const struct ast_channel *’
app.c: In function ‘app_status_exec’:
app.c:37: warning: implicit declaration of function ‘AST_DECLARE_APP_ARGS’
app.c:37: error: ‘args’ undeclared (first use in this function)
app.c:38: warning: implicit declaration of function ‘AST_APP_ARG’
app.c:38: error: ‘resource’ undeclared (first use in this function)
app.c:38: error: expected ‘)’ before ‘;’ token
app.c:42: warning: implicit declaration of function ‘ast_strlen_zero’
app.c:47: warning: implicit declaration of function ‘ast_strdupa’
app.c:47: warning: assignment makes pointer from integer without a cast
app.c:49: warning: implicit declaration of function ‘AST_STANDARD_APP_ARGS’
app.c:57: error: ‘NULL’ undeclared (first use in this function)
app.c:61: warning: implicit declaration of function ‘ast_mutex_unlock’
app.c:61: error: ‘struct pvt’ has no member named ‘lock’
app.c:69: warning: implicit declaration of function ‘snprintf’
app.c:69: warning: incompatible implicit declaration of built-in function 
‘snprintf’
app.c:70: warning: implicit declaration of function 
‘pbx_builtin_setvar_helper’
app.c: At top level:
app.c:75: error: expected ‘)’ before ‘struct’
app.c:139: error: ‘app_send_sms_exec’ undeclared here (not in a function)
app.c: In function ‘app_register’:
app.c:162: warning: implicit declaration of function 
‘ast_register_application2’
app.c: In function ‘app_unregister’:
app.c:172: warning: implicit declaration of function 
‘ast_unregister_application’
make: *** [app.o] Error 1
[root@localhost dongle-read-only]#

Original comment by SREEK...@gmail.com on 25 Aug 2013 at 4:24

GoogleCodeExporter commented 9 years ago
This worked for me >>

YUP. Downloaded this 
https://github.com/jstasiak/asterisk-chan-dongle/archive/asterisk11.zip
Then
https://github.com/jstasiak/asterisk-chan-dongle/blob/asterisk11/INSTALL

sudo automake -a
sudo autoconf
sudo ./configure
sudo make
sudo make install

Original comment by oquid...@gmail.com on 14 Dec 2013 at 9:51

GoogleCodeExporter commented 9 years ago
anybody resolv this problem?
I have AsteriskNOW and also trouble with compile chan-dongle

Original comment by 1wyciera...@gmail.com on 1 Jan 2014 at 7:19

GoogleCodeExporter commented 9 years ago
The easyest way I see is to:
Install asterisk-11 with yum. Follow instruction here:
https://wiki.asterisk.org/wiki/display/AST/Asterisk+Packages

Also install asterisk-devel using: yum install asterisk-devel 

Then downloaded this 
https://github.com/jstasiak/asterisk-chan-dongle/archive/asterisk11.zip
Unzip it!
cd asterisk-chan-dongle-asterisk11

Then run:
aclocal && autoconf && automake -a

If you are running 64bit os run this:
DESTDIR="/usr/lib64/asterisk/modules" ./configure --with-asterisk=/usr/include/

else just: 
DESTDIR="/usr/lib/asterisk/modules" ./configure --with-asterisk=/usr/include/

then make && make install

then in asterisk module load chan_dongle.so and your up and running.

Original comment by sil...@magazinulcuscule.ro on 30 Jan 2014 at 12:28

GoogleCodeExporter commented 9 years ago
Jacub Stasiac & #22
Thanks a lot
Im compleate

Original comment by kei...@gmail.com on 10 Jul 2014 at 10:39

GoogleCodeExporter commented 9 years ago
Thank you very much!!!

Original comment by centermi...@gmail.com on 29 Jul 2014 at 10:43

GoogleCodeExporter commented 9 years ago
aclocal && autoconf && automake -a
aclocal: warning: autoconf input should be named 'configure.ac', not 
'configure.in'
automake: warning: autoconf input should be named 'configure.ac', not 
'configure.in'
automake: error: no 'Makefile.am' found for any configure output

Original comment by ssagui...@gmail.com on 23 Jan 2015 at 6:20

GoogleCodeExporter commented 9 years ago
Also:

sudo automake -a
automake: warning: autoconf input should be named 'configure.ac', not 
'configure.in'
automake: error: no 'Makefile.am' found for any configure output

Original comment by ssagui...@gmail.com on 23 Jan 2015 at 6:21

GoogleCodeExporter commented 9 years ago
Hi, Would it be possible to update the code to compile for Asterisk 13 ? 
Please...

Original comment by mcc02.of...@gmail.com on 24 Jan 2015 at 1:05

GoogleCodeExporter commented 9 years ago
compile chan_dongle with asterisk-13.2.0 I have

$ make
./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
gcc -g -O2 -O6 -I.  -D_GNU_SOURCE -I/usr/include -I/usr/include -DHAVE_CONFIG_H 
 -fvisibility=hidden -fPIC -Wall -Wextra -MD -MT at_response.o -MF 
.at_response.o.d -MP  -o at_response.o -c at_response.c
at_response.c: In function ‘start_pbx’:
at_response.c:854:16: error: dereferencing pointer to incomplete type
  cpvt = channel->tech_pvt;
                ^
at_response.c:861:10: error: dereferencing pointer to incomplete type
   channel->tech_pvt = NULL;
          ^
at_response.c: In function ‘at_response_clcc’:
at_response.c:923:23: error: dereferencing pointer to incomplete type
          cpvt->channel->rings += pvt->rings;
                       ^
make: *** [at_response.o] Error 1

Original comment by vinn...@gmail.com on 9 Mar 2015 at 1:10