[Asterisk-Users] Errors Compiling chan_capi 0.3.5

Mike Price mike at pie.co.nz
Mon May 30 01:01:24 MST 2005


On Mon, 2005-05-30 at 19:27, Armin Schindler wrote:
> On Mon, 30 May 2005, Mike Price wrote:
> > On Mon, 2005-05-30 at 18:21, Armin Schindler wrote:
> > > On Mon, 30 May 2005, Mike Price wrote:
> > > > On Thu, 2005-05-26 at 23:21, Armin Schindler wrote:
> > > > > On Thu, 26 May 2005, Mike Price wrote:
> > > > > > Yes libcapi is installed. Here is a sample of the errors I am getting:
> > > > > > 
> > > > > > In file included from chan_capi.c:38:
> > > > > > chan_capi_pvt.h:92: syntax error before "_cword"
> > > > > > chan_capi_pvt.h:92: warning: no semicolon at end of struct or union
> > > > > > chan_capi_pvt.h:195: syntax error before '}' token
> > > > > > chan_capi.c:41: syntax error before "ast_capi_MessageNumber"
> > > > > ...
> > > > > 
> > > > > It looks like _cword is not defined. The definition is made in
> > > > > /usr/include/capiutils.h, do you have this file (should be installed by
> > > > > the libcapi/capi20 package) ?
> > > > > On what system do you compiling (SuSE, Debian, ... or even Cross) ?
> > > > > 
> > > > OK. I found I was missing isdn4k-utils-devel-3.1-76 and therefore
> > > > capiutils.h etc.
> > > > 
> > > > Now when I try to complie I get:
> > > > 
> > > > chan_capi.c:114: variable `capi_tech' has initializer but incomplete
> > > > type
> > > > chan_capi.c:115: unknown field `type' specified in initializer
> > > > chan_capi.c:115: warning: excess elements in struct initializer
> > > > chan_capi.c:115: warning: (near initialization for `capi_tech')
> > > > ....
> > > > 
> > > > So things are still not quite right.
> > > > 
> > > > The system is Asterisk at Home v1.0 (CentOS 3.4 final)
> > > > 
> > > > Any other pointers?
> > > 
> > > It seems the setting in the Makefile of chan_capi about using CVS_HEAD is 
> > > not correct. I don't know which version Asterisk at Home v1.0 is using, but try 
> > > to change that setting. 
> > > Anyway, the CVS_HEAD/UNSTABLE_CVS defines in chan_capi is not really good. I 
> > > changed that to have a small configure script, which makes the correct 
> > > settings depending the Asterisk version it is compiled against. I will soon 
> > > release my version of a reworked chan_capi.
> > > 
> > I have changed the setting but now get different errors:
> > 
> > gcc -pipe -Wall -Wmissing-prototypes -Wmissing-declarations -g 
> > -I/usr/include -D_REENTRANT -D_GNU_SOURCE -O6 -march=i586  -DCAPI_ES
> > -DCAPI_GAIN -DCAPI_SYNC -DCVS_HEAD -Wno-missing-prototypes
> > -Wno-missing-declarations -DCRYPTO   -c -o chan_capi.o chan_capi.c
> > chan_capi.c:69:
> > `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__'
> > undeclared here (not in a function)
> > chan_capi.c:70:
> > `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__'
> > undeclared here (not in a function)
> > chan_capi.c:71:
> > `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__'
> > undeclared here (not in a function)
> > chan_capi.c:72:
> > `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__'
> > undeclared here (not in a function)
> > chan_capi.c:73:
> > `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__'
> > undeclared here (not in a function)
> > chan_capi.c:74:
> > `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__'
> > undeclared here (not in a function)
> > chan_capi.c:75:
> > `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__'
> > undeclared here (not in a function)
> > chan_capi.c:114: variable `capi_tech' has initializer but incomplete
> > type
> > chan_capi.c:115: unknown field `type' specified in initializer
> > chan_capi.c:115: warning: excess elements in struct initializer
> > 
> > The version of Asterisk appears to be 1.0.7.
> 
> Did you apply some patch to chan_capi?
> That's what I meant with the 'CVS_HEAD setting is not good', because some
> changes were made between some releases and the chan_capi Makefile just 
> knows 'old' and 'new' which is not working for some versions.
> Anyway 1.0.7 should work with unpatched chan_capi 0.3.5.

Thanks. I have now re-installed the unpatched chan_capi and have
successfully compiled it. Now its on to try to get it to work.

Thanks again

>  
> > When do you expect to have your reworked chan_capi ?
> 
> I still want to fix some race-conditions. It should be ready for 'testing' 
> end of this week.
> 
Let me know so I can give it a go.

Mike

> Armin
> 
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list