DEV Community

Cover image for Building Ardour from Source on Linux: A Comprehensive Guide
Ericson Willians
Ericson Willians

Posted on

Building Ardour from Source on Linux: A Comprehensive Guide

Ardour is an advanced open-source Digital Audio Workstation that you can compile on Linux for free. Yet, when you finish building it, you might face the real battle: getting audio to work with ALSA, PulseAudio, JACK, or PipeWire. This guide will take you through:

  1. Installing Ardour from source.
  2. Wrestling with Linux audio drivers and routing systems.
  3. Common steps to fix "no sound" or "device locked" nightmares, including dealing with an unexpected device like a DualSense controller.

Table of Contents

  1. Introduction
  2. Why Build Ardour from Source
  3. Prepare Your System
    1. Install Build Tools
    2. Install or Build Dependencies
      • Building LV2 from Source (Optional)
  4. Clone Ardour's Source Code
  5. A Quick Look at Ardour's Waf Build System
  6. Configure
  7. Compile
  8. Install
  9. Aftermath: Audio Rerouting Hell
    1. ALSA vs PipeWire vs PulseAudio vs JACK
    2. Fighting Lockups (systemctl and alsa force-reload)
    3. Dealing with the Wrong Default Device (DualSense Example)
    4. Ensuring Ardour's Master Bus is Connected
  10. Conclusion

1. Introduction

Ardour offers free source code, plus pre-built binaries for a fee. By compiling from source, you get maximum control and the newest code. But expect extra steps:

  • More dependencies
  • Configuration flags
  • Possible audio integration headaches

Let's start from the ground up.


2. Why Build Ardour from Source

  • No cost for compiled binaries
  • Access to cutting-edge features from Ardour's main branch
  • Tweakable build flags (optimize for your CPU)
  • Deep insight into how a professional DAW is built

3. Prepare Your System

3.1 Install Build Tools

Use Debian- or Ubuntu-based systems as an example:

sudo apt update && sudo apt upgrade -y
sudo apt install -y build-essential git python3 waf ninja-build
Enter fullscreen mode Exit fullscreen mode

Explanation:

  • build-essential: compilers and core development utilities
  • git: fetch Ardour's source
  • python3 waf: Waf build system
  • ninja-build: optional but can improve build speed

3.2 Install or Build Dependencies

Ardour requires multiple libraries:

sudo apt install -y \
  libglib2.0-dev libgtk-3-dev libjack-jackd2-dev libasound2-dev libpulse-dev \
  libserd-dev libsord-dev libsratom-dev liblv2-dev lilv-utils libaubio-dev \
  libfftw3-dev libogg-dev libvorbis-dev libflac-dev libsndfile1-dev liblo-dev \
  libcurl4-openssl-dev libarchive-dev libboost-all-dev libtag1-dev \
  libsamplerate0-dev libreadline-dev libedit-dev libwebsockets-dev \
  libusb-1.0-0-dev libgiomm-2.4-dev libcairomm-1.0-dev libpangomm-1.4-dev \
  libcppunit-dev libcwiid-dev liblrdf-dev vamp-plugin-sdk librubberband-dev \
  libsratom-dev lilv-dev
Enter fullscreen mode Exit fullscreen mode

Building Dependencies from Source on Linux (General Guidance)

Compiling a large application (like Ardour) often involves dependencies that your distro may not provide or might only have outdated versions. Below are general techniques to detect which build system a dependency uses and how to compile it successfully—using LV2 as an example, but these steps apply to any library or plugin you might need.


1. Identify the Build System

  1. Look for a build script:

    • Meson: Files named meson.build (and possibly meson_options.txt).
    • Autotools/Make: A configure script and/or a Makefile.
    • CMake: A CMakeLists.txt file.
  2. Check the documentation:

    • Many projects include INSTALL.md or a README.md with explicit build instructions.
    • If the docs mention commands like meson setup or cmake .., follow that method.

2. Example: Meson-based Builds

If your project has a meson.build file:

  1. Install Meson and Ninja (if needed):
   sudo apt install meson ninja-build
Enter fullscreen mode Exit fullscreen mode
  1. Check for missing dev packages: If the library says it needs libsord, libsratom, or similar, install them:
   sudo apt install libsord-dev libsratom-dev
Enter fullscreen mode Exit fullscreen mode

or compile those from source similarly.

  1. Configure and Build:
   meson setup build
   meson compile -C build
   sudo meson install -C build
Enter fullscreen mode Exit fullscreen mode
  1. Verify your library is in the right place (often /usr/lib/ or /usr/local/lib/).

3. Example: Traditional Autotools/Make

If you see a configure script or a plain Makefile:

  1. Install development tools:
   sudo apt install build-essential
Enter fullscreen mode Exit fullscreen mode
  1. Run Configure (if present):
   ./configure --prefix=/usr
Enter fullscreen mode Exit fullscreen mode

or adapt as recommended in the docs.

  1. Compile and Install:
   make
   sudo make install
Enter fullscreen mode Exit fullscreen mode
  1. Resolve Dependencies:
    • If make fails complaining about missing headers, search your package manager for the "dev" packages.
    • Or compile those dev libraries from source using the same approach.

4. General Tips for All Dependencies

  • Read the Logs: Error messages are your friend. If something like "fatal error: sratom/sratom.h not found" appears, you need libsratom-dev or the source for sratom.
  • Know Your Package Manager: On Debian/Ubuntu-based systems, dev packages typically end with -dev. For Fedora, you might see a .devel suffix.
  • Check for pkg-config Support: If a project uses pkg-config, install the .pc files (often in the -dev or -devel package) so your build system can detect them easily.
  • Verify Paths: If you installed something to /usr/local/, ensure the environment variables (like LD_LIBRARY_PATH or PKG_CONFIG_PATH) are updated accordingly.
  • Consult README or INSTALL: Each project is unique, and these files often list required packages or steps.
  • Confirm Installation: Tools like ldconfig (on Debian/Ubuntu) or checking /usr/local/lib/ can confirm if your library is now recognized.

5. Applying This to Ardour

When Ardour fails to build because of a missing dependency (for example, LV2-related libraries), you can:

  1. Find out if that library uses Meson, Make, or another system.
  2. Follow the matching steps above (install dev packages or build from source).
  3. Re-run Ardour’s ./waf configure until it detects everything correctly.
  4. Proceed with ./waf build && sudo ./waf install.

With a bit of detective work—and paying close attention to logs—you can compile both Ardour and any missing libraries successfully on Linux.


4. Clone Ardour's Source Code

mkdir -p ~/workspace
cd ~/workspace
git clone https://github.com/Ardour/ardour.git
cd ardour
Enter fullscreen mode Exit fullscreen mode

Now you have the Ardour source in a directory named ardour.


5. A Quick Look at Ardour's Waf Build System

Ardour uses a script called wscript which:

  • Detects dependencies (ALSA, JACK, PulseAudio, etc.)
  • Chooses CPU optimizations (SSE, AVX, NEON)
  • Manages plugin support flags (LV2, VST, etc.)

You typically do not edit wscript. Instead, pass options:

  • --with-backends=jack,alsa,pulseaudio
  • --no-lxvst or --no-vst3
  • --cxx17 (if your compiler supports it)

Run ./waf --help in the ardour folder to see all possible flags.


6. Configure

From the ardour directory:

./waf configure --prefix=/usr --optimize
Enter fullscreen mode Exit fullscreen mode
  • --prefix=/usr: places Ardour in /usr/bin, /usr/lib, etc.
  • --optimize: compiles a release build with debug symbols

If you want or need specific flags, add them:

  • --no-lxvst
  • --with-backends=alsa,jack
  • --lv2dir=some_directory

If it fails, check the last lines to see which library is missing.


7. Compile

./waf -j$(nproc)
Enter fullscreen mode Exit fullscreen mode
  • -j$(nproc): uses all CPU cores
  • Build time: anywhere from 10 to 45 minutes

8. Install

sudo ./waf install
Enter fullscreen mode Exit fullscreen mode

Now Ardour is installed, typically in /usr/bin/ardour9 plus related libraries in /usr/lib/ardour9.

If not, you can locate it in the local build folder:

/ardour/build/gtk2_ardour/ardour9


9. Aftermath: Audio Rerouting Hell

You have successfully built Ardour, but no sound is coming out or your system audio locks up. Welcome to the real puzzle.

9.1 ALSA vs PipeWire vs PulseAudio vs JACK

  • ALSA is the kernel-level driver system.
  • PulseAudio used to be the default for desktop mixing but can introduce latency.
  • JACK offers low-latency pro-audio handling but can conflict with PulseAudio.
  • PipeWire attempts to unify all of the above, acting as a replacement for JACK and PulseAudio.

Because these systems can lock devices or override each other, many users see:

  • No sound from Ardour while other apps work
  • Ardour locking the device (killing system audio)
  • An unexpected device (like a DualSense controller) becoming the default

9.2 Fighting Lockups (systemctl and alsa force-reload)

If Ardour locks ALSA or if PipeWire is conflicting, you might do:

systemctl --user stop pipewire pipewire-pulse wireplumber
systemctl --user start pipewire pipewire-pulse wireplumber
sudo alsa force-reload
Enter fullscreen mode Exit fullscreen mode

Then re-open Ardour. Sometimes, manual resets are needed.

9.3 Dealing with the Wrong Default Device (DualSense Example)

Suppose your system picks a game controller as the default audio interface instead of built-in audio. One way to fix it is to change your default sink in PipeWire:

pw-metadata -n settings 0 target.node "alsa_output.pci-0000_00_1f.3.analog-stereo"
systemctl --user restart pipewire pipewire-pulse wireplumber
Enter fullscreen mode Exit fullscreen mode

Afterwards, Ardour might finally see "Built-in Audio Analog Stereo" as the main output. You can manually select it in Ardour's Audio/MIDI Setup or in the session's routing grid. In practice, you do not necessarily have to blacklist anything; simply pick the correct system audio output instead of the DualSense controller.

9.4 Ensuring Ardour's Master Bus is Connected

Ardour might show no physical outputs or only the wrong device in the routing grid. Try:

  1. Open the Routing Grid in Ardour.
  2. Find "Built-in Audio" or the correct device.
  3. Manually connect the Master bus (Left/Right) to your system outputs.
  4. If using a software instrument like ACE Fluid Synth, ensure it's routed to the Master bus.

If you still have no sound, test a known WAV file on a track. If that is also silent, confirm Ardour's device selection matches the system. For PipeWire setups, it may help to run Ardour with:

pw-jack ardour
Enter fullscreen mode Exit fullscreen mode

to ensure JACK emulation is active.


10. Conclusion

Building Ardour from source is straightforward if you have the right libraries. The bigger challenge is ensuring that your newly compiled Ardour cooperates with ALSA, JACK, PipeWire, or PulseAudio. If you get stuck:

  • Choose the correct default audio device in your system.
  • Double-check the Master bus connections in Ardour.
  • Verify no other processes are locking ALSA or JACK.

With patience, you can tame the routing chaos and enjoy a fully custom, modern, low-latency Ardour build.

Top comments (0)