Browse Source

Update build instructions for 2.3.0

au-ny-api
James Crook 4 years ago
parent
commit
83f1537e33
  1. 102
      INSTALL
  2. 74
      linux/build.txt
  3. 11
      mac/Build.txt
  4. 64
      win/build.txt
  5. 298
      win/compile.txt

102
INSTALL

@ -1,102 +1,10 @@
Compilation and install instructions for GNU/Linux
Compilation and install instructions
Note: Audacity 2.2.2 requires gcc 4.9 or later. For Ubuntu 14.04 which only
has up to 4.8.4, see here for upgrade instructions:
http://wiki.audacityteam.org/wiki/Upgrade_to_gcc_4.9
Audacity 2.2.2 requires wxWidgets 3.0.x, preferably 3.0.2, built with gtk2.
If not available in your distribution repository, it may be downloaded from:
https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.2/wxWidgets-3.0.2.tar.bz2 .
On openSUSE, be sure to install wxWidgets without STL.
The latest Audacity development source code is available from:
https://github.com/audacity/audacity
If you are not planning to do any development, the Audacity 2.2.2 release
minimal source tarball is recommended from:
http://www.audacityteam.org/download/source/ .
Other required dependencies:
Audacity 2.2.2 requires the local (included) versions of PortAudio and PortMidi.
Attempting to build with system library versions will fail.
libsndfile library is required and is included in the Audacity source.
libsoxr resampling library. If libsoxr-dev is not available as a system library,
the source code is included in the Audacity tarball.
CMake ( http://www.cmake.org/ ) is required to build a local copy of libsoxr.
Information about optional libraries may be available on:
http://wiki.audacityteam.org/wiki/Developing_On_Linux#optional .
If you install libraries using a package management system like Apt or RPM,
you need to install the "dev" (development) packages for each library.
Compiling wxWidgets:
wxWidgets must be built with the default gtk2 option, not with gtk3, and
without STL (also default). Full instructions for compilation can be found in:
wxWidgets-3.0.2/docs/gtk/
Compiling and installing Audacity:
As there have been fixes to several of the included libraries, compiling with
the included ('local') libraries is recommended. This also reduces the number of
dependencies that need to be installed. One common exception to this is the optional
FFmpeg library (see below)
From the root of the source tree, create a build directory, then change directory into it:
mkdir build
cd build
To see the compile-time options you can set:
../configure -h
Run the configure command with your preferred options, then 'make'
../configure -with-lib-preference="local system"
make
On a multi-core system, build time can be considerably reduced by setting the -j (jobs)
switch equal to the number of cores. For example, on a quad core processor:
make -j4
To install:
make install # as root
(The root command is often sudo on GNU/Linux, for example 'sudo make install'.)
If you want to do any development, you might want to generate a configure cache
and header dependencies:
./configure -C
make dep
To uninstall:
make uninstall #as root
To clean the build after modifying code:
make clean
To clean and remove previous configure options:
make distclean
FFmpeg support::
Audacity should be able to link dynamically to FFmpeg 1.2 to 2.3.x (libav 0.8 to 10),
but many distributions have more recent versions that fail to link dynamically.
To work around this issue, Audacity may be configured to use the system
FFmpeg library and disable dynamic loading. If this is done for both FFmpeg
and the optional LAME library, the "Libraries" option in Audacity's Preferences
is not required and is automatically removed.
../configure --with-lib-preference="local system" --with-ffmpeg=system \
--with-lame=system --disable-dynamic-loading
Additional information about compiling on Linux may be found on the Audacity wiki:
http://wiki.audacityteam.org/wiki/Developing_On_Linux
Compilation instructions for Audacity are provided in the source code:
* Windows: win\build.txt
* macOS: mac/build.txt
* GNU/Linux: linux/build.txt
You can ask for help with compilation problems at:
http://forum.audacityteam.org/viewforum.php?f=19 .

74
linux/build.txt

@ -0,0 +1,74 @@
Instructions for Building on Linux
Fuller instructions that cover:
* Upgrading to gcc 4.9 on older Ubuntus
* Optional libraries
can be found on our wiki at http://wiki.audacityteam.org/wiki/Building_On_Linux.
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 libasound 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.1 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.1/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:
1) Create a 'build' subdirectory under Audacity and change to it.
2) Now to build Audacity itself. In the following command -j4 means use 4 cores.
Using a build directory (and .. in the command) keeps source and object files
in separate directories.
../configure --with-lib-preference="local system"
make -j4
make install # as root

11
mac/Build.txt

@ -1,3 +1,5 @@
Instructions for building on Mac
At this time, Audacity is usually built with the 10.7 SDK. This is to give
compatibility with older versions of MacOSX.
To build Audacity using Xcode 5.1 or newer, you need to extract the 10.7 SDK
@ -7,10 +9,9 @@ In the instructions below, Xcode 4.3.3 (for the 10.7 SDK) and Xcode 8.1 will
be used and can be downloaded from https://developer.apple.com/download/more/
(requires Apple ID to login).
Fuller instructions that cover
Fuller instructions that include
* Using other Xcodes
* Optional signing of DMGs
* Applying wxWidgets patches one by one
can be found on our wiki at http://wiki.audacityteam.org/wiki/Building_On_Mac
1) Download Xcode 8.1 and install it to /Applications.
@ -43,9 +44,9 @@ can be found on our wiki at http://wiki.audacityteam.org/wiki/Building_On_Mac
Don't be tempted to use Widgets already installed by a package manager such
as Homebrew because this will cause problems.
We have applied some Audacity specific patches to the official
wxWidgets 3.1.1 branch, found here:
https://github.com/audacity/wxWidgets/tree/audacity-fixes-3.1.1
As of 16-Apr-2018 we haven't yet applied any Audacity specific patches
to the official wxWidgets 3.1.1 branch, so currently it is the same as:
https://github.com/audacity/wxWidgets/tree/v3.1.1
9) Change directory to the folder wxWidgets was cloned to then build/install
wxWidgets:

64
win/build.txt

@ -0,0 +1,64 @@
Instructions for building on Windows.
Fuller instructions that include
* Portable Settings
* Building an Installer
can be found on our wiki at http://wiki.audacityteam.org/wiki/Building_On_Windows
1. MSVC 2017: Download and install Microsoft Visual Studio 2017
https://docs.microsoft.com/en-us/visualstudio/install/install-visual-studio?view=vs-2017
2. Git: Download and install Git, for example by installing GitExtensions
http://gitextensions.github.io/
download and run the .msi installer. GitExtensions has a GUI interface, includes Git for
Windows and has a Git bash command line in the bottom panel of the screen.
3. wxWidgets:
1) Clone wxWidgets and checkout 3.1.1 from the Audacity fork of the
wxWidgets project:
https://github.com/audacity/wxWidgets/
for example, in the git-bash command line
mkdir ./wxWidgets
cd ./wxWidgets
git clone --recurse-submodules https://github.com/audacity/wxWidgets/
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.1/README-GIT.md
https://github.com/audacity/wxWidgets/blob/v3.1.1/docs/msw/install.txt
DO set WXWIN to the appropriate directory where you installed wxWidgets.
To do that, open a cmd.exe window, and type:
set WXWIN=C:\wxWidgets-3.1.1
You will be building a dll version with MSVC2017 IDE, so...
In MSVC 2017 open wx_vc15.sln, and select dll, release.
Then build.
3) Having got this far, it is well worth trying out building some wxWidgets
examples to confirm that building has worked OK
4. Audacity
1) Clone Audacity from the Audacity GitHub project.
https://github.com/audacity/audacity/
for example, in the git-bash command line
mkdir ./audacity
cd ./audacity
git clone https://github.com/audacity/audacity/
Audacity itself does not use/need git submodules.
2) in MSVC 2017 open audacity.sln
Choose Release or Debug.
Click compile.

298
win/compile.txt

@ -1,298 +0,0 @@
Building Audacity(R) for Microsoft Windows(R)
Copyright (c) 1999-2018 Audacity Team
Authors:
Asger Ottar Alstrup
Lynn Allan
Vince Busam
James Crook
Dave Fancella
Vaughan Johnson
Steve Jolly
Leland Lucius
Markus Meyer
Shane Mueller
Martyn Shaw
========================================================================
This document is for Audacity version 2.3.0
If the advice here is inaccurate or incomplete,
email audacity-devel@lists.sourceforge.net.
WE ARE MOVING FROM WXWIDGETS 3.0.2 to 3.1.1 AND FROM MSVC 2013 to
MSVC 2017. CURRENTLY THIS DOCUMENT MAY HAVE A FEW ERRORS AND OMISSIONS
RELATING TO THAT. THESE SHOULD BE FIXED BY MAY 12TH 2018. DETAILS?
ASK ON audacity-devel@lists.sourceforge.net.
========================================================================
Audacity releases for Windows are currently built with Microsoft Visual
Studio 2013 C++. Most of us use the Express edition, which is free.
Note that Audacity uses VC++'s multithreaded DLL runtime libraries.
If you have MSVC installed, these are in your PATH, but users to
whom you distribute your builds may not have them, so you may have
to distribute them, as described for the wxWidgets DLLs, below.
------------------------------------------------------------------------
MSVC++ STEP 1: Download wxWidgets
------------------------------------------------------------------------
To simplify the implementation of a near-identical user
interface across platforms, Audacity uses wxWidgets, a
GUI framework.
Audacity 2.3.0 can on windows use wxWidgets 3.1.1 without patches.
For versions of Audacity that need a patched wxWidgets,
download our patched wxWidgets from the 'audacity-fixes-3.1.1'
branch of https://github.com/audacity/wxWidgets
------------------------------------------------------------------------
MSVC++ STEP 2: Download source code for Audacity
------------------------------------------------------------------------
Checkout the latest Audacity code from our GitHub repository
at https://github.com/audacity/audacity/ (see GitHub for help).
------------------------------------------------------------------------
MSVC++ STEP 3: Build wxWidgets
------------------------------------------------------------------------
These steps assume the wxWidgets source code was extracted to
the root of C:\ and renamed "C:\wxWidgets-3.1.1\".
3.1. Open "C:\wxWidgets-3.1.1\build\msw\wx_XXX.sln" with
Microsoft Visual Studio, where XXX is the version for your compiler.
XXX is 12 for MSVC 2013.
3.2. Build wxWidgets for all configurations of Audacity that you want.
* Use the "DLL Release" configuration to use in a
"Release" version of Audacity.
* Build "DLL Debug" configuration to use in a
"Debug" version of Audacity.
You're encouraged to try out the samples in wxWidgets to check that
wxWidgets is built and working.
------------------------------------------------------------------------
MSVC++ STEP 4: Set wxWidgets location for Audacity
------------------------------------------------------------------------
The Audacity Visual Studio project has been set up to use environment
variables to locate all externally referenced SDKs. For wxWidgets, it
uses the "WXWIN" environment variable.
Before you can build Audacity, you must set the variable. This process
can vary depending on the version of Windows you're using. The following
is based on Windows 7, so you may need to make adjustments.
4.1. Open the "Control Panel"
4.2. Click the "System" app
4.3. Click the "Advanced system settings" link
4.4. On the "Advanced" tab, click the "Environment Variables..." button
4.5. Click "New..." in the "System variables" group
4.6. Set the "Variable name" to "WXWIN" (without the quotes)
4.7. Set the "Variable value" to the full path of where you installed
wxWidgets (typically "C:\wxWidgets-3.1.1")
4.8. Click "OK" until you exit the "System Properties" app
An alternative way to do it, that's available on all versions of Windows,
is to open a cmd.exe window, and type:
set WXWIN =C:\wxWidgets-3.1.1
Once you have set the WXWIN environment variable correctly, the Audacity
Project file's declarations will do the rest.
Note that if you currently have the Audacity Solution open in Visual
Studio, you must restart Visual Studio for it to recognize the new
environment variables.
In some cases, you may need to reboot the computer to ensure
the variables are read correctly.
If you are in a hurry, you can skip step 5.
------------------------------------------------------------------------
MSVC++ STEP 5: Consider and Configure Optional Features
------------------------------------------------------------------------
5.1. Locally installed help is optional, but required for a full Release
build. (The "help" folder is included in the installer, but removed from
the zip distribution.) The Python library is required, obtainable from
http://www.python.org/download/ . Add the location of the top-level
directory where you installed Python to your Path environment
variable. For instructions on setting environment variables, see the
previous section, "MSVC++ STEP 4: Set wxWidgets location for Audacity".
Build the "help" project by enabling it in the MS Visual Studio
Configuration Manager (Build menu). This will download a copy of the
Manual wiki onto your machine and copy it to the correct place for
your build. If the local copy needs to be updated, run
audacity\scripts\mw2html_audacity\wiki2htm.bat
and re-build the "help" project.
5.2. To support languages other than English in your build of Audacity,
you must enable and build the optional "locale" project. This is
required for a full release. You will need to obtain msgfmt.exe from
https://sourceforge.net/projects/cppcms/files/boost_locale/gettext_for_windows/
Add the location of the directory containing msgfmt.exe to your Path
environment variable. Alternatively, put msgfmt.exe somewhere already in the
Path,
e.g., C:\Windows.
5.3. Some functionality in Audacity is currently turned on in its default
configuration, but requires that extra libraries be downloaded
separately to use it.
To change the libraries enabled in Audacity, edit
"win\configwin.h" and comment or uncomment the entries.
5.4. To add support for ASIO:
ASIO (from Steinberg) is a sound card interface protocol that is faster
than standard WMME. Unlike WMME, not all soundcard drivers support it.
Because ASIO is a proprietary, closed standard, we (or any third party)
cannot distribute its SDK. That means we cannot distribute builds of
Audacity that support ASIO, because Audacity is licensed under the GPL
(http://audacityteam.org/about/license), which requires we
distribute all source code.
So, although you can build your own copies of Audacity with
ASIO support, for personal use, you cannot distribute them without
violating the Audacity license and the ASIO license.
If you build ASIO support into Audacity, do not distribute that build.
For ASIO support, get the ASIO SDK from Steinberg
(http://www.steinberg.net/en/company/developers.html),
install at C:\ASIOSDK, then define an environment variable called
ASIOSDK_DIR.
The value should be the full path to the base directory of the
ASIO SDK, e.g.,
set ASIOSDK_DIR=C:\ASIOSDK
------------------------------------------------------------------------
MSVC++ STEP 6: Build Audacity
------------------------------------------------------------------------
Run Visual C++ and load the Audacity solution,
"audacity\win\audacity.sln".
Select the configuration that you wish to build:
* "Release" for Unicode-based, general use
* "Debug" for a Unicode-based, slower, debuggable
executable
You can select the configuration from the Solution
Configurations pull-down menu, or select it from the "Build"
menu > "Configuration Manager..." dialog box.
Build Audacity by giving the "Build" menu > "Rebuild Solution"
command.
------------------------------------------------------------------------
MSVC++ STEP 7: Provide Access to the wxWidgets DLLs
------------------------------------------------------------------------
Each Audacity executable needs access to seven specific wxWidgets
DLLs from those you built in "MSVC++ STEP 2: Build wxWidgets"
above. You can copy them to your Windows PATH, or more simply,
to the same directory as the executable. If you are building
Audacity for public release using the *.iss installer script,
you must copy them to the executable directory. The DLLs required
are at "C:\wxWidgets-3.1.1\lib\vc_dll":
wxbase311*_net_vc_custom.dll
wxbase311*_vc_custom.dll
wxmsw311*_adv_vc_custom.dll
wxmsw311*_core_vc_custom.dll
wxmsw311*_html_vc_custom.dll
wxbase311*_xml_vc_custom.dll
wxmsw311*_qa_vc_custom.dll
The "*" in the file names above is replaced in the actual files by
a suffix specific to its Widgets configuration. You can identify the
DLLs needed for each Audacity version as follows:
"u" for "Unicode Release" versions
"ud" for "Unicode Debug" versions
So for instance, a Debug version of Audacity should have:
wxbase311ud_net_vc_custom.dll
wxbase311ud_vc_custom.dll
wxmsw311ud_adv_vc_custom.dll
wxmsw311ud_core_vc_custom.dll
wxmsw311ud_html_vc_custom.dll
wxbase311ud_xml_vc_custom.dll
wxmsw311ud_qa_vc_custom.dll
in the "audacity\win\Debug" directory.
------------------------------------------------------------------------
HELP! I get linker errors!
------------------------------------------------------------------------
In some cases, Audacity does compile, but during the linking
process you get a bunch of error messages like this:
LIBCMTD.lib(LIBCMTD.dll) : error LNK2005: _free
already defined in MSVCRTD.lib(dbgheap.obj)
This is usually caused by conflicting runtime library settings.
Audacity is now linked with DLL linkage and our windows project file ONLY has
DLL linkage, so we think this problem has gone. If it does happen, check the
following:
In MSVC 2013, select the Audacity project. Then
Project > Properties > Configuration Properties > C/C++ >
Code Generation > Runtime Library
should be
"Multi-threaded Debug DLL (/MDd)" for Debug builds,
or
"Multi-threaded DLL (/MD)" for Release builds.
Make sure you set the correct library type for all corresponding build
configurations.
Also make sure you check all other libraries, like the Ogg Vorbis
libraries, if you have them installed.
You may want to use the /VERBOSE:LIB linker parameter to
get information about which library is causing the conflict.
If all else fails, use the following procedure to force
Audacity to link to the correct library:
Select the Audacity project in Solution Explorer.
Then choose Project > Properties.
Select the desired configuration (e.g., "Debug" or "Release").
Select the "Linker" folder in the tree on the left, and the
"Input" item. In the "Ignore Specific Library" field, enter
"msvcrt.lib" if you were attempting to perform a
Release build, or "msvcrtd.lib" for a Debug build.
On some systems, you will need to ignore "libcmt.lib"
or "libcmtd.lib" instead of "msvcrt.lib" or "msvcrtd.lib",
depending on the library which actually causes the conflict.
Note that if you have configured all libraries correctly,
none of the above should actually be necessary.
If you still receive errors, it often helps to try it again with
a clean installation of the wxWidgets sources and the latest Audacity
source from GitHub. Also check "Common compilation errors" on:
http://wiki.audacityteam.org/wiki/Developing_On_Windows#common
for more assistance.
Loading…
Cancel
Save