Compiling lmms (Apple) - eagles051387/lmms GitHub Wiki
Dependencies
The following dependencies should be met before compiling LMMS:
-
:bulb: Note: Qt5 on homebrew requires OS X 10.8 or higher per
homebrew/#45284 -
Xcode Command Line Utilities
-
Xcode 4.6.3 or higher (2.2GB)
- :bulb: Note: If you've recently upgraded your OS X version (e.g. from Yosemite to El Capitan), first make sure your XCode isn't outdated by running
open -a XCode, or by locating it in Applications.
- :bulb: Note: If you've recently upgraded your OS X version (e.g. from Yosemite to El Capitan), first make sure your XCode isn't outdated by running
-
Xcode Command Line Utilities
sudo xcode-select --install sudo xcodebuild -licenseNote: Alternately, you may install the command line tools via Applications, Xcode, Xcode Preferences menu, Downloads tab, Command Line Tools, Install
-
Homebrew or MacPorts required for fetching build dependencies
Homebrew
Skip this section if using MacPorts for fetching dependencies
-
Install Homebrew per http://brew.sh
-
Update brew
brew update -
Clone source code
git clone https://github.com/lmms/lmmsNote: Optional, to clone a specific branch use the -b switch e.g.
git clone -b master https://github.com/lmms/lmms -
Install brew dependencies using travis install file.
Note: Optional, if Qt5 is desired
export QT5=Truesh lmms/.travis/osx..install.sh -
Note if you receive the following curl SSL error, this is most likely due to a missing SSL certificate. To fetch the latest certificates, run apple software updates, reboot and try again.
curl: (35) error:14077458:SSL routines:SSL23_GET_SERVER_HELLO:reason(1112)
Failed to download resource ".."
Download failed ...
- Continue on to the Compiling section
MacPorts
Skip this section if using Homebrew for fetching dependencies
-
Install MacPorts per https://www.macports.org/install.php
-
Update the collection of available port definitions:
sudo port selfupdate -
Install LMMS and all of its dependencies automatically:
sudo port install lmmsThe LMMS application bundle will be in your MacPorts applications folder, which is /Applications/MacPorts unless you changed it.
-
Alternately, if you would like to use MacPorts only to get the dependencies and compile LMMS from source manually:
sudo port install cmake fftw-3-single fltk \ fluidsynth jack libgig libogg libsamplerate libsdl \ libsndfile libvorbis portaudio qt4-mac stk pkgconfig \ nodejs npmNote: If the build fails because it can not find the QT version as in the following snippet then you should check that you can run qmake from the console, if you can't, you probably need to manually create 2 links (or find a better solution for the ticket macports qt4-mac)
CMake Error at /opt/local/share/cmake-3.4/Modules/FindQt4.cmake:1324 (message): Found unsuitable Qt version "" from NOTFOUND, this code requires Qt 4.x Call Stack (most recent call first): CMakeLists.txt:160 (FIND_PACKAGE)sudo ln -s /opt/local/libexec/qt4/bin/qmake /opt/local/bin/qmake sudo ln -s /opt/local/libexec/qt4/bin/lrelease /opt/local/bin/lrelease -
Install appdmg (Needed only for for packaging the DMG file)
sudo npm install -g appdmg -
Continue on to the Compiling section
Compiling
See also Compiling lmms (Linux)
-
Assuming you have already fetched the sources (see Accessing git repository if not), switch to the source root directory, and create a new directory which is needed for you build.
cd cd lmms mkdir build -
Optionally, you can also create a "target" directory, or you can install LMMS to any empty directory of your choice.
mkdir target -
Then configure LMMS with CMake, using the previously created target directory (or any empty directory of your choice, in which case just replace "../target" with the directory you want to use).
Note: Optional, if Qt5 is desired
export CMAKE_PREFIX_PATH="$(brew --prefix qt5)"cd build cmake .. -DCMAKE_INSTALL_PREFIX=../targetNote: If you receive the error
/usr/bin/xcode-selectreturned unexpected error- Make sure to install XCode as well as the XCode Command line tools for your platform
- Remove CMakeCache.txt
- Retry
Note: To build for older versions (i.e. OS X 10.8), you will need the corresponding Xcode SDK installed.
- Specify the target using:
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.8
-
Now compile LMMS:
Note:
make -j2, commonly used on Linux, won't work here.make -
Run LMMS:
./lmms
Installing
-
You only need to do this step once. Extract a copy of the stk source code in your home directory (
make installwill copy the rawwaves directory from the stk source directory into theLMMS.appapplication bundle):cd curl -O https://ccrma.stanford.edu/software/stk/release/stk-4.5.0.tar.gz tar xopzf stk-4.5.0.tar.gz -
Finally, install LMMS into the previously specified directory:
make install -
This will automatically create an
LMMS.appapplication bundle in thebuilddirectory.
You may copy this to Applicationsor run it directly from thebuilddirectory
Packaging
-
Optionally, you may wish to package this into a DMG:
make dmg
Debugging LMMS OSX
- Clean the build environment
make clean
rm -rf CMakeCache.txt
- Re-run cmake configure step with the following additional parameters:
-DCMAKE_BUILD_TYPE=Debug -DWANT_SWH=OFF
-
Re-run the
make installstep -
Launch LMMS with the lldb debugger. You will be prompted for your password.
lldb ~/Desktop/LMMS.app/Contents/MacOS/lmms -
Reproduce the crash. Hit CTRL+C. Type this command from lldb for a backtrace:
thread backtrace all -
Post the back-trace to https://gist.github.com/ and paste the link to a new bug report.