Building Audacity 2.3.0 on Ubuntu 16.0.4

IMPORTANT:
THERE IS A BUG IN AUDACITY 2.3.0 THAT CAUSES AUDACITY TO CRASH WHEN EFFECTS WITH REAL-TIME PREVIEW ARE APPLIED. AUDACITY 2.3.0 IS THEREFORE NOT RECOMMENDED FOR LINUX.

The official build instructions for Linux may be found here: https://github.com/audacity/audacity/blob/master/linux/build.txt
Note: At time of writing there is at least one error in the official instructions, which is the omission of ‘libasound2-dev’.

This walkthrough is a minimal step-by-step guide to building Audacity 2.3.0 on Ubuntu 16.04 LTS (Xenial Xerus).
Building on related distributions such as Mint 18.3 should be very similar.

The exact version of Ubuntu used here is:
Ubuntu 16.04-5 64-bit (including 3rd-party drivers, Flash, MP3 and other media)

Items written as code

  $ like this

are commands to be typed into a terminal window. Comments in brackets should NOT be typed into the terminal window (don’t blindly copy and paste).


Prerequisites:

  • User must be a member of ‘sudo’ group (default on Ubuntu)
  • ‘Source code’ section of Ubuntu repositories must be enabled in sources list.

Required:

  $ sudo apt-get install build-essential cmake gcc-5 autoconf
  $ sudo apt-get install libasound2-dev libgtk2.0-dev
  $ sudo apt-get install git

Recommended:
If not already installed:

For MP3 export:
libmp3lame0

For FFmpeg supported file types:
libavformat-ffmpeg56
libavformat-dev


Optional:

For Jack Audio System:
jackd2 (on a single user system, you will probably want to enable real-time priority)
libjack-jackd2-0
libjack-jackd2-dev



Building WxWidgets:

  $ cd ~/
  $ git clone --recurse-submodules https://github.com/audacity/wxWidgets/ wx311
  $ cd wx311
  $ mkdir buildgtk
  $ cd buildgtk

IMPORTANT - Ensure that the ‘configure’ and ‘make’ complete without errors (don’t worry about warnings). Note that the build will take several minutes to complete.

  $ ../configure --with-gtk
  $ make j4  (the 'j' number = to number of processor cores)

IMPORTANT - Do not install WxWidgets. This is not the correct version for Ubuntu 16.0.4.


TEST:

  $ cd samples/calendar
  $ make
  $ ./calendar

If successful, a calendar window should appear.
In the event of problems, refer to:
https://github.com/audacity/wxWidgets/blob/v3.1.1/docs/gtk/install.txt



Building Audacity 2.3.0

Download the Audacity source code.
At time of writing, 2.3.0 rc2 is available from:
https://www.fosshub.com/Audacity-devel.html/audacity-minsrc-2.3.0rc2.tar.xz
When officially released it will be available via the main Audacity website:
https://www.audacityteam.org/download/source/

Extract the contents of the ZIP file. In this example we will extract to the home directory. In a terminal window, navigate into the extracted audacity directory.

  $ cd ~/audacity-minsrc-2.3.0
  $ mkdir build
  $ cd build

Note-1: is your user name.
Note-2: If you did not install ‘libavformat-dev’, omit --with-ffmpeg=“system”.

  $ ../configure  WX_CONFIG=/home/<username>/wx311/buildgtk/wx-config --with-lib-preference="local system" --with-ffmpeg="system" --disable-dynamic-loading
  $ make -j4 (the 'j' number = to number of processor cores)

TEST:

  $ ./audacity

INSTALL:

  $ sudo make install

Note: Log out and back in again is usually required for Audacity to appear in the applications menu.

— End —

For queries about building Audacity 2.3.0, please start a new thread.