These instructions are for building the latest development version of Marsyas. It is assumed that you have already obtained the source code. If not, please consult Get Marsyas sources for instructions.
Marsyas uses CMake to configure and guide its building process.
Download CMake from the following link and install it: http://www.cmake.org/cmake/resources/software.html
At some point in installation you may be asked whether you want to install links to CMake to system locations - choose "yes": this will allow you to run CMake from the Terminal.
Xcode development environment provides the Clang compiler required to compile Marsyas. If you want to use all Marsyas features, you need a compiler with a decent C++11 support. Hence, please install the latest Xcode version from Apple: https://developer.apple.com/xcode/
Just as with CMake above, confirm installation of compilation tools to system locations, so as to make them available for use in the Terminal.
mkdir build cd build
CMake should now have generated a number of new files in the build directory, including a file named "Makefile" which allows you to compile Marsyas.
If you would like to use CMake options to enable and disable specific features, please see instructions in Configuring with CMake.
Still in the build directory, use the 'make' command to compile Marsyas.
Geeky note: If your CPU has multiple cores (it is capable of running multiple threads in parallel), you can shorten the compilation time by running several instances of 'make' in parallel by using the '-j' option followed by the number of instances. The example below runs 3 parallel 'make' instances:
You could also compile Marsyas in Debug mode, which would help developers discover bugs in case you run into troubles when using Marsyas. However, Marsyas will run significantly slower when compiled in Debug mode.
To compile in Debug mode, you need to first use 'cmake' to change a CMake option named CMAKE_BUILD_TYPE, and then run 'make'. Please mind the "." at the end of the first command, to indicate the current directory:
cmake -DCMAKE_BUILD_TYPE=Debug . make -j3
After compiling, you should have several Marsyas programs in the
build/bin subdirectory and the Marsyas library in the
For example, assuming that you are in the
build directory, you can run
sfplay program to play an uncompressed sound file like this:
If you want to make the programs and the library available outside of your build directory, you should use the following command to install all parts of Marsyas to appropriate system locations:
By default, the above command will install programs and libraries under the
/usr/local prefix. You can change that by setting the CMake option
CMAKE_INSTALL_PREFIX to the desired prefix before installation:
cmake -DCMAKE_INSTALL_PREFIX=~/marsyas-install . make install