This is an old revision of the document!
Compiling software is the process of turning human-readable source code into machine code a computer can execute. Compiling Mixxx is fairly straightforward on Linux. The steps below outline what to do.
Mixxx relies on several external libraries for various features.
If your distribution is Debian based (such as Ubuntu), you can install them by running:
sudo apt-get install g++ git scons libportmidi-dev libopusfile-dev \ libshout-dev libtag1-dev libprotobuf-dev protobuf-compiler \ libusb-1.0-0-dev libfftw3-dev libmad0-dev portaudio19-dev \ libchromaprint-dev librubberband-dev libsqlite3-dev \ libid3tag0-dev libflac-dev libsndfile-dev libupower-glib-dev \ libavcodec-dev libavformat-dev libgl-dev liblilv-dev \ libjack-dev libjack0 portaudio19-dev \ libfaad-dev libmp4v2-dev libmp3lame-dev
Note: libfaad-dev libmp4v2-dev required for M4A support. The installation order is important.
If you are building the Mixxx master Git branch, additionally run:
sudo apt-get install qt5-default qtdeclarative5-dev libqt5opengl5-dev qtscript5-dev libqt5svg5-dev libqt5x11extras5-dev libvamp-sdk2v5 libhidapi-libusb0 libqt5sql5-sqlite libmodplug-dev
If you are building Mixxx 2.2 Git branch, additionally run:
sudo apt-get install qt5-default qtdeclarative5-dev libqt5opengl5-dev qtscript5-dev libqt5svg5-dev libqt5x11extras5-dev libqt5sql5-sqlite libmodplug-dev
If you are building Mixxx 2.1, additionally run:
sudo apt-get install libqt4-dev libqt4-sql-sqlite libqt4-opengl-dev libqt4-svg libqt4-xmlpatterns libqt4-sql
If your distribution is Raspian, you can install them by running:
sudo apt-get remove libtag1-vanilla sudo apt-get install g++ git scons libqt4-dev libqt4-sql-sqlite libportmidi-dev \ libopusfile-dev libshout3-dev libtag1-dev libprotobuf-dev protobuf-compiler \ libusb-1.0-0-dev libfftw3-dev libmad0-dev \ portaudio19-dev libchromaprint-dev librubberband-dev libsqlite3-dev \ libid3tag0-dev libflac-dev libsndfile1-dev libupower-glib-dev liblilv-dev sudo apt-get install libjack-dev libjack0 portaudio19-dev # because of Bug #1464120 sudo apt-get install libfaad-dev libmp4v2-dev # required for M4A support sudo apt-get install libmp3lame-dev
If the libopusfile-dev is not avaliable for you, download, build and install:
sudo apt-get remove g++ g++-4.7 sudo apt-get autoremove sudo apt-get install g++-5 ln /usr/bin/g++-5 /usr/bin/g++ scons -c && scons -j 2 opengles=1 staticlibs=1 optimize=portable
You must build in Raspberry pi 3.
Raspberry pi 2 i had the error:
Error: open CFI at the end of file; missing .cfi_endproc directive
It seems a memory limitation.
Tested on: 2017-11-29-raspbian-stretch.img
On Fedora, enable the RPMFusion package repository. You only need to enable the free repository; the nonfree repository is not necessary for Mixxx. Then run:
su [Enter the password for the user "root" at the prompt] dnf groupinstall "Development Tools" dnf install gcc-c++ lame-devel dnf builddep mixxx
If you are developing in Arch, you should have the base-devel group installed.
The tools you are going to need for working with Mixxx are:
pacman -S git gcc
Alternatively, you can substitute gcc with clang.
You will also need SCons-2.* to build the project. Arch no longer provides scons-2.* in the repos and since mixxx's build system doesn't work with python3 you must use a standalone version.
The workaround is quite easy, as mentioned at the top of this page:
Download a standalone version of SCons 2.5.1 from here and then do the following:
tar xzvf /path/to/scons-2.5.1.tar.gz scons-2.5.1/ mv scons-2.5.1 /path/to/where-you-want-it-to-live # and then inside the cloned mixxx directory use it as such python2 /path/to/where-you-want-it-to-live/script/scons ...
Then you just need the dependencies:
# install the dependencies sudo pacman -S libid3tag libmad portaudio qt libogg \ libvorbis libsndfile portmidi libmp4v2 faad2 libshout \ taglib protobuf vamp-plugin-sdk rubberband \ chromaprint sqlite upower lilv lame
If your distribution's Qt package is older than the version required by Mixxx, download the latest Qt source code. For each Qt version, it is available at that link in a directory called “single” and has a filename like
qt-everywhere-src-VERSION.tar.xz. Extract that archive and compile the source code:
tar xf qt-everywhere-src-VERSION.tar.xz cd qt-everywhere-src-VERSION ./configure -prefix /path/to/install -system-sqlite -sql-sqlite -qt-zlib -opensource -confirm-license -nomake examples -nomake tests -skip qt3d -skip qtwebengine gmake -j4 # replace 4 with however many threads your CPU can run. This will take a long time. gmake install export PKG_CONFIG_PATH=/path/to/install # otherwise scons will use your system Qt package
For other distributions, you will need to install the following through your distribution's package manager. On most distributions, you will also need the corresponding -dev or -devel packages for each package. If you cannot find a package listed here that starts with “lib”, try searching for the package name without the “lib” prefix.
If you are still running as root from installing packages, return to using your normal unprivileged user account (press Ctrl + D or run
If you want to compile Mixxx, you'll need to download the source code. Either grab the source for the latest release from our downloads page, or checkout a snapshot from our git repository:
git clone https://github.com/mixxxdj/mixxx.git
git clone -b 2.2 https://github.com/mixxxdj/mixxx.git
To update to the latest version of a git branch, enter (
cd into) the directory you cloned the git repository into and run
git pull. Refer to Using Git for more details.
Once you have the source code, change to the newly created “mixxx” directory (run
cd mixxx). Mixxx uses the SCons build system rather than the more common GNU autotools and GNU make. Running
scons -h in the “mixxx” directory shows a complete list of build flags if you'd like to customize. To compile without any special options, as a regular user, run:
scons prefix=INSTALLATION_DIRECTORY -j NUMBER_OF_CPU_CORES optimize=native
Change INSTALLATION_DIRECTORY to the location you want to install Mixxx to. If you want to install Mixxx for all users of the OS, you do not need to specify a prefix and can leave it as the default, which is /usr/local. If you only want to install Mixxx for your user, you can specify a location in your home directory such as ~/local
scons will take some time, depending on the speed of your computer. Specifying NUMBER_OF_CPU_CORES will tell scons to run that many threads at a time while compiling. This speeds up compilation on multi-core CPUs. You can check how many threads your CPU can run simultaneously with the
lscpu command (look for the
CPU(s) field in the output). Setting more threads than your CPU can handle will decrease performance.
Once Mixxx has compiled, if you set the prefix options for scons to a directory that your normal user does not have write access to, run
sudo scons prefix=INSTALLATION_DIRECTORY install
to install it. If you set the prefix to a directory your user does have write access to, then you do not need
scons. The prefix option must be the same as before or scons will recompile Mixxx before installing it.
If you want to be able to run Mixxx on different types of CPUs, change
optimize=portable. If you want to contribute code to Mixxx and use a debugger, use
To compile on a Raspberry Pi, use the arguments:
optimize=native opengles=1 machine=armhf
To catch bugs early during development build and run Mixxx with the following options.
Debug builds should started with the option
–debugAssertBreak to trigger a breakpoint in the debugger if debug assertions are violated or to abort Mixxx immediately. This ensures that messages about violated debug assertions are not missed between various other debug log messages.
If you want to play m4a files, add
faad=1 to your scons commands above. This requires the libraries faad2 and libmp4v2 (or libmp4) to be installed.
On Debian, Clang is provided as a package with a version number attached. Using 6.0 as an example, install it like this:
sudo apt-get install clang-6.0
To compile Mixxx using Clang 6.0, before running
export CC=clang-6.0 export CXX=clang++-6.0
You can now use clang-specific SCons options.
If scons can't find installed dependencies, try
To uninstall a copy of Mixxx that you compiled,
cd into the directory where you ran
scons before, then run:
scons -c prefix=INSTALLATION_DIRECTORY install
INSTALLATION_DIRECTORY must be the same as that used when compiling and installing. If you needed to use
sudo to install, also use
sudo to uninstall.
scons fails with mysterious errors about not finding dependencies that you know are installed, it may be using outdated cached information to look for the dependencies. This can happen after upgrading your GNU/Linux distribution. To resolve this, try running
scons -c and recompiling Mixxx.
If you want to just run this copy without installing, from the same directory, run: (WARNING this uses and may overwrite user-wide configs)
./mixxx --resourcePath res/
To also run from a different settings folder use:
./mixxx --resourcePath res/ --settingsPath /*the folder you like*/