Compiling Mixxx for Mac OS X is a simple process once you have all dependancies and Qt set up properly. This guide assumes you have basic knowledge about using and compiling with the command line (eg: ./configure, make). If you don’t, there is a basic guide available at http://www.ee.surrey.ac.uk/Teaching/Unix/unix7.html.
This guide is written for Snow Leopard (10.6.x) and Leopard (10.5.x) but should work on Lion (10.7.x).
You will need the Xcode development tools installed. Xcode is a package provided by Apple containing compilers, libraries and additional tools required to develop applications for Mac OS X.
Get the latest version of Xcode for free using the Mac App Store. Alternatively download Xcode as a disk image from the Apple developer website. Downloading it requires a free registration at Apple's developer site.
After installing Xcode, the Command Line Tools for Xcode must be installed. Goto Xcode > Preferences > Downloads > Components > Command line tools and click Install or download the latest version for your OS manually from the Apple developer website.
Xcode 3.2.6 is the last version that can be downloaded for free for users of Snow Leopard (10.6.x) . Downloading it requires a free registration at Apple's developer site (but a paid developer program membership is not required). Download
Older versions of Xcode can be be installed from your original Mac OS X Install Disc 2 as well, look at this page for a guide. Run Software Update after installation to get the latest version for your OS.
If you need a specific older version, check the Apple Developer Tools download archive. Downloading it requires a free registration at Apple's developer site.
This is the preferred method of compiling Mixxx on OS X
Homebrew is yet another package manager for OS X. It is growing quickly in popularity. Assuming you have already installed Homebrew and gotten it working:
brew install scons portaudio libsndfile libogg libvorbis portmidi git taglib libshout protobuf flac libjpeg qt chromaprint rubberband vamp-plugin-sdk
If you have trouble compiling rubberband and vamp-plugin-sdk, try the following Homebrew formulas:
brew install http://tuohela.net/irc/vamp-plugin-sdk.rb http://tuohela.net/irc/rubberband.rb
OPTIONAL: To enable libmodplug based module tracker support.
brew install libmodplug
If you get the error
No available formula for libmodplug , enter the following:
brew create http://sourceforge.net/projects/modplug-xmms/files/latest/download
Enter Formula name
libmodplug if asked for, then enter:
brew install libmodplug
OPTIONAL: Mixxx supports using OSX-provided versions of the MP3 and AAC codec. If you don't want to use the OSX versions of these codecs you can build the codecs into Mixxx directly. To do this, you have to install the MP3 and AAC codecs using Homebrew:
brew install libid3tag libmad mp4v2 faad2
Mixxx relies on several external libraries for various features. Fortunately, you can automatically download and install most of these dependencies through MacPorts. MacPorts is a package management system that simplifies the installation of software on Mac OS X.
sudo port install scons libid3tag libmad portaudio libsndfile libogg libvorbis mp4v2 portmidi faad2 git taglib libshout2 protobuf-cpp
After installing MacPorts, using MacPorts to install the required libraries is a simple process. Using the command
sudo port install X, where X is the name of each library you’ll need, MacPorts will automatically download and install the required dependencies. This can be done one at time by entering single entries like
sudo port install scons for each library listed above or all at once by entering the entire command given above.
Note that if you attempt to install everything at once and an error occurs in installation of a library, MacPorts will not continue past the library that caused the error. For example, if after entering the full command you receive an error with
git, you’ll need to sort out the error and then finish the installation by entering
sudo port install git taglib libshout2 to properly install
git and then continue with installing
If a library already happens to be installed on your computer, that's a time-saver, and you'll see something similar to this:
~/Music/mixxx>sudo port install libmad Skipping org.macports.activate (libmad ) since this port is already active ---> Cleaning libmad
Otherwise, MacPorts will automatically install the library and you'll see something similar to this:
~/Music/mixxx>sudo port install libid3tag Password: ---> Fetching libid3tag ---> Attempting to fetch libid3tag-0.15.1b.tar.gz from ftp://ftp.mars.org/pub/mpeg/ ---> Verifying checksum(s) for libid3tag ---> Extracting libid3tag ---> Configuring libid3tag ---> Building libid3tag with target all ---> Staging libid3tag into destroot ---> Installing libid3tag 0.15.1b_0 ---> Activating libid3tag 0.15.1b_0 ---> Cleaning libid3tag
Note that the password asked for is an admin password for your local machine. This is because you are going into super-user mode in order to write the libraries to your hard drive. It's basically a safe operation, but they put it behind a password so the area where the libraries are stored doesn't get touched very often.
If you get a message like this:
Error: Target org.macports.fetch returned: fetch failed
It probably means that the config file for port hasn't been updated. Perhaps there has been a newer version of the library released. You may be hosed at this point, but if you have an older version of the library already installed on your system, it may still compile and run properly.
You will need to install the following by hand for the compile process:
If you want to compile Mixxx, you'll need to download the source code. Either grab the source for the latest release off our downloads page, or checkout the latest Mixxx code from our git repository:
git clone -b 1.11 https://github.com/mixxxdj/mixxx.git (for current stable) git clone https://github.com/mixxxdj/mixxx.git (for latest trunk)
If you used Homebrew, you need to set your compiler paths accordingly. In the below code you should customize
HOMEBREW_PATH to be the path to your homebrew installation. In this example we will use
/usr/local/homebrew (default is
HOMEBREW_PATH=/usr/local/homebrew export CFLAGS=-I$HOMEBREW_PATH/include export CXXFLAGS=-I$HOMEBREW_PATH/include export LDFLAGS=-L$HOMEBREW_PATH/lib export QTDIR=$HOMEBREW_PATH/Cellar/qt/4.8.5/
If you got the source code from Git, change to the newly created
mixxx directory, and use scons to compile and install:
If you used the 1.11 branch, you must type
cd mixxx twice.
cd mixxx scons hss1394=0 mad=0 faad=0 coreaudio=1 verbose=0 scons bundle
As of v1.12, Mixxx will use CoreAudio to decode MP3 and AAC files by default. If you want to use
libfaad for MP3 and AAC decoding, simply set the
faad flags and clear the
coreaudio flag. To enable libmodplug based module tracker support, set the
modplug flag. For example:
scons hss1394=0 mad=1 faad=1 coreaudio=0 modplug=1 verbose=0
If it you get a message like:
Error: QT path does not exist or QT4 is not installed.
If you installed Qt to a custom location you will have to provide this via the
qtdir flag. For example, you could try:
Because /Developer is a common place for Qt to drop its frameworks.
If it you get a message like:
d: warning: in /opt/local/lib/libGLU.dylib, file was built for unsupported file format which is not the architecture being linked (i386)
Then try the “scons” command above like this:
This should generate
Mixxx.app which you can run by double-clicking on or typing
open Mixxx.app. Generating the .app has some expensive scanning and relinking steps so if you want to avoid this you can skip
scons bundle and instead on the first run of mixxx run it as:
./mixxx --resourcePath res/
So that it records res/ in mixxx.cfg as where to find skins etc instead of dying at startup.
If you wanted to update later to a newer git snapshot, you would go back to the mixxx directory and run:
If you want to work on Mixxx with XCode for an IDE:
This is taken from the Scons site, who have a pretty good description of how to get a scons project up and running in XCode: