The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

Re: Asterisk



--------------080508020804060204020505
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

A further update on this. I noticed the second line of the gcc output
said asterisk.c:16:20: xapdef.h: No such file or directory and sure
enough that file wasn't in the /manager directory and according to the
asterisk.c file it should be. I found the file in the xaplib and copied
it over to the manager folder. Now on a make it seems to get further,
still no bin is made but progress.  The output from a  make is now:

gcc  -c  -g -Wall -O2 -DLINUX -DPC   asterisk.c
asterisk.c: In function `process_asterisk_event':
asterisk.c:177: warning: implicit declaration of function `strnicmp'
gcc  -c  -g -Wall -O2 -DLINUX -DPC   ../../xAPlib/xaptx.c
../../xAPlib/xaptx.c: In function `xap_send_tick':
../../xAPlib/xaptx.c:9: warning: implicit declaration of function `time'
gcc  -c  -g -Wall -O2 -DLINUX -DPC   ../../xAPlib/xaprx.c
gcc  -c  -g -Wall -O2 -DLINUX -DPC   ../../xAPlib/xapinit.c
gcc  -o xap-asterisk   asterisk.o xaptx.o xaprx.o xapinit.o
asterisk.o(.text+0x296): In function `process_asterisk_event':
/root/xap/asterisk/manager/asterisk.c:177: undefined reference to
`strnicmp'
asterisk.o(.text+0x2b2):/root/xap/asterisk/manager/asterisk.c:185:
undefined reference to `strnicmp'
collect2: ld returned 1 exit status
make: *** [xap-asterisk] Error 1


James

James wrote:
> It's asterisk@home 2.2  which is centos 4.2
>
> make for the hub and the asterisk dialler work fine, it's just the
> asterisk manager that fails.
> gcc is :
> gcc -v
> Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.4/specs
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
> --infodir=/usr/share/info --enable-shared --enable-threads=posix
> --disable-checking --with-system-zlib --enable-__cxa_atexit
> --disable-libunwind-exceptions --enable-java-awt=gtk
> --host=i386-redhat-linux
> Thread model: posix
> gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)
>
>
> make
> gcc  -c  -g -Wall -O2 -DLINUX -DPC   asterisk.c
> asterisk.c:16:20: xapdef.h: No such file or directory
> asterisk.c:44: error: syntax error before '*' token
> asterisk.c:44: warning: type defaults to `int' in declaration of
`g_file'
> asterisk.c:44: warning: data definition has no type or storage class
> asterisk.c: In function `init_log':
> asterisk.c:49: warning: implicit declaration of function `fopen'
> asterisk.c:49: warning: assignment makes pointer from integer without
> a cast
> asterisk.c:51: warning: implicit declaration of function `printf'
> asterisk.c: In function `write_log':
> asterisk.c:57: warning: implicit declaration of function `fputs'
> asterisk.c: In function `close_log':
> asterisk.c:61: warning: implicit declaration of function `fclose'
> asterisk.c: In function `router_send_str':
> asterisk.c:66: warning: implicit declaration of function `send'
> asterisk.c: In function `router_bind_port':
> asterisk.c:72: error: storage size of 'addr' isn't known
> asterisk.c:77: error: `AF_INET' undeclared (first use in this
function)
> asterisk.c:77: error: (Each undeclared identifier is reported only
once
> asterisk.c:77: error: for each function it appears in.)
> asterisk.c:78: warning: implicit declaration of function `inet_addr'
> asterisk.c:81: warning: implicit declaration of function `htons'
> asterisk.c:83: warning: implicit declaration of function `htonl'
> asterisk.c:85: warning: implicit declaration of function `socket'
> asterisk.c:85: error: `SOCK_STREAM' undeclared (first use in this
> function)
> asterisk.c:86: warning: implicit declaration of function `perror'
> asterisk.c:92: warning: implicit declaration of function `setsockopt'
> asterisk.c:92: error: `SOL_SOCKET' undeclared (first use in this
function)
> asterisk.c:92: error: `SO_REUSEADDR' undeclared (first use in this
> function)
> asterisk.c:93: warning: implicit declaration of function `fcntl'
> asterisk.c:93: error: `F_SETFL' undeclared (first use in this
function)
> asterisk.c:93: error: `O_NONBLOCK' undeclared (first use in this
function)
> asterisk.c:94: warning: implicit declaration of function `bind'
> asterisk.c:95: warning: implicit declaration of function `close'
> asterisk.c:99: warning: implicit declaration of function `listen'
> asterisk.c:72: warning: unused variable `addr'
> asterisk.c: In function `router_accept':
> asterisk.c:107: error: storage size of 'i_addr' isn't known
> asterisk.c:110: warning: implicit declaration of function `accept'
> asterisk.c:107: warning: unused variable `i_addr'
> asterisk.c: In function `asterisk_connect_server':
> asterisk.c:133: error: storage size of 'addr' isn't known
> asterisk.c:138: error: `AF_INET' undeclared (first use in this
function)
> asterisk.c:146: error: `SOCK_STREAM' undeclared (first use in this
> function)
> asterisk.c:150: warning: implicit declaration of function `connect'
> asterisk.c:133: warning: unused variable `addr'
> asterisk.c: In function `process_asterisk_event':
> asterisk.c:177: warning: implicit declaration of function `strnicmp'
> asterisk.c:179: warning: implicit declaration of function `putchar'
> asterisk.c:206: warning: implicit declaration of function `sprintf'
> asterisk.c:206: error: `g_uid' undeclared (first use in this function)
> asterisk.c:206: error: `g_instance' undeclared (first use in this
> function)
> asterisk.c:207: warning: implicit declaration of function
> `xap_send_message'
> asterisk.c: In function `xap_handler':
> asterisk.c:235: warning: implicit declaration of function
`xapmsg_parse'
> asterisk.c:236: warning: implicit declaration of function
`xapmsg_gettype'
> asterisk.c:236: error: `XAP_MSG_ORDINARY' undeclared (first use in
> this function)
> asterisk.c: In function `main':
> asterisk.c:267: error: storage size of 'i_client_address' isn't known
> asterisk.c:278: warning: implicit declaration of function `xap_init'
> asterisk.c:306: error: `g_instance' undeclared (first use in this
> function)
> asterisk.c:337: warning: implicit declaration of function
> `xap_heartbeat_tick'
> asterisk.c:337: error: `HBEAT_INTERVAL' undeclared (first use in this
> function)
> asterisk.c:340: error: `g_xap_receiver_sockfd' undeclared (first use
> in this function)
> asterisk.c:360: warning: implicit declaration of function `recvfrom'
> asterisk.c:367: warning: implicit declaration of function
> `xap_poll_incoming'
> asterisk.c:267: warning: unused variable `i_client_address'
> make: *** [asterisk.o] Error 1
>
> The directory structure is as you described and it did error when it
> originally couldn't find the xaplib but after moving the asterisk
> source to the /manager/ sub directory it could find it correctly.
>
>
> James
>
>
> Patrick Lidstone (Personal E-mail) wrote:
>>
>>
>>
>>> -----Original Message-----
>>> From: James [mailto:james@xxxxxxx]
>>> Sent: 02 January 2006 22:04
>>> To: xap_automation@xxxxxxx
>>> Subject: Re: [xap_automation] Asterisk
>>>
>>> Me again!
>>>
>>> I thought I would try running it directly on the Asterisk box
>>> to see if it worked any different. I downloaded the sources
>>> for xaplib, hub, dialler and asteriskmanager. For hub and
>>> dialler I unzipped them, ran make and got a working
>>> executable for each. I then tried to build the asterisk
>>> connector. First time it couldn't find xAP lib so I changed
>>> the Makefile from ../../xaplib to ../xaplib  (as it is in the
>>> other makefiles). Then i ran make again and it actually
>>> started compiling but it failed with lots of errors.  I also
>>> tried changing OS=Win to OS=linux in the makefile but that
>>> didn't help.  I'm guessing it needs a different version of
>>> the xaplib. Is that available for download? or just a
>>> compiled bin maybe?
>>>
>>
>> There's no difference in the linux xapLib, it is completely cross
platform
>> and should just compile out of the box.
>> Which gcc are you using? Which linux distribution? Can you send me
the error
>> messages (offlist is fine if they are very long and tedious)
>>
>> The makefile expects the following directory structure
>>
>>
>>
>> Xap
>>   +--xAPlib
>>   +--asterisk
>>   +      +--- dialler
>>   +      +--- manager
>>   +--xAPhub
>>
>> You should be making with:
>> make xaplib
>> make dialler
>>
>> Etc.
>> Executed from the subdirectory of the given component
>>
>> Patrick
>>
>>
>>
>>
>> Yahoo! Groups Links
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>
>
> SPONSORED LINKS
> Workflow automation
> <http://groups.yahoo.com/gads?t=ms&k=Workflow+automation&w1=Workflow+automation&w2=Automation+equipment&w3=Industrial+automation&w4=Test+automation&w5=Sales+automation&w6=Factory+automation&c=6&s=145&.sig=F4tRNBO_G_ZzajQmbmwe7Q>
> 	Automation equipment
> <http://groups.yahoo.com/gads?t=ms&k=Automation+equipment&w1=Workflow+automation&w2=Automation+equipment&w3=Industrial+automation&w4=Test+automation&w5=Sales+automation&w6=Factory+automation&c=6&s=145&.sig=9-eliEiH2rHCvwCe6xpvLw>
> 	Industrial automation
> <http://groups.yahoo.com/gads?t=ms&k=Industrial+automation&w1=Workflow+automation&w2=Automation+equipment&w3=Industrial+automation&w4=Test+automation&w5=Sales+automation&w6=Factory+automation&c=6&s=145&.sig=xI5A0mNmlPHiPI__bxZwUQ>
>
> Test automation
> <http://groups.yahoo.com/gads?t=ms&k=Test+automation&w1=Workflow+automation&w2=Automation+equipment&w3=Industrial+automation&w4=Test+automation&w5=Sales+automation&w6=Factory+automation&c=6&s=145&.sig=babdTZ-cZ8AbgxQRUJqztw>
> 	Sales automation
> <http://groups.yahoo.com/gads?t=ms&k=Sales+automation&w1=Workflow+automation&w2=Automation+equipment&w3=Industrial+automation&w4=Test+automation&w5=Sales+automation&w6=Factory+automation&c=6&s=145&.sig=-x7c78RB2nUpuPBRifr1YA>
> 	Factory automation
> <http://groups.yahoo.com/gads?t=ms&k=Factory+automation&w1=Workflow+automation&w2=Automation+equipment&w3=Industrial+automation&w4=Test+automation&w5=Sales+automation&w6=Factory+automation&c=6&s=145&.sig=zQtSND_pDmyn0UaMn4LPgQ>
>
>
>
>
------------------------------------------------------------------------
> YAHOO! GROUPS LINKS
>
>     *  Visit your group "xap_automation
>       <http://groups.yahoo.com/group/xap_automation>"
on the web.
>
>     *  To unsubscribe from this group, send an email to:
>        xap_automation-unsubscribe@xxxxxxx
>       <mailto:xap_automation-unsubscribe@xxxxxxx?subject=Unsubscribe>
>
>     *  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
>
>
>
------------------------------------------------------------------------
>


--------------080508020804060204020505
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">


A further update on this. I noticed the second line of the gcc output
said asterisk.c:16:20: xapdef.h: No such file or directory and sure
enough that file wasn't in the /manager directory and according to the
asterisk.c file it should be. I found the file in the xaplib and copied
it over to the manager folder. Now on a make it seems to get further,
still no bin is made but progress.&nbsp; The output from a&nbsp;
make is now:<br>
<br>
gcc&nbsp; -c&nbsp; -g -Wall -O2 -DLINUX -DPC&nbsp;&nbsp;
asterisk.c<br>
asterisk.c: In function `process_asterisk_event':<br>
asterisk.c:177: warning: implicit declaration of function
`strnicmp'<br>
gcc&nbsp; -c&nbsp; -g -Wall -O2 -DLINUX -DPC&nbsp;&nbsp;
../../xAPlib/xaptx.c<br>
../../xAPlib/xaptx.c: In function `xap_send_tick':<br>
../../xAPlib/xaptx.c:9: warning: implicit declaration of function
`time'<br>
gcc&nbsp; -c&nbsp; -g -Wall -O2 -DLINUX -DPC&nbsp;&nbsp;
../../xAPlib/xaprx.c<br>
gcc&nbsp; -c&nbsp; -g -Wall -O2 -DLINUX -DPC&nbsp;&nbsp;
../../xAPlib/xapinit.c<br>
gcc&nbsp; -o xap-asterisk&nbsp;&nbsp; asterisk.o xaptx.o
xaprx.o xapinit.o<br>
asterisk.o(.text+0x296): In function `process_asterisk_event':<br>
/root/xap/asterisk/manager/asterisk.c:177: undefined reference to
`strnicmp'<br>
asterisk.o(.text+0x2b2):/root/xap/asterisk/manager/asterisk.c:185:
undefined reference to `strnicmp'<br>
collect2: ld returned 1 exit status<br>
make: *** [xap-asterisk] Error 1<br>
<br>
<br>
James<br>
<br>
James wrote:
<blockquote cite="mid43BAD45B.4060305@xxxxxxx"
type="cite">
<meta content="text/html;charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
It's asterisk@home 2.2&nbsp; which is centos 4.2<br>
<br>
make for the hub and the asterisk dialler work fine, it's just the
asterisk manager that fails.<br>
gcc is :<br>
gcc -v<br>
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.4/specs<br>
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-java-awt=gtk
--host=i386-redhat-linux<br>
Thread model: posix<br>
gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)<br>
<br>
<br>
make<br>
gcc&nbsp; -c&nbsp; -g -Wall -O2 -DLINUX -DPC&nbsp;&nbsp;
asterisk.c<br>
asterisk.c:16:20: xapdef.h: No such file or directory<br>
asterisk.c:44: error: syntax error before '*' token<br>
asterisk.c:44: warning: type defaults to `int' in declaration of
`g_file'<br>
asterisk.c:44: warning: data definition has no type or storage
class<br>
asterisk.c: In function `init_log':<br>
asterisk.c:49: warning: implicit declaration of function `fopen'<br>
asterisk.c:49: warning: assignment makes pointer from integer without a
cast<br>
asterisk.c:51: warning: implicit declaration of function `printf'<br>
asterisk.c: In function `write_log':<br>
asterisk.c:57: warning: implicit declaration of function `fputs'<br>
asterisk.c: In function `close_log':<br>
asterisk.c:61: warning: implicit declaration of function `fclose'<br>
asterisk.c: In function `router_send_str':<br>
asterisk.c:66: warning: implicit declaration of function `send'<br>
asterisk.c: In function `router_bind_port':<br>
asterisk.c:72: error: storage size of 'addr' isn't known<br>
asterisk.c:77: error: `AF_INET' undeclared (first use in this
function)<br>
asterisk.c:77: error: (Each undeclared identifier is reported only
once<br>
asterisk.c:77: error: for each function it appears in.)<br>
asterisk.c:78: warning: implicit declaration of function
`inet_addr'<br>
asterisk.c:81: warning: implicit declaration of function `htons'<br>
asterisk.c:83: warning: implicit declaration of function `htonl'<br>
asterisk.c:85: warning: implicit declaration of function `socket'<br>
asterisk.c:85: error: `SOCK_STREAM' undeclared (first use in this
function)<br>
asterisk.c:86: warning: implicit declaration of function `perror'<br>
asterisk.c:92: warning: implicit declaration of function
`setsockopt'<br>
asterisk.c:92: error: `SOL_SOCKET' undeclared (first use in this
function)<br>
asterisk.c:92: error: `SO_REUSEADDR' undeclared (first use in this
function)<br>
asterisk.c:93: warning: implicit declaration of function `fcntl'<br>
asterisk.c:93: error: `F_SETFL' undeclared (first use in this
function)<br>
asterisk.c:93: error: `O_NONBLOCK' undeclared (first use in this
function)<br>
asterisk.c:94: warning: implicit declaration of function `bind'<br>
asterisk.c:95: warning: implicit declaration of function `close'<br>
asterisk.c:99: warning: implicit declaration of function `listen'<br>
asterisk.c:72: warning: unused variable `addr'<br>
asterisk.c: In function `router_accept':<br>
asterisk.c:107: error: storage size of 'i_addr' isn't known<br>
asterisk.c:110: warning: implicit declaration of function
`accept'<br>
asterisk.c:107: warning: unused variable `i_addr'<br>
asterisk.c: In function `asterisk_connect_server':<br>
asterisk.c:133: error: storage size of 'addr' isn't known<br>
asterisk.c:138: error: `AF_INET' undeclared (first use in this
function)<br>
asterisk.c:146: error: `SOCK_STREAM' undeclared (first use in this
function)<br>
asterisk.c:150: warning: implicit declaration of function
`connect'<br>
asterisk.c:133: warning: unused variable `addr'<br>
asterisk.c: In function `process_asterisk_event':<br>
asterisk.c:177: warning: implicit declaration of function
`strnicmp'<br>
asterisk.c:179: warning: implicit declaration of function
`putchar'<br>
asterisk.c:206: warning: implicit declaration of function
`sprintf'<br>
asterisk.c:206: error: `g_uid' undeclared (first use in this
function)<br>
asterisk.c:206: error: `g_instance' undeclared (first use in this
function)<br>
asterisk.c:207: warning: implicit declaration of function
`xap_send_message'<br>
asterisk.c: In function `xap_handler':<br>
asterisk.c:235: warning: implicit declaration of function
`xapmsg_parse'<br>
asterisk.c:236: warning: implicit declaration of function
`xapmsg_gettype'<br>
asterisk.c:236: error: `XAP_MSG_ORDINARY' undeclared (first use in this
function)<br>
asterisk.c: In function `main':<br>
asterisk.c:267: error: storage size of 'i_client_address' isn't
known<br>
asterisk.c:278: warning: implicit declaration of function
`xap_init'<br>
asterisk.c:306: error: `g_instance' undeclared (first use in this
function)<br>
asterisk.c:337: warning: implicit declaration of function
`xap_heartbeat_tick'<br>
asterisk.c:337: error: `HBEAT_INTERVAL' undeclared (first use in this
function)<br>
asterisk.c:340: error: `g_xap_receiver_sockfd' undeclared (first use in
this function)<br>
asterisk.c:360: warning: implicit declaration of function
`recvfrom'<br>
asterisk.c:367: warning: implicit declaration of function
`xap_poll_incoming'<br>
asterisk.c:267: warning: unused variable `i_client_address'<br>
make: *** [asterisk.o] Error 1<br>
<br>
The directory structure is as you described and it did error when it
originally couldn't find the xaplib but after moving the asterisk
source to the /manager/ sub directory it could find it correctly.<br>
<br>
<br>
James<br>
<br>
<br>
Patrick Lidstone (Personal E-mail) wrote:
<blockquote cite="midE1Etjjr-0006nS-1W@xxxxxxx"
type="cite">
<pre wrap="">

</pre>
<blockquote type="cite">
<pre wrap="">-----Original Message-----
From: James [<a class="moz-txt-link-freetext"
href="mailto:james@xxxxxxx";>mailto:james@xxxxxxx</a>]
Sent: 02 January 2006 22:04
To: <a class="moz-txt-link-abbreviated"
href="mailto:xap_automation@xxxxxxx";>xap_automation@xxxxxxx</a>
Subject: Re: [xap_automation] Asterisk

Me again!

I thought I would try running it directly on the Asterisk box
to see if it worked any different. I downloaded the sources
for xaplib, hub, dialler and asteriskmanager. For hub and
dialler I unzipped them, ran make and got a working
executable for each. I then tried to build the asterisk
connector. First time it couldn't find xAP lib so I changed
the Makefile from ../../xaplib to ../xaplib  (as it is in the
other makefiles). Then i ran make again and it actually
started compiling but it failed with lots of errors.  I also
tried changing OS=Win to OS=linux in the makefile but that
didn't help.  I'm guessing it needs a different version of
the xaplib. Is that available for download? or just a
compiled bin maybe?
</pre>
</blockquote>
<pre wrap=""><!---->
There's no difference in the linux xapLib, it is completely cross platform
and should just compile out of the box.
Which gcc are you using? Which linux distribution? Can you send me the
error
messages (offlist is fine if they are very long and tedious)

The makefile expects the following directory structure



Xap
+--xAPlib
+--asterisk
+      +--- dialler
+      +--- manager
+--xAPhub

You should be making with:
make xaplib
make dialler

Etc.
Executed from the subdirectory of the given component

Patrick





xAP_Automation Main Index | xAP_Automation Thread Index | xAP_Automation Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.