Instructions for Building on Linux

Fuller instructions can be found on our wiki at http://wiki.audacityteam.org/wiki/Building_On_Linux.

In fact you should read those instructions rather than these 
once.  These ones give less detail.


Some prerequisites:

- Audacity requires gcc 4.9 or later to build.

- CMake ( http://www.cmake.org/ ) is required to build the local copy of 
  the libsoxr resampling library used by Audacity.

On a modern Debian distro, e.g. Ubuntu 16.04 (bionic), you would do:

sudo apt-get install build-essential cmake

- libasound and gtk are required. Having gtk2 and gtk3 too  
  may not be required, but compilation works if both are.

- Auto-tools are also needed.

sudo apt-get install libasound2-dev libgtk2.0-dev libgtk-3-dev
sudo apt-get install autoconf automake

- Since you will be fetching code from git repositories you 
  will need git.

sudo apt-get install git git-gui gitk


wxWidgets:

 1) Clone wxWidgets and checkout 3.1.3 from the Audacity fork of the 
    wxWidgets project: 
       https://github.com/audacity/wxWidgets/....

    for example
      mkdir ./wxWidgets
      cd ./wxWidgets
      git clone --recurse-submodules https://github.com/audacity/wxWidgets/

    Don't be tempted to use Widgets already installed on Linux because this 
    will typically be a different version and will cause problems.              

    IF you forgot the --recurse-submodules, you can correct that later by:
      git submodule update --init

  2) Follow instructions for building at 
    https://github.com/audacity/wxWidgets/blob/v3.1.3/docs/gtk/install.txt

    So...

    mkdir buildgtk
    cd buildgtk
    ../configure --with-gtk
    make    

  3) Having got this far, it is well worth trying out building some wxWidgets
    examples to confirm that building has worked OK

Audacity:

See our wiki for more detailed build instructions, including how to 
install CMake.


1. Make a build directory under the audacity git directory.

  cd audacity
  mkdir build-cmake
  cd build-cmake


2. Generate the makefiles

  cmake -DCMAKE_BUILD_TYPE=Release ..

3. Build Audacity 

  cmake --build . 

4. Run

  cd bin/Release
  ./audacity

