When trying trying to follow the bluez/HACKING guide for installing BlueZ in development mode on Raspberry Pi OS (Bullseye) I get a variety of errors:
git clone git://git.kernel.org/pub/scm/bluetooth/bluez.git
cd bluez
./bootstrap-configure
Errors include:
./bootstrap: 5: libtoolize: not found
configure: error: elfutils support is required
configure: error: ALSA lib is required for MIDI support
@ukBaz pointed out that you can instead use sudo apt-get build-dep bluez
to install all the necessary dependencies.
However on Raspberry Pi OS this may give you the error: E: You must put some 'deb-src' URIs in your sources.list
. To resolve:
sudo nano /etc/apt/sources.list
and uncomment the line with deb-src
.sudo apt-get update
sudo apt update
sudo apt-get build-dep bluez
BlueZ requires a variety of dependencies and so if you don't have these installed you'll get those errors. Below is a (uncomprehensive) list of errors you might encounter and how to fix them:
Error | Solution |
---|---|
libtoolize: not found |
sudo apt install libtool |
configure: error: ALSA lib is required for MIDI support |
sudo apt-get install libalsa-ocaml-dev |
configure: error: elfutils support is required |
sudo apt-get install libelf-dev elfutils libdw-dev |
configure: error: SBC library >= 1.2 is required |
sudo apt-get install libsbc-dev |
configure: error: SPEEXDSP library >= 1.2 is required |
sudo apt-get install libspeexdsp-dev |