Compiling lmms (Apple) - Umcaruje/lmms GitHub Wiki

Dependencies

The following dependencies should be met before compiling LMMS:

Fetching requirements using MacPorts See also Compiling lmms (Linux)

  1. If this is your first time running Xcode, install the command line tools and accept the license agreement:

    sudo xcode-select --install
    sudo xcodebuild -license
    

    Note: Alternately, you may install the command line tools via Applications, Xcode, Xcode Preferences menu, Downloads tab, Command Line Tools, Install

  2. Update the collection of available port definitions:

    sudo port selfupdate
    
  3. Install LMMS and all of its dependencies automatically:

```sh
sudo port install lmms
```

The LMMS application bundle will be in your MacPorts applications folder, which is /Applications/MacPorts unless you changed it.
  1. Alternately, if you would like to use MacPorts only to get the dependencies and compile LMMS from source manually:
```sh
sudo port install cmake fftw-3-single fltk \
fluidsynth jack libgig libogg libsamplerate libsdl \
libsndfile libvorbis portaudio qt4-mac stk pkgconfig
```

Compiling

Instructions on compiling and installing LMMS:

  1. 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
    
  2. Optionally, you can also create a "target" directory, or you can install LMMS to any empty directory of your choice.

    mkdir target
    
  3. 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).

    cd build
    cmake .. -DCMAKE_INSTALL_PREFIX=../target
    

    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
  4. Now compile LMMS:

    Note: make -j2, commonly used on Linux, won't work here.

    make
    
  5. Extract a copy of the stk source code in your home directory (make install will copy the rawwaves directory from the stk source directory into the LMMS application 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
    
  6. Finally, install LMMS into the previously specified directory:

    make install
    
  7. This will automatically create an application bundle on the Desktop. image

    image You may copy this to Applications or run it directly from the Desktop

  8. Optionally, you may wish to package this into a DMG (FIXME Lion has issues with DMG artwork, etc):

    ~/Desktop/create_apple_dmg.sh
    

    image

Debugging LMMS OSX

  1. Clean the build environment
make clean
rm -rf CMakeCache.txt
  1. Re-run cmake configure step with the following additional parameters:
-DCMAKE_BUILD_TYPE=Debug -DWANT_SWH=OFF
  1. Re-run the make install step

  2. Launch LMMS with the lldb debugger. You will be prompted for your password.

    lldb ~/Desktop/LMMS.app/Contents/MacOS/lmms
    
  3. Reproduce the crash. Hit CTRL+C. Type this command from lldb for a backtrace:

    thread backtrace all
    
  4. Post the back-trace to https://gist.github.com/ and paste the link to a new bug report.