Developing On Linux
Note: if you use Linux and need to compile Audacity from source (say, if you use Linux but we don't have a binary package like an RPM available for your distribution) but you don't know how, see CompilingAudacityForBeginners
For building with Windows, see [install-directory]\win\compile.txt
- 1 Getting Audacity
- 2 Prerequisites
- 3 Optional Packages
- 4 Compiling on Unix
- 5 Compiling on Windows
- 6 Compiling on Mac OS X
- 7 Mini FAQ about issues on this page
- Stable tarball: The easiest way to get Audacity is to download a release from the Audacity website. All past releases of Audacity are archived on our Sourceforge file release page.
- CVS: The other main way to get Audacity is to use CVS - this is the best way if you want to actively develop Audacity, or keep up with the latest and greatest features. For more information, see our CVS page.
Audacity 1.2.x (stable)
At a minimum, Audacity 1.2.x requires wxWidgets. Currently we recommend using version 2.4.0. You're welcome to use any 2.4.x release, but there were some new bugs in 2.4.1 that cause problems, so the Audacity developers are mostly sticking with 2.4.0. Audacity will not work with wxX11 (as it's incomplete, and things like dialogues are missing that we need), or with unicode builds of wxWidgets (so configure with --disable-unicode)
Older versions are completely unsupported. It may be possible to compile Audacity 1.2.x with wxWindows 2.5.x, but please don't expect it to compile out-of-the-box. Unfortunately this hasn't stopped some distros trying, and so annoying a lot of users. WXWidgets 2.4.0 is no longer linked from the wxWidgets home page, but the U.K. mirror is Here. Note that wxWidgets 2.4.2 for Mac OSX does not compile correctly; getting it from CVS resolves the issue. WXWidgets 2.4.2 should work equally well on Linux.
Audacity supports wxGTK for Linux (and other Unix), wxMac for Mac OS X, and wxMSW for Windows using either MSVC++ or Cygwin. There is no support for wxMotif, wxX11, or other wx variants yet.
Audacity does not currently support the Unicode or GTK2 builds of wxWidgets. When configuring wxWidgets on Unix, make sure you don't enable these features. To be safe:
./configure --disable-gtk2 --disable-unicode
Having GTK2 enabled does not usually cause any problems, however, providing the build and runtime versions match exactly (not always the case with binary distributions).
If you have Mac OS X, you may want to patch wxMac before building it - see below.
Audacity 1.3 (unstable)
The development branch of audacity (version 1.3, currently only in CVS) requires wxWidgets 2.6.1 or higher. Unicode and GTK2 builds are supported by default. Older development versions (2.5.x) may not work, so get the current wxWidgets 2.6.x release.
The configure script of Audacity gives the option to link in or not to link in a number of 'optional' packages. 'Optional' as some are more optional than others.
There are possibilities surrounding the following packages:
libmad use libmad for mp3 decoding support vorbis enable ogg vorbis support id3tag use libid3tag for mp3 id3 tag support libsndfile which libsndfile to use: [local], [system] libresample use libresample: [yes], [no] libsamplerate use libsamplerate (instead of libresample): [local], [system], [none] libflac local system none - enable FLAC support [default=none] ladspa compile with ladspa plug-in support [default=yes] nyquist compile with Nyquist support [default=yes] portmixer compile with PortMixer [default=yes] portaudio which version of PortAudio to use (=[v18,v19])[default=v18] soundtouch compile with SoundTouch [default=yes] help Make the help file "audacity-1.2-help.htb"[default=yes]
The following syntax is used as a parameter to the configure script to enable or disable a package or to pass further information about the package.
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
The possibilities range from whether to include them or not to whether to use local or system versions. Unless there is reason not to, it is generally best to use the local packages which come bundled with Audacity. The reason being that the Audacity guru's have blown lightly on these in order to optimise them for Audacity. That said, in many cases, the standard libraries will also work well.
To enable support for ogg files: --with-vorbis=[local|system]
To use an external sndfile library (which you have previously built and installed): --with-libsndfile=system
To disable nyquist: --without-nyquist
Compiling on Unix
To compile Audacity on Linux, Mac OS X, and most other Unix systems, use the standard "configure; make" sequence:
However, you may want to start by running ./configure --help first to see the options, and possibly add special options.
If you are compliling from a CVS checkout, then you can re-generate the configure script by running
in the top level directory first.
Note: see the page CompilingAudacityForBeginners if you are confused by anything above. We walk you through the process step-by-step.
If this causes trouble, with errors like
$ configure: warning: CC=gcc: invalid host type $ configure: warning: CXX=g++: invalid host type $ configure: error: can only configure for one host and one target at a time $ configure: error: /bin/sh './configure' failed for lib-src/portaudio-v19
Then try prefixing the configure command with "env -i"
$ env -i ./configure --without-portmixer --with-portaudio=v19
This appears to be fixed for audacity 1.2.4 (CVS).
Only in Audacity 1.2.0 pre-2: NOTE: If you want vorbis or other things, but you dont have it, you'll have to get those sources and put them in the lib-src/ directory.
Compiling on Windows
See the file win/compile.txt in the Audacity source code. Feel free to add any tips or tricks here.
As of December 2004, now in CVS are *.vcproj files which will build in the newer versions of MS VC++ (.NET).
Chacko 2004.05.28 Compile with MS VC++ under Win2K
I tried version 1.2.1 (unmodified) from audacity-src-1.2.1.tar.bz2, with wxWindows-2.4.2 (unmodified) from wxMSW-2.4.2.zip, using the instructions in the above win/compile.txt file. The only minor change needed was for compiling the wxWidgets; I had to open the src/wxWindows.dsw, (instead of the wxWidgets.dsw specified in the above instructions). It worked without any major errors -- there were many warnings. This resulted in a working Audacity (under win2000), of course without any of the options since I did not add any before the build.
For uncompressing the .bz2 on W2K, I used 7-zip 3.13 (freeware) downloaded as 7z313.exe
If anybody has detailed instructions on building in all the options, to bring to the form of the current release, please add the details here.
End Chacko 2004.05.08
========== start Yonatan 2 Dec 2003 ===========
I tried to compile version 1.2.0.pre3 'out of the box' on windows without any the extra options - just wxWidgets and the default stuff that comes with audacity - it doesn't quite work - here is a summary.
1) There seems to be a bug in the project definition, the path for 'libresample.dsp' was wrong ( as seen in the 'File View of the left pane in VCC++) it is in win and not in win\libresample. 2) The missing links in the readme file are
a) need to edit win\configwin.h and do #udef (NOT #define ...0) to the libraries that are unneeded b) remove the appropriate libraries from Project Setting Link tab, project Options.
summary In order to compile the minimal audacity (no options) I had to 1) double click on the libresample on the left (File view) pane - it then found the correct dsw file 2) edit win\configwin.h as follows:-
- undef USE_LIBMAD
- undef USE_LIBVORBIS
3) remove the following libraries from the settings libsamplerated.lib madd.lib ogg_static_d.lib vorbis_static_d.lib vorbisfile_static_d.lib libFLAC++d.lib libFLACd.lib
========== end Yonatan 2 Dec 2003 ===========
Compiling on Mac OS X
Currently only command-line building is supported; there is no up-to-date Project Builder or Xcode project file. Compile just as you would a Unix program (see above). After building "audacity", an additional step is performed, that creates "Audacity.app". Make sure that you run "Audacity.app" and not "audacity", otherwise it won't work. Note that in the "mac" directory there is a patch file for wxMac-2.4.0 - it's recommended that you apply this patch first. This enables support for custom cursors, allows disabling anti-aliased text (for speed), and fixes a couple of bugs.
Mini FAQ about issues on this page
Q: Will wxWidgets-2.5.3 (wxWidgetsALL) work?
A: No. For unstable Audacity 1.3 from CVS, you need wxWidgets 2.6. For Audacity 1.2.x you need wxwidgets 2.4.x