Probleme beim Compilen von chan_capi

rickmiller

Neuer User
Mitglied seit
8 Okt 2004
Beiträge
85
Punkte für Reaktionen
0
Punkte
0
Hallo,

Ich habe Asterisk 1.0.1 installiert auf eine SUSE Linux 9.0, dazu eine AVM C4-Karte, die vom SuSE auch problemlos erkannt wurde.
Asterix selber läuft auch schon, ging problemlos.

Jetzt habe ich mir capi_chan 0.3.1 geholt und das nach /tmp/capi_chan entpackt und dort das make install gestartet. Leider türmen sich danach die Fehlermeldungen:

Code:
/usr/include/bits/uio.h:42: error: syntax error before "struct"
In file included from /usr/include/sys/socket.h:35,
                 from /usr/include/netinet/in.h:24,
                 from /usr/include/netdb.h:28,
                 from /usr/include/asterisk/lock.h:18,
                 from chan_capi.c:14:
/usr/include/bits/socket.h:36: error: syntax error before "typedef"
In file included from /usr/include/sys/socket.h:35,
                 from /usr/include/netinet/in.h:24,
                 from /usr/include/netdb.h:28,
                 from /usr/include/asterisk/lock.h:18,
                 from chan_capi.c:14:
/usr/include/bits/socket.h:237: error: parse error before "__flexarr"
/usr/include/bits/socket.h:258: error: parse error before "__THROW"
In file included from /usr/include/netinet/in.h:24,
                 from /usr/include/netdb.h:28,
                 from /usr/include/asterisk/lock.h:18,
                 from chan_capi.c:14:
/usr/include/sys/socket.h:65:43: missing binary operator before token "("
In file included from /usr/include/netinet/in.h:24,
                 from /usr/include/netdb.h:28,
                 from /usr/include/asterisk/lock.h:18,
                 from chan_capi.c:14:
/usr/include/sys/socket.h:100: error: parse error before "__THROW"
/usr/include/sys/socket.h:107: error: parse error before "__THROW"
/usr/include/sys/socket.h:111: error: parse error before "__THROW"
/usr/include/sys/socket.h:115: error: parse error before "__THROW"
/usr/include/sys/socket.h:129: error: parse error before "__THROW"
/usr/include/sys/socket.h:187: error: parse error before "__THROW"
/usr/include/sys/socket.h:193: error: parse error before "__THROW"
/usr/include/sys/socket.h:199: error: parse error before "__THROW"
/usr/include/sys/socket.h:218: error: parse error before "__THROW"
In file included from /usr/include/netdb.h:28,
                 from /usr/include/asterisk/lock.h:18,
                 from chan_capi.c:14:
/usr/include/netinet/in.h:28: error: parse error before "__BEGIN_DECLS"
/usr/include/netinet/in.h:31: error: syntax error before "enum"
In file included from /usr/include/netdb.h:28,
                 from /usr/include/asterisk/lock.h:18,
                 from chan_capi.c:14:
/usr/include/netinet/in.h:262: error: parse error before "__THROW"
/usr/include/netinet/in.h:264: error: parse error before "__THROW"
/usr/include/netinet/in.h:266: error: parse error before "__THROW"
/usr/include/netinet/in.h:268: error: parse error before "__THROW"
In file included from /usr/include/netdb.h:28,
                 from /usr/include/asterisk/lock.h:18,
                 from chan_capi.c:14:
/usr/include/netinet/in.h:336: error: parse error before "__THROW"
/usr/include/netinet/in.h:340: error: parse error before "__THROW"
In file included from /usr/include/netdb.h:43,
                 from /usr/include/asterisk/lock.h:18,
                 from chan_capi.c:14:
/usr/include/bits/netdb.h:27: error: syntax error before "struct"
In file included from /usr/include/asterisk/lock.h:18,
                 from chan_capi.c:14:
/usr/include/netdb.h:61: error: syntax error before "extern"
/usr/include/netdb.h:61: error: parse error before "__THROW"
/usr/include/netdb.h:88: error: parse error before "__THROW"
/usr/include/netdb.h:91: error: parse error before "__THROW"
In file included from chan_capi.c:14:
/usr/include/asterisk/lock.h:294: error: syntax error before "typedef"
/usr/include/asterisk/lock.h: In function `ast_mutex_init':
/usr/include/asterisk/lock.h:300: error: `PTHREAD_MUTEX_RECURSIVE' undeclared (first use in this function)
/usr/include/asterisk/lock.h:300: error: (Each undeclared identifier is reported only once
/usr/include/asterisk/lock.h:300: error: for each function it appears in.)
In file included from /usr/include/sys/time.h:30,
                 from /usr/include/asterisk/frame.h:24,
                 from chan_capi.c:15:
/usr/include/sys/select.h: At top level:
/usr/include/sys/select.h:109: error: syntax error before "extern"
In file included from /usr/include/asterisk/frame.h:24,
                 from chan_capi.c:15:
/usr/include/sys/time.h:38: error: parse error before "__BEGIN_DECLS"
/usr/include/sys/time.h:64: error: syntax error before "typedef"
/usr/include/sys/time.h:73: error: parse error before "__THROW"
/usr/include/sys/time.h:126: error: parse error before "__THROW"
/usr/include/sys/time.h:133: error: parse error before "__THROW"
/usr/include/sys/time.h:139: error: parse error before "__THROW"
In file included from chan_capi.c:15:
/usr/include/asterisk/frame.h:64: error: syntax error before "struct"
In file included from /usr/include/asterisk/channel.h:20,
                 from chan_capi.c:16:
/usr/include/unistd.h:257: error: syntax error before "extern"
/usr/include/unistd.h:257: error: parse error before "__THROW"
/usr/include/unistd.h:287: error: parse error before "__THROW"
/usr/include/unistd.h:370: error: parse error before "__THROW"
/usr/include/unistd.h:379: error: parse error before "__THROW"
/usr/include/unistd.h:420: error: parse error before "__THROW"
/usr/include/unistd.h:435: error: parse error before "__THROW"
/usr/include/unistd.h:449: error: parse error before "__THROW"
/usr/include/unistd.h:467: error: parse error before "__THROW"
/usr/include/unistd.h:470: error: parse error before "__THROW"
/usr/include/unistd.h:482: error: parse error before "__THROW"
/usr/include/unistd.h:493: error: parse error before "__THROW"
/usr/include/unistd.h:497: error: parse error before "__THROW"
/usr/include/unistd.h:501: error: parse error before "__THROW"
/usr/include/unistd.h:505: error: parse error before "__THROW"
/usr/include/unistd.h:510: error: parse error before "__THROW"
In file included from /usr/include/asterisk/channel.h:20,
                 from chan_capi.c:16:
/usr/include/unistd.h:529: error: parse error before "__THROW"
/usr/include/unistd.h:532: error: parse error before "__THROW"
/usr/include/unistd.h:535: error: parse error before "__THROW"
/usr/include/unistd.h:544: error: parse error before "__THROW"
/usr/include/unistd.h:547: error: parse error before "__THROW"
/usr/include/unistd.h:552: error: parse error before "__THROW"
/usr/include/unistd.h:562: error: parse error before "__THROW"
/usr/include/unistd.h:571: error: parse error before "__THROW"
/usr/include/unistd.h:606: error: parse error before "__THROW"
/usr/include/unistd.h:614: error: parse error before "__THROW"
/usr/include/unistd.h:617: error: parse error before "__THROW"
/usr/include/unistd.h:620: error: parse error before "__THROW"
/usr/include/unistd.h:623: error: parse error before "__THROW"
/usr/include/unistd.h:628: error: parse error before "__THROW"
/usr/include/unistd.h:639: error: parse error before "__THROW"
/usr/include/unistd.h:656: error: parse error before "__THROW"
/usr/include/unistd.h:691: error: parse error before "__THROW"
/usr/include/unistd.h:704: error: parse error before "__THROW"
/usr/include/unistd.h:708: error: parse error before "__THROW"
/usr/include/unistd.h:712: error: parse error before "__THROW"
/usr/include/unistd.h:723: error: parse error before "__THROW"
/usr/include/unistd.h:737: error: parse error before "__THROW"
/usr/include/unistd.h:740: error: parse error before "__THROW"
/usr/include/unistd.h:744: error: parse error before "__THROW"
/usr/include/unistd.h:747: error: parse error before "__THROW"
In file included from /usr/include/asterisk/channel.h:21,
                 from chan_capi.c:16:
/usr/include/setjmp.h:28: error: parse error before "__BEGIN_DECLS"
In file included from /usr/include/setjmp.h:30,
                 from /usr/include/asterisk/channel.h:21,
                 from chan_capi.c:16:
/usr/include/bits/setjmp.h:38: error: syntax error before "typedef"
In file included from /usr/include/asterisk/channel.h:21,
                 from chan_capi.c:16:
/usr/include/setjmp.h:36: error: syntax error before "typedef"
/usr/include/setjmp.h:50: error: parse error before "__THROW"
/usr/include/setjmp.h:53: error: parse error before "__USING_NAMESPACE_STD"
/usr/include/setjmp.h: In function `__USING_NAMESPACE_STD':
/usr/include/setjmp.h:58: error: storage class specified for parameter `__sigsetjmp'
/usr/include/setjmp.h:58: error: parse error before "__THROW"
/usr/include/setjmp.h:63: error: storage class specified for parameter `_setjmp'
/usr/include/setjmp.h:63: error: parse error before "__THROW"
/usr/include/setjmp.h:63: error: declaration for parameter `_setjmp' but no such parameter
/usr/include/setjmp.h:58: error: declaration for parameter `__sigsetjmp' but no such parameter
In file included from /usr/include/asterisk/channel.h:22,
                 from chan_capi.c:16:
/usr/include/sys/poll.h: At top level:
/usr/include/sys/poll.h:48: error: syntax error before "extern"
/usr/include/sys/poll.h:48: error: parse error before "nfds_t"
In file included from /usr/include/asterisk/channel.h:33,
                 from chan_capi.c:16:
/usr/include/asterisk/cdr.h:39: error: syntax error before "struct"
In file included from /usr/include/asterisk/monitor.h:4,
                 from /usr/include/asterisk/channel.h:34,
                 from chan_capi.c:16:
/usr/include/stdio.h:44: error: parse error before "__BEGIN_NAMESPACE_STD"
/usr/include/stdio.h:46: error: syntax error before "typedef"
/usr/include/stdio.h:62: error: syntax error before "typedef"
In file included from /usr/include/_G_config.h:44,
                 from /usr/include/libio.h:32,
                 from /usr/include/stdio.h:72,
                 from /usr/include/asterisk/monitor.h:4,
                 from /usr/include/asterisk/channel.h:34,
                 from chan_capi.c:16:
/usr/include/gconv.h:176: error: parse error before "__flexarr"
In file included from /usr/include/libio.h:32,
                 from /usr/include/stdio.h:72,
                 from /usr/include/asterisk/monitor.h:4,
                 from /usr/include/asterisk/channel.h:34,
                 from chan_capi.c:16:
/usr/include/_G_config.h:47: error: field `__cd' has incomplete type
/usr/include/_G_config.h:50: error: field `__cd' has incomplete type
In file included from /usr/include/libio.h:62,
                 from /usr/include/stdio.h:72,
                 from /usr/include/asterisk/monitor.h:4,
                 from /usr/include/asterisk/channel.h:34,
                 from chan_capi.c:16:
/usr/include/sys/cdefs.h:43:43: missing binary operator before token "("
/usr/include/sys/cdefs.h:122:19: missing binary operator before token "("
/usr/include/sys/cdefs.h:173:19: missing binary operator before token "("
/usr/include/sys/cdefs.h:182:19: missing binary operator before token "("
/usr/include/sys/cdefs.h:191:19: missing binary operator before token "("
/usr/include/sys/cdefs.h:200:19: missing binary operator before token "("
/usr/include/sys/cdefs.h:212:19: missing binary operator before token "("
/usr/include/sys/cdefs.h:222:19: missing binary operator before token "("
/usr/include/sys/cdefs.h:233:20: missing binary operator before token "("
/usr/include/sys/cdefs.h:238:20: missing binary operator before token "("
/usr/include/sys/cdefs.h:245:19: missing binary operator before token "("
In file included from chan_capi.c:16:
/usr/include/asterisk/channel.h: In function `ast_fdisset':
/usr/include/asterisk/channel.h:815: error: invalid use of undefined type `struct pollfd'
/usr/include/asterisk/channel.h:815: error: dereferencing pointer to incomplete type
/usr/include/asterisk/channel.h:820: error: invalid use of undefined type `struct pollfd'
/usr/include/asterisk/channel.h:820: error: dereferencing pointer to incomplete type
chan_capi.c:23:30: asterisk/parking.h: No such file or directory
In file included from /usr/include/string.h:375,
                 from chan_capi.c:29:
/usr/include/bits/string2.h:191:20: missing binary operator before token "("
/usr/include/bits/string2.h:398:58: missing binary operator before token "("
/usr/include/bits/string2.h:1061:57: missing binary operator before token "("
In file included from /usr/include/linux/kernelcapi.h:13,
                 from /usr/include/linux/capi.h:18,
                 from chan_capi.c:34:
/usr/include/linux/list.h:563:2: warning: #warning "don't include kernel headers in userspace"
chan_capi.c: At top level:
chan_capi.c:52: error: `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__' undeclared here (not in a function)
chan_capi.c:53: error: `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__' undeclared here (not in a function)
chan_capi.c:54: error: `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__' undeclared here (not in a function)
chan_capi.c:55: error: `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__' undeclared here (not in a function)
chan_capi.c:56: error: `__use_AST_MUTEX_DEFINE_STATIC_rather_than_AST_MUTEX_INITIALIZER__' undeclared here (not in a function)
[align=justify]
Jetzt steh ich wie der Ochs vorm Berg und hab Null Ahnung, wo mein Problem liegt.

Kann mir wer helfen ?
 

fabe

Neuer User
Mitglied seit
13 Jul 2004
Beiträge
72
Punkte für Reaktionen
0
Punkte
0
wie wärs denn erstmal wenn du die aktuelle version von chan_capi (0.3.5) verwendest? ;)
desweiteren heißt das ganze asterisk (*) und nich asterix....
außerdem brauchst du für chan_capi die capi-devel bzw. isdn4k-devel packages.
 

rickmiller

Neuer User
Mitglied seit
8 Okt 2004
Beiträge
85
Punkte für Reaktionen
0
Punkte
0
Wo hab ich denn Asterix geschrieben ? <such und finds net>

Ja, mit der 0.3.5 gings irgendwie dann. Komisch, aber egal.

Danke.
 

fabe

Neuer User
Mitglied seit
13 Jul 2004
Beiträge
72
Punkte für Reaktionen
0
Punkte
0
garnicht komisch ;)
die chan_capi's sind abhängig von der entsprechenden cvs version.
chan_capi ist kein regulärer teil von asterisk.
deshalb muss der chan_capi entwickler immer bei anpassungen im haupt cvs von asterisk reagieren und neue versionen releasen...
 

rickmiller

Neuer User
Mitglied seit
8 Okt 2004
Beiträge
85
Punkte für Reaktionen
0
Punkte
0
aaahhh ! :blonk:

Und wieder was dazugelernt.

BTW: das hier

*CLI> capi info
Contr1: 2 B channels total, 2 B channels free.
Contr2: 2 B channels total, 2 B channels free.
Contr3: 2 B channels total, 2 B channels free.
Contr4: 2 B channels total, 2 B channels free.

bestätigt doch, das Asterisk meine AVM C4 jetzt kennt und mag, oder ? Oder kann/muss ich das noch anders testen/checken ?
 

fabe

Neuer User
Mitglied seit
13 Jul 2004
Beiträge
72
Punkte für Reaktionen
0
Punkte
0
das passt eigentlich schon...
kannst ja einfach mal ne line anschließen und probieren rein/rauszuwählen.
der einfachste test ist immer "capi debug" zu machen und dann einfach mal anzurufen.. selbst wenn * nicht abnimmt solltest du im debug was ankommen sehen.
 

hjoerg

Neuer User
Mitglied seit
30 Dez 2004
Beiträge
90
Punkte für Reaktionen
1
Punkte
8
also ich habe Probleme beim compilieren von chan_capi-0.3.5, bei der distru suse9.0 und aktuellem Asterisk.

Asterisk war noch realtiv problemlos, dann wollte ich aber in die ISDN-Welt mit eben capi-support.

chan_capi-0.3.5, in /tmp entpackt, dann ins neue verzeichnis gewechselt
make bzw. auch bei make install versucht auszuführen, karte bei der system installtion schon eingebunden.


Code:
/tmp/chan_capi-0.3.5 # make
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 -DUNSTABLE_CVS -Wno-missing-prototypes -Wno-missing-declarations -DCRYPTO   -c -o chan_capi.o chan_capi.c
chan_capi.c:23:31: asterisk/features.h: Datei oder Verzeichnis nicht gefunden
chan_capi.c:24:28: asterisk/utils.h: Datei oder Verzeichnis nicht gefunden
In file included from /usr/include/linux/kernelcapi.h:13,
                 from /usr/include/linux/capi.h:18,
                 from chan_capi.c:35:
/usr/include/linux/list.h:563:2: Warnung: #warning "don't include kernel headers in userspace"
chan_capi.c:62: Warnung: type defaults to `int' in declaration of `AST_MUTEX_DEFINE_STATIC'
chan_capi.c:62: Warnung: parameter names (without types) in function declaration
chan_capi.c:62: Warnung: data definition has no type or storage class
chan_capi.c:63: Warnung: type defaults to `int' in declaration of `AST_MUTEX_DEFINE_STATIC'
chan_capi.c:63: Warnung: parameter names (without types) in function declaration
chan_capi.c:63: Warnung: data definition has no type or storage class
chan_capi.c:64: Warnung: type defaults to `int' in declaration of `AST_MUTEX_DEFINE_STATIC'
chan_capi.c:64: Warnung: parameter names (without types) in function declaration
chan_capi.c:64: Warnung: data definition has no type or storage class
chan_capi.c:65: Warnung: type defaults to `int' in declaration of `AST_MUTEX_DEFINE_STATIC'
chan_capi.c:65: Warnung: parameter names (without types) in function declaration
chan_capi.c:65: Warnung: data definition has no type or storage class
chan_capi.c:66: Warnung: type defaults to `int' in declaration of `AST_MUTEX_DEFINE_STATIC'
chan_capi.c:66: Warnung: parameter names (without types) in function declaration
chan_capi.c:66: Warnung: data definition has no type or storage class
chan_capi.c:67: Warnung: type defaults to `int' in declaration of `AST_MUTEX_DEFINE_STATIC'
chan_capi.c:67: Warnung: parameter names (without types) in function declaration
chan_capi.c:67: Warnung: data definition has no type or storage class
chan_capi.c:68: Warnung: type defaults to `int' in declaration of `AST_MUTEX_DEFINE_STATIC'
chan_capi.c:68: Warnung: parameter names (without types) in function declaration
chan_capi.c:68: Warnung: data definition has no type or storage class
chan_capi.c: In function `_capi_put_cmsg':
chan_capi.c:106: error: `capi_put_lock' undeclared (first use in this function)
chan_capi.c:106: error: (Each undeclared identifier is reported only once
chan_capi.c:106: error: for each function it appears in.)
chan_capi.c: In function `capi_echo_canceller':
chan_capi.c:181: error: `contrlock' undeclared (first use in this function)
chan_capi.c: In function `capi_detect_dtmf':
chan_capi.c:231: error: `contrlock' undeclared (first use in this function)
chan_capi.c: In function `capi_send_digit':
chan_capi.c:309: error: `contrlock' undeclared (first use in this function)
chan_capi.c: In function `remove_pipe':
chan_capi.c:481: error: `pipelock' undeclared (first use in this function)
chan_capi.c: In function `capi_hangup':
chan_capi.c:613: error: `usecnt_lock' undeclared (first use in this function)
chan_capi.c: In function `capi_call':
chan_capi.c:685: error: `pipelock' undeclared (first use in this function)
chan_capi.c: In function `capi_read':
chan_capi.c:826: error: structure has no member named `delivery'
chan_capi.c:827: error: structure has no member named `delivery'
chan_capi.c: In function `capi_write':
chan_capi.c:899: error: `capi_send_buffer_lock' undeclared (first use in this function)
chan_capi.c: In function `capi_new':
chan_capi.c:1022: error: structure has no member named `delivery'
chan_capi.c:1023: error: structure has no member named `delivery'
chan_capi.c:1078: error: `usecnt_lock' undeclared (first use in this function)
chan_capi.c: In function `capi_request':
chan_capi.c:1130: error: `iflock' undeclared (first use in this function)
chan_capi.c:1146: error: `contrlock' undeclared (first use in this function)
chan_capi.c: In function `find_pipe':
chan_capi.c:1181: error: `pipelock' undeclared (first use in this function)
chan_capi.c: In function `pipe_frame':
chan_capi.c:1214: error: too few arguments to function `ast_dsp_process'
chan_capi.c: In function `pipe_msg':
chan_capi.c:1347: error: `contrlock' undeclared (first use in this function)
chan_capi.c:1499: error: structure has no member named `delivery'
chan_capi.c:1500: error: structure has no member named `delivery'
chan_capi.c: In function `capi_handle_msg':
chan_capi.c:1974: error: `iflock' undeclared (first use in this function)
chan_capi.c:2064: error: `pipelock' undeclared (first use in this function)
chan_capi.c: In function `restart_monitor':
chan_capi.c:2267: error: `monlock' undeclared (first use in this function)
chan_capi.c:2278: Warnung: implicit declaration of function `ast_pthread_create'
chan_capi.c: In function `capi_info':
chan_capi.c:2527: error: `contrlock' undeclared (first use in this function)
chan_capi.c: In function `load_module':
chan_capi.c:2607: error: `iflock' undeclared (first use in this function)
chan_capi.c: In function `usecount':
chan_capi.c:2820: error: `usecnt_lock' undeclared (first use in this function)
make: *** [chan_capi.o] Fehler 1
so sieht das ganze aus

Edit von rollo: Habe mal den schließenden Code tag eingefügt
 

rajo

Admin-Team
Mitglied seit
31 Mrz 2004
Beiträge
1,958
Punkte für Reaktionen
0
Punkte
36
chan_capi findet die header-files von asterisk nicht -- wie hast Du asterisk installiert? als suse-rpm oder so? Falls ja, schau mal, ob es ein asterisk-dev paket gibt und installier das.

Ansonsten sollten die *.h - Dateien unter /usr/include/asterisk zu finden sein, wenn Du ein make install beim Asterisk gemacht hast.

Und falls Du eine ganz verworrenen Installation hast und Asterisk sonstwo hin installiert hast, dann kannst Du im Makefile von chan_capi die Variable
INSTALL_PREFIX passend setzen, so dass das auch funktionieren sollte.
 

hjoerg

Neuer User
Mitglied seit
30 Dez 2004
Beiträge
90
Punkte für Reaktionen
1
Punkte
8
es hat sich erledigt, habe die neue source von asterisk geladen und schon funzt es....danke
 

3CX PBX - GRATIS
Linux / Win / Cloud

Statistik des Forums

Themen
233,124
Beiträge
2,030,410
Mitglieder
351,480
Neuestes Mitglied
binakh