[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bluetooth-dev] Compilation Error



"Victor Chan" <eecow@xxxxxxx.com> writes:

> Hi,
> 
> i just install the readline library, but i still have another error:
> 
> make[2]: Entering directory `/home/eecow/openbt/apps/bluetooth/userstack'
> cc  -pthread  btd.o btdebug.o btmem.o hci.o l2cap.o l2cap_con.o rfcomm.o 
> sdp.o tcs.o test.o bt_proc.o hci_vendor.o sec_client.o l2cap_sec.o 
> rfcomm_sec.o -lutil  -lreadline -ltermcap -o btduser
> /usr/bin/ld: cannot find -ltermcap

You need termcap library (as you write later).

> collect2: ld returned 1 exit status
> make[3]: *** [btduser] Error 1
> make[2]: *** [all] Error 2
> make[2]: Leaving directory `/home/eecow/openbt/apps/bluetooth/userstack'
> make[1]: *** [all-recurse] Error 1
> make[1]: Leaving directory `/home/eecow/openbt/apps/bluetooth'
> make: *** [all] Error 2
> [root@eecow openbt]#
> 
> it seems that i need termcap rpm or something, i try to download this:
> termcap-11.0.1-4mdk.i586.rpm
> 
> but when i click it to install, it says, i have this already.
> 
> What should I do?

Doesn't use RedHat or Mandrake myself, I use Debian, so I don't know..

> i try to comment some lines about using -ltermcap.
> But the btu.c in userstack directory gives me lots of unreference error.

You should probobly do a 'make clean' in root library before
restarting compilation if you try that change.

I did this in openbt/apps/bluetooth/userstack/Makefile
===================== cut ======================
# Define HAVE_READLINE_READLINE if you have readline support, with the include
# files in $(include_dir)/readline. Define HAVE_READLINE if you have the
# include files in $(include_dir). Define neither if you do not want to use
# readline.
#HAVE_READLINE_READLINE = 1
#HAVE_READLINE = 1

ifdef ELINUXDIR # works for now...
===================== cut ======================

That is, I told Makefile that I didn't want to use readline library at
all.  
Then I did 'make clean' followed by 
'(. init_env; make INCLUDEDIR=~/kernel-source-2.2.19pre11/include)'

(Don't remember if I did something more.  Should probobly put up my
 build instructions on a web page)

This is an old instruction I have, feel free to do what you want with
it (I think that something likt this should be in a README och
HOWTO file in CVS)

=========================== cut ========================
# Make directory for source code
cd
mkdir openbt
cd openbt
# Get source
cvs -d :pserver:anonymous@xxxxxxx.net:/cvsroot/openbt co all
cvs update
# You have to do 'make xconfig' in kernel-source tree before this
# I think it should be INCLUDEDIR=/usr/src/linux/include in most cases
(. init_env; make INCLUDEDIR=~/kernel-source-2.2.20/include)
cd apps/bluetooth/BluetoothPN
# Adjust libfltk in Makefile (/usr/lib/ and not in /usr/local/lib/)
make
# Install, if all went well
cd
cd openbt
su
(. init_env; make install INCLUDEDIR=~/kernel-source-2.2.20/include)
(. init_env; make devs INCLUDEDIR=~/kernel-source-2.2.20/include)
cp linux/drivers/char/bluetooth/bt.o /lib/modules/2.2.20/misc/
# In a xterm do next command to see log messages
tail -f /var/log/messages /var/log/daemon.log

# Create devices for USB (not made by 'make devs')
mknod -m 0666 /dev/ttyUB0 c 216 0
mknod -m 0666 /dev/ttyUB1 c 216 1
mknod -m 0666 /dev/ttyUB2 c 216 2

# The devices should look like this
hanseriks:/home/jackson# cd /dev
hanseriks:/dev# ls -l ttyUB*
crw-rw-rw-    1 root     root     216,   0 mar 20 01:53 ttyUB0
crw-rw-rw-    1 root     root     216,   1 mar 20 01:54 ttyUB1
crw-rw-rw-    1 root     root     216,   2 mar 20 01:54 ttyUB2
hanseriks:/dev# ls -l ttyBT*
crw-rw-rw-    1 root     tty      124,   0 mar 17 14:00 ttyBT0
crw-rw-rw-    1 root     tty      124,   1 mar 17 14:00 ttyBT1
crw-rw-rw-    1 root     tty      124,   2 mar 17 14:00 ttyBT2
crw-rw-rw-    1 root     tty      124,   3 mar 17 14:00 ttyBT3
crw-rw-rw-    1 root     tty      124,   4 mar 17 14:00 ttyBT4
crw-rw-rw-    1 root     tty      124,   5 mar 17 14:00 ttyBT5
crw-rw-rw-    1 root     tty      124,   6 mar 17 14:00 ttyBT6
crw-rw-rw-    1 root     tty      124,   7 mar 17 14:00 ttyBTC
hanseriks:/dev# 

# on one machine (client)
insmod bt
btd -u /dev/ttyUB0

# other machine (server)

btd -u /dev/ttyUB0 --server

=========================== cut ========================
Responses are welcome.  Mostly on the rest (running bluetooth)

/Jackson
-- 
Mr. Anders Jackson, lecturer, Department of Computer Science
University College of Gävle, 801 76 Gävle, Sweden
telephone: +46 26 648500 or +46 706 537711
More information at: <URL:http://www.hig.se/~jackson/>
-
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to majordomo@xxxxxxx.com