Search code examples
raspberry-pidebianbluez

Dependency errors when configuring BlueZ on Raspberry Pi OS


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

Solution

  • Update 07/05/2023

    @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:

    1. Run sudo nano /etc/apt/sources.list and uncomment the line with deb-src.
    2. Run sudo apt-get update
    3. Run sudo apt update
    4. Now run sudo apt-get build-dep bluez

    Previous Answer

    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