Home | About | Community | Download | Documentation | Planet |
↩ Back to Developer Documentation
If you want to use the current development version of PulseAudio, follow these instructions.
Obtaining the Source Code
Clone the source code repository on your machine:
git clone https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
These commands will create a new subdirectory with name "pulseaudio" in the current working directory.
Building
After getting the source, go to the pulseaudio directory and run these commands:
meson build
ninja -C build
The first command configures the project and creates the subdirectory "build" where build artifacts go. The second command builds the code.
If there are complaints about something not being found, then you need to install the missing things. The list of build dependencies may be useful: http://www.freedesktop.org/wiki/Software/PulseAudio/Download/
On Debian and its derivatives (Ubuntu etc.) it's possible to use "apt-get build-dep pulseaudio" to install all the build dependencies. On Fedora "dnf builddep pulseaudio" can be used for the same.
Building to install to a custom location
If you want to install PulseAudio to a custom location (i.e. a prefix install), you can do the following:
meson --prefix=<prefix-path-here> build
Installing and Running
Method 1: System-Wide Installation Under /usr/local
This is the simplest method. The drawback is that it will affect the whole system: the self-compiled version will be used everywhere instead of the distribution's version of PulseAudio. The development version should be pretty stable in general, though, so replacing the distro version isn't really a big deal (the distribution version will still exist in the system, but it just won't be used).
Two commands:
sudo ninja -C build install
sudo ldconfig
Uninstalling the self-compiled version is a matter of deleting all pulseaudio files under the /usr/local hierarchy (TODO: the exact rm commands would be nice here). "sudo ninja -C build uninstall" works too, but it will only remove the files that were installed by the last "sudo ninja -C build install" command, so if you over time install many versions without uninstalling in between, the old installations may have files that are not included in the latest install, and in such case "sudo ninja -C build uninstall" will not remove everything. Also, if "sudo ninja -C build install" installed something in the same place where the distribution installs files, then those are removed too, and that may cause trouble (such trouble should be fixable by forcing a reinstall of the distribution's pulseaudio packages).
Also note that some system-installed files (udev and systemd user units) will be overwritten.
Method 2: Installing to a Custom Directory
You need to use the instructions from "Building to install to a custom location" above. With that done, you can install to the prefix you chose with:
ninja -C build install
That's it, the binaries, modules and configuration are all installed in the prefix path.
Note that certain files that involve interaction with the system will not take effect (at the moment this includes udev rules, systemd user units, and bash/zsh completion).
Uninstalling in this setup can be done with a "ninja -C build uninstall" or simply deleting the prefix directory (assuming you have nothing else of value there).
Method 3: Running From the Build Tree Without Installing
TODO. (A lot of information can be found here: http://colin.guthr.ie/2010/09/compiling-and-running-pulseaudio-from-git/. It would be good to copy that here.)