Building Dolphin on Linux

Binaries for Ubuntu-based distributions only are available on Dolphin's download page. Users running other distros have to build Dolphin from source. Dolphin is compatible with 64 bit Linux distributions. This is a guide to compiling Dolphin using the cmake build system.

For help on building on Ubuntu-based distros, such as Linux Mint, Elementary OS, Zorin OS, Bodhi Linux, Deepin, Linux Lite, Pinguy OS, Kubuntu, Xubuntu, Lubuntu, Ubuntu GNOME, Edubuntu, Ubuntu Studio or Mythbuntu, see the instructions for Ubuntu below.

Ubuntu
Follow the steps below only if you like to make your own package or use a specific git commit version. There's a PPA with dolphin already built, easy to use.

12.04 (LTS)
Follow this step for Ubuntu 12.04 (LTS). You need to install a g++ version with C++0x/C++11 support, so install this PPA first:

sudo add-apt-repository ppa:dolphin-emu/gcc-for-dolphin

sudo apt-get update

This PPA will update libstdc++6 package too, which is an important component from the system, so be careful and use at your own risk.

Cmake needs to be updated too:

sudo add-apt-repository ppa:kalakris/cmake

sudo apt-get update

There is no ppa for libevdev-dev, so you will need to build libevdev from source, or disable the evdev backend

Now, install all necessary packages by running the following command:

sudo apt-get install cmake pkg-config git gcc-4.9 g++-4.9 libao-dev libasound2-dev libbluetooth-dev libgl1-mesa-dev libgtk2.0-dev liblzo2-dev libopenal-dev libpulse-dev libreadline-dev libsdl1.2-dev libsoil-dev libxext-dev libxrandr-dev zlib1g-dev libudev-dev

14.04 (LTS)
Follow this step for Ubuntu 14.04 (LTS). Dolphin needs GCC >= 4.9 now, so install this PPA first:

sudo add-apt-repository ppa:dolphin-emu/gcc-for-dolphin

sudo apt-get update

Install all necessary packages by running the following command (minimum version for Wx is 3.0.1, but trusty repo comes with 3.0.0, so it will build from Externals):

sudo apt-get install cmake pkg-config git gcc-4.9 g++-4.9 libao-dev libasound2-dev libavcodec-dev libavformat-dev libbluetooth-dev libgtk2.0-dev liblzo2-dev libopenal-dev libpulse-dev libreadline-dev libsfml-dev libsoil-dev libswscale-dev libusb-1.0-0-dev libxext-dev libxrandr-dev portaudio19-dev zlib1g-dev libudev-dev libevdev-dev

15.04 and newer
Follow this step for Ubuntu 15.04 and future versions. Install all necessary packages by running the following command:

sudo apt-get install cmake pkg-config git g++ libao-dev libasound2-dev libavcodec-dev libavformat-dev libbluetooth-dev libenet-dev libgtk2.0-dev liblzo2-dev libminiupnpc-dev libopenal-dev libpolarssl-dev libpulse-dev libreadline-dev libsfml-dev libsoil-dev libsoundtouch-dev libswscale-dev libusb-1.0-0-dev libwxbase3.0-dev libwxgtk3.0-dev libxext-dev libxrandr-dev portaudio19-dev zlib1g-dev libudev-dev libevdev-dev

Other Linux Distributions
If running a distribution without apt, see the build dependencies in Addendum A for a list of packages needed to install.

Step 2 - Get the Dolphin Repository
Install git if it's not already installed:
 * for apt-based distros (eg Ubuntu, Debian, Linux Mint):
 * for rpm-based distros (eg Red Hat, Fedora, SUSE):
 * for pacman-based distros (eg Arch Linux):

Get a local copy of the dolphin-emu repository:

Change to the directory created.

To update the local copy in the future without repeating the whole process, run  within the   directory and proceed to the following steps.

Step 3 - Building Dolphin
Create a build subdirectory, and change into it. The name Build is used in this example.

Configure the build.

If you are using a different gcc version (4.9 on Ubuntu 14.04 for example), you'll need to overwrite some flags:

Optionally you can change the install prefix by adding "-D CMAKE_INSTALL_PREFIX=/new/path". Note that this path does not need to be absolute. cmake will complete it to its absolute equivalent. The default prefix is "/usr". This means that the executable will be installed as "/usr/bin/dolphin-emu", the plugins will be installed into "/usr/lib/dolphin-emu", and the shared data files will be installed into "/usr/share/dolphin-emu".

From here build and install in the standard make way.

Note that superuser privileges are needed for.

To have the "local" build setup from the deprecated scons build configure the build with the following command.

Step 4 - Run Dolphin!
Run Dolphin by executing:

The same action can be done graphically from within some desktop environments, such as Unity's Dash menu on Ubuntu. If the prefix was changed in step 3 and $prefix/bin is not in the path, then precede this with the path to the executable.

FAQ

 * Where can I get help?

Go to the forums. Lots of Dolphin users use Linux, and they are very experienced with this process.


 * My build failed, but I did nothing wrong!

Most of the time, any problems in the build process are due to user error. It's understandable, it is a complicated process and can be quite daunting for a first timer. But sometimes even with everything right, triple checked, and it's still not working. It's rare, but sometimes a build will just be bugged. But many of Dolphin devs are Linux users, so just wait a day or so, and it will be sorted out.


 * I want a PKGBUILD!

Here is a PKGBUILD for the stable branch. For the master branch, see this PKGBUILD (in pkgver=4.0.rxxxx.7222eb1 replace "xxxx" with the number of the desired revision). Other PKGBUILDs can be found on the Arch User Repository.

Addendum A
This addendum lists the dependencies to build Dolphin.

Build Dependencies
These packages must be installed before building Dolphin.
 * git
 * cmake
 * gcc
 * libwxbase3.0-dev
 * libwxgtk3.0-dev
 * libgtk2.0-dev
 * libxext-dev
 * libreadline-dev
 * libgl1-mesa-dev
 * libevdev-dev
 * libudev-dev

Addendum B
Scripts for building Dolphin.

General purpose script
This script checks for Dolphin's source code, downloads it or updates it, then compiles it and finally installs it. It is somewhat interactive and distro-independent. It will not install any of the dependencies listed above, and will fail if any of them are missing. Install manually as described at the first step. Licence: GNU General Public Licence v2 or (at your option) any later version of the GPL.
 * 1) !/bin/bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" getdolphin { echo 'Downloading Dolphin...' git clone https://github.com/dolphin-emu/dolphin.git } updatedolphin { cd $DIR/dolphin echo 'Updating the local repository...' git pull origin } build { cmake $DIR/dolphin make } updatedolphin || getdolphin mkdir $DIR/build cd $DIR/build build && echo 'Compiled successfully.' || exit echo 'Proceeding to the installation; press Enter to continue or Ctrl+C to cancel.' read if [ $(whoami) == "root" ]; then make install else sudo make install fi

Instructions:

Put this script in any directory, preferably a subdirectory of the Home directory, such as Within this directory, the script will create two subdirectories, dolphin-emu and build. It must remain in this directory to work. Execute the script from anywhere, by running, where /path/to/the/script.sh is replaced with the actual path to the script. The script will download Dolphin's source, or update it if it has already been downloaded once. After building it, the script will install it. This requires root privileges. After the installation, the script exits, and Dolphin can be used. Note that the process is very fast and simple after the first time. Using a bash alias to execute the script by running a custom command such as  is recommended.