I've installed ISDN4BSD on an 7.2-RELEASE kernel, and it recognises the card
real nice.
Further installed asterisk16 and subversion (and some more) from packages.
So then
But compiling it fails horribly.
It just looks like the compiler has an of day...
(gcc version 4.2.1 20070719 [FreeBSD])
Any hints on getting CAPI to compile?
Thanx,
--WjW
Asterbsd# cd chan_capi_1_6_1
Asterbsd# gmake all |& less
gcc -pipe -fPIC -Wall -Wmissing-prototypes -Wmissing-declarations -g
-I/usr/local/include -I/usr/include/i4b/include -D_REENTRANT -D_GNU_SOURCE
-O6 -march=i386 -Wformat -DASTERISKVERSION=\"\" -Wno-missing-prototypes
-Wno-missing-declarations -DCRYPTO -c -o chan_capi.o chan_capi.c
In file included from chan_capi.c:34:
/usr/local/include/asterisk/frame.h:647: error: expected '=', ',', ';',
'asm' or '__attribute__' before 'int'
In file included from /usr/local/include/asterisk/channel.h:126,
from chan_capi.c:35:
/usr/local/include/asterisk/abstract_jb.h:97: error: expected
specifier-qualifier-list before 'FILE'
In file included from /usr/local/include/asterisk/utils.h:26,
from /usr/local/include/asterisk/config.h:30,
from /usr/local/include/asterisk/channel.h:143,
from chan_capi.c:35:
/usr/local/include/asterisk/network.h:55:2: error: #error "don't know how to
handle network functions here."
In file included from /usr/local/include/asterisk/utils.h:26,
from /usr/local/include/asterisk/config.h:30,
from /usr/local/include/asterisk/channel.h:143,
from chan_capi.c:35:
/usr/local/include/asterisk/network.h:59: warning: 'struct in_addr' declared
inside parameter list
/usr/local/include/asterisk/network.h:59: warning: its scope is only this
definition or declaration, which is probably not what you want
/usr/local/include/asterisk/network.h:80: warning: 'struct in_addr' declared
inside parameter list
/usr/local/include/asterisk/network.h:88: error: expected '=', ',', ';',
'asm' or '__attribute__' before 'int'
In file included from /usr/local/include/asterisk/config.h:30,
from /usr/local/include/asterisk/channel.h:143,
from chan_capi.c:35:
/usr/local/include/asterisk/utils.h:209: error: field 'hp' has incomplete type
/usr/local/include/asterisk/utils.h:266: error: expected '=', ',', ';',
'asm' or '__attribute__' before 'void'
/usr/local/include/asterisk/utils.h:279: error: expected '=', ',', ';',
'asm' or '__attribute__' before 'void'
/usr/local/include/asterisk/utils.h:292: error: expected '=', ',', ';',
'asm' or '__attribute__' before 'void'
/usr/local/include/asterisk/utils.h:305: error: expected '=', ',', ';',
'asm' or '__attribute__' before 'void'
/usr/local/include/asterisk/utils.h:346: error: expected ')' before '*' token
/usr/local/include/asterisk/utils.h:434: error: expected '=', ',', ';',
'asm' or '__attribute__' before '_ast_malloc'
/usr/local/include/asterisk/utils.h:434: error: expected '=', ',', ';',
'asm' or '__attribute__' before '_ast_malloc'
/usr/local/include/asterisk/utils.h:457: error: expected '=', ',', ';',
'asm' or '__attribute__' before '_ast_calloc'
/usr/local/include/asterisk/utils.h:457: error: expected '=', ',', ';',
'asm' or '__attribute__' before '_ast_calloc'
/usr/local/include/asterisk/utils.h:493: error: expected '=', ',', ';',
'asm' or '__attribute__' before '_ast_realloc'
/usr/local/include/asterisk/utils.h:493: error: expected '=', ',', ';',
'asm' or '__attribute__' before '_ast_realloc'
/usr/local/include/asterisk/utils.h:520: error: expected '=', ',', ';',
'asm' or '__attribute__' before '_ast_strdup'
/usr/local/include/asterisk/utils.h:520: error: expected '=', ',', ';',
'asm' or '__attribute__' before '_ast_strdup'
/usr/local/include/asterisk/utils.h:549: error: expected '=', ',', ';',
'asm' or '__attribute__' before '_ast_strndup'
/usr/local/include/asterisk/utils.h:549: error: expected '=', ',', ';',
'asm' or '__attribute__' before '_ast_strndup'
/usr/local/include/asterisk/utils.h:588: error: expected declaration
specifiers or '...' before 'va_list'
/usr/local/include/asterisk/utils.h:588: error: expected declaration
specifiers or '...' before 'va_list'
/usr/local/include/asterisk/utils.h: In function '_ast_vasprintf':
/usr/local/include/asterisk/utils.h:588: warning: implicit declaration of
function 'vasprintf'
/usr/local/include/asterisk/utils.h:588: error: 'ap' undeclared (first use
in this function)
/usr/local/include/asterisk/utils.h:588: error: (Each undeclared identifier
is reported only once
/usr/local/include/asterisk/utils.h:588: error: for each function it appears
in.)
In file included from /usr/local/include/asterisk/strings.h:30,
from /usr/local/include/asterisk/utils.h:676,
_______________________________________________
freebs...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-isdn
To unsubscribe, send any mail to "freebsd-isdn...@freebsd.org"
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-...@muc.de
You need to compile chan_capi from I4B SVN.
--HPS
You care to elaborate?
Because I have the idea that I'm following what's on your building instructions:
-----
HOW TO INSTALL CHAN_CAPI ON FREEBSD AND NETBSD
==============================================
#
# Dependencies:
# - Subversion must be installed, see "/usr/ports/devel/subversion"
# - Asterisk must be installed, see "/usr/ports/net/asterisk"
#
#
# Download the following tarball:
#
http://www.turbocat.net/~hselasky/capi4pbx/releases/chan_capi_1_6_1.tar.bz2
#
# Extract it using "tar -jxvf chan_capi_1_6_1.tar.bz2", and run:
#
cd chan_capi_1_6_1
gmake all install
#
# Example configuration files are located at
# "chan_capi_1_6_1/capi.conf" and
# "chan_capi_1_6_1/extensions.conf".
#
----
--WjW
Ouch, how trivial......
Going there, doing that:
'mmmm, no not really, but closer;
I now get a lot of:
In file included from chan_capi20.h:7,
from chan_capi.c:77:
/usr/include/i4b/include/capi20.h:1960:2: error: invalid suffix
"x__dont_use_bzero__use_memset_instead" on integer constant
In file included from chan_capi20.h:7,
from chan_capi.c:77:
/usr/include/i4b/include/capi20.h: In function 'capi_decode':
/usr/include/i4b/include/capi20.h:2217: error: expected ';' before string
constant
/usr/include/i4b/include/capi20.h:2221:8: error: invalid suffix
"x__dont_use_bcopy__use_memmove_instead" on integer constant
(ad infinitum)
Could be because previous attempts have left me with a corrupt set of
include files? If so how what do I clean up?
--WjW
That's where I started, but I'm guessing that certain files are now more or
less corrupted by my tinkering with different tries.
I'll clean out that directory and refetch from SVN
Those instructions are a little outdated, reminding me that my homepage needs
an update.
svn --username anonsvn --password anonsvn \
checkout svn://svn.turbocat.net/i4b
#
# The following commands will
# install the driver on FreeBSD:
#
cd i4b/trunk/chan_capi
gmake all install
Enjoy!
You need to install I4B from SVN aswell. See:
http://www.selasky.org/hans_petter/isdn4bsd/
And the SVN lines.
--HPS
A lot less warnings, but still it nags about
bzero and bcopy
and replace them by memset and memmove.
Which I did with a macro..
Now I run into more serieus incompatibilities:
in chan_capi.c
error = capi20_be_alloc_i4b(&cbe_p);
versus:
/usr/include/i4b/include/capi20.h:capi20_is_installed(void);
/usr/include/i4b/include/capi20.h:#define capi20_isinstalled
capi20_is_installed
/usr/include/i4b/include/capi20.h:#define CAPI20_ISINSTALLED
capi20_is_installed
And that seems like some includes are still out of whack?
So I copied:
cp ../../../i4b/trunk/i4b/src/sys/i4b/include/* /usr/include/i4b/include/
And that leaves me with warnings like:
chan_capi.c:1045:2: warning: #warning "What about cd->next after free?
Currently 'cd' is not freed by cd_free()."
chan_capi.c:4680:2: warning: #warning "Should send a messages, but which?"
chan_capi.c:4845:2: warning: #warning "Cannot do this, because one cannot
lock 'pbx_chan' here!"
chan_capi.c:5372:2: warning: #warning "Maybe cannot write these variables
here! Locking issue!"
chan_capi.c:5383:2: warning: #warning "Does not handle length == 0xFF"
chan_capi.c:6858:2: warning: #warning "TODO: check for calls that never
received connect_conf;"
/usr/local/include/asterisk/frame.h:648: warning: 'ast_format_rate' defined
but not used
Which I'll consider harmless unless things start crashing on me...
--WjW
Hi,
I'm not sure when you last did a svn up, but all the errors you are reporting
have been fixed recently. Maybe you should "svn status" in your tree and
check?
We are currently:
At revision 1156.
--HPS