.titleBar { margin-bottom: 5px!important; }

Probleme beim Compilen von chan_capi

Dieses Thema im Forum "Asterisk ISDN mit CAPI (chan_capi, chan_capi_cm)" wurde erstellt von rickmiller, 8 Okt. 2004.

  1. rickmiller

    rickmiller Neuer User

    Registriert seit:
    8 Okt. 2004
    Beiträge:
    85
    Zustimmungen:
    0
    Punkte für Erfolge:
    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 ?
     
  2. fabe

    fabe Neuer User

    Registriert seit:
    13 Juli 2004
    Beiträge:
    72
    Zustimmungen:
    0
    Punkte für Erfolge:
    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.
     
  3. rickmiller

    rickmiller Neuer User

    Registriert seit:
    8 Okt. 2004
    Beiträge:
    85
    Zustimmungen:
    0
    Punkte für Erfolge:
    0
    Wo hab ich denn Asterix geschrieben ? <such und finds net>

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

    Danke.
     
  4. fabe

    fabe Neuer User

    Registriert seit:
    13 Juli 2004
    Beiträge:
    72
    Zustimmungen:
    0
    Punkte für Erfolge:
    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...
     
  5. rickmiller

    rickmiller Neuer User

    Registriert seit:
    8 Okt. 2004
    Beiträge:
    85
    Zustimmungen:
    0
    Punkte für Erfolge:
    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 ?
     
  6. fabe

    fabe Neuer User

    Registriert seit:
    13 Juli 2004
    Beiträge:
    72
    Zustimmungen:
    0
    Punkte für Erfolge:
    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.
     
  7. hjoerg

    hjoerg Neuer User

    Registriert seit:
    30 Dez. 2004
    Beiträge:
    78
    Zustimmungen:
    0
    Punkte für Erfolge:
    0
    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.


     
  8. rajo

    rajo Admin-Team

    Registriert seit:
    31 März 2004
    Beiträge:
    1,958
    Zustimmungen:
    0
    Punkte für Erfolge:
    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.
     
  9. hjoerg

    hjoerg Neuer User

    Registriert seit:
    30 Dez. 2004
    Beiträge:
    78
    Zustimmungen:
    0
    Punkte für Erfolge:
    0
    es hat sich erledigt, habe die neue source von asterisk geladen und schon funzt es....danke