[Asterisk-Users] Cannot compile chan_bluetooth on Asterisk 1.2.1

Joseph Tanner joseph at thetechguide.com
Thu Jan 19 15:32:30 MST 2006


The short of it:

I am unable to compile chan_bluetooth on Asterisk 1.2.1 on CentOS 4.2.
 I installed using the Asterisk at Home 2.2 iso.  Server is a plain
Celeron 2.93GHz box.  Asterisk source is in /usr/src/asterisk, newest
chan_bluetooth source is in
/usr/src/asterisk-test/bluetooth/chan_bluetooth (I have two older
versions in other directories).

Steps taken:

Followed the instructions here to a T: 
http://www.crazygreek.co.uk/content/chan_bluetooth.  Basically, edit
/usr/src/asterisk/channels/Makefile adding chan_bluetooth.so to
CHANNEL_LIBS, and at the very bottom adding include
/usr/src/asterisk-test/bluetooth/chan_bluetooth/Makefile.

First tried the version by David Woodhouse, exact command used to
download was "cvs -d :pserver:anoncvs at cvs.infradead.org:/home/cvs
co chan_bluetooth".  Also tried the version at
http://www.crazygreek.co.uk/data/pages/chan_bluetooth/latest.tar.gz. 
Lastly, wanted to try a newer version of Theo's code on the SVN
server, which was down.  Google helped me find r40 at
http://rock.inode.at/ROCK-2.1/c/chan_bluetooth-r40.tar.bz2.  Using the
newest version (by David Woodhouse) gives me this error:

make[1]: Entering directory `/usr/src/asterisk/channels'
gcc -shared -Xlinker -x -o chan_bluetooth.so
/usr/src/asterisk-test/bluetooth/chan_bluetooth/chan_bluetooth.o
-lbluetooth
gcc: /usr/src/asterisk-test/bluetooth/chan_bluetooth/chan_bluetooth.o:
No such file or directory
make[1]: *** [chan_bluetooth.so] Error 1
make[1]: Leaving directory `/usr/src/asterisk/channels'
make: *** [subdirs] Error 1

Using an older version will at least try to compile, but giving many
errors.  I found by using the Makefile from an older version with the
newest, it also tries to compile but with errors as well.  The only
difference I see in the Makefile is using a .tmp directory in the
chan_bluetooth directory in order to compile.  Here's the end of the
error using that Makefile (I'd post the entire error, but it fills up
the buffer and I can't copy it all, let me know if you need more than
I posted):

/usr/src/asterisk-test/bluetooth/chan_bluetooth/chan_bluetooth.c: In
function `load_module':
/usr/src/asterisk-test/bluetooth/chan_bluetooth/chan_bluetooth.c:3210:
error: `sdp_session_t' undeclared (first use in this function)
/usr/src/asterisk-test/bluetooth/chan_bluetooth/chan_bluetooth.c:3210:
error: `sess' undeclared (first use in this function)
/usr/src/asterisk-test/bluetooth/chan_bluetooth/chan_bluetooth.c:3221:
warning: implicit declaration of function `hci_open_dev'
/usr/src/asterisk-test/bluetooth/chan_bluetooth/chan_bluetooth.c:3227:
warning: implicit declaration of function `hci_read_voice_setting'
/usr/src/asterisk-test/bluetooth/chan_bluetooth/chan_bluetooth.c:3228:
warning: implicit declaration of function `htobs'
/usr/src/asterisk-test/bluetooth/chan_bluetooth/chan_bluetooth.c:3244:
warning: implicit declaration of function `hci_devba'
/usr/src/asterisk-test/bluetooth/chan_bluetooth/chan_bluetooth.c:3248:
error: `BDADDR_LOCAL' undeclared (first use in this function)
/usr/src/asterisk-test/bluetooth/chan_bluetooth/chan_bluetooth.c:3248:
error: `SDP_RETRY_IF_BUSY' undeclared (first use in this function)
make[1]: *** [/usr/src/asterisk-test/bluetooth/chan_bluetooth/.tmp/chan_bluetooth.o]
Error 1
make[1]: Leaving directory `/usr/src/asterisk/channels'
make: *** [subdirs] Error 1
[root at asterisk1 asterisk]#

I have also tried a few things, moving the include statement up in the
Makefile, adding #define ASTERISK_VERSION_NUM 010201 to the top of
chan_bluetooth.c (also used 010200, and 000000).  In
/usr/src/asterisk/include/asterisk/version.h, it kept being set to
000000, I had to edit the Makefile in /usr/src/asterisk to force it to
010201 (after trying it with the 000000 value first, of course).

When compiling Asterisk, I will do a make clean then make.  When
making minor changes I would just do a make clean in
/usr/src/asterisk/channels then a make in /usr/src/asterisk.  The two
errors above were after doing a complete make clean in
/usr/src/asterisk, then a make.

Hopefully I gave enough information, if I missed anything let me know.
 Thank you.



More information about the asterisk-users mailing list