Notes for Packagers

From Audacity Wiki
Revision as of 14:46, 15 June 2008 by Richardash1981 (talk | contribs) (Optional Libraries: list of optional libraries)
Jump to: navigation, search

This page contains hints and tips for people creating Audacity packages for Linux/Unix distributions. It will also be useful for people compiling audacity from source on their own systems. For more details about developing for Linux see the Developing On Linux. For almost all Mac and Windows users we would recommend using the binaries available on our website.

What to Package

Ideally, both the latest stable release of audacity and the latest beta release would be available to users, with a choice to install either or both independently. Unfortunately this (especially parallel installs) is beyond the capability of many package management systems, and so a decision will have to be made on which version to package.

Currently, the stable (1.2.6) version of audacity depends on the obsolete 2.4.x version of wxwidgets, so will be difficult to package for many systems. In practise this means that you will have to package the most recent beta release from the 1.3.x series (1.3.5 at the moment). This can be built using either the 2.6 or 2.8 versions of wxwidgets (provided that 2.6 compatibility is enabled in the wx 2.8 build). Because this is a beta release, be aware that there is limited documentation and there will be frequent new releases to address issues.

Dependencies

Audacity uses a lot of libraries to provide functionality. The majority of these can and should be dynamically linked as system libraries, and so listed as dependencies of the audacity package. The sources of some of these libraries are provided in the lib-src/ module of the audacity CVS, but don't regard this as evidence that they should be preferred to system copies, most are provided only as a convenience to Mac and Windows developers.

Required Libraries

Some libraries are absolutely required for audacity to run. These are hard dependencies for any Audacity package unless the libraries are linked statically.

  • wxWidgets  This is the graphical toolkit used to build Audacity.
    • For most *nix systems wxGTK (built on top of GTK+2) will be the correct implementation to use. We do not support the incomplete and largely obsolete Motif (wxX11) implementation.
    • Please always stick to stable releases (even version numbers) of wxGTK - we don't target unstable releases, and they frequently contain bugs that cause problems for users.
    • A Unicode build of Audacity requires a Unicode build of wxGTK. This is the default, and allows internationalised file names which don't work in ANSI builds. So build Unicode if possible - there are rarely reasons not to.
  • Libsndfile  The canonical I/O library for uncompressed and low compression audio files.
    • Audacity will work with almost any release since 1.0.0, however more recent releases provide more formats and fix bugs, especially with meta-data handling.
  • Expat  A workhorse XML parser library, and much smaller than libxml2.
    • This is a dependency of wxWidgets, so it's probably already present
    • Again, almost any stable version will work quite happily, but most testing uses the most recent stable release (currently 2.0.1).

Optional Dependencies

With just the required libraries, Audacity only supports a very limited range of file formats. To expand this to a more useful range of common audio formats more libraries will be needed. These libraries are all optional at build time, however once Audacity is compiled with them they are required at run-time to start Audacity.

  • FLAC  Josh Coalson's Free Lossless Audio Codec.
    • Version 1.1.0 or higher needed, 1.2.1 recommended.
    • Whilst it is possible to handle FLAC files indirectly through either libdnsfile or ffmpeg, the direct support through FLAC has more features and is the preferred option.
  • libMAD  The reference-grade MPEG Audio Decoder.
    • Used to decode MPEG I layer 2 (MP2) and layer 3 (MP3) files.
    • Does not provide MPEG encoding so generally considered fairly safe from patent claims.
  • libvorbis  Reference Vorbis encoder and decoder from Xiph.org 
    • Provides import and export of Ogg Vorbis files
    • Very stable library, old 1.1.x versions probably still work fine.
  • Soundtouch  Independent Pitch and Tempo changing library.
    • Versions 1.3.1 and 1.3.0 supported
    • 1.3.0 is missing a pkg-config file so is not detected by the configure script unless one is created.
    • Can be a problem to build due to heavy ASM optimisation. Numerous patches exist for specific systems and compilers.
  • TwoLame  MPEG 1 Layer 2 encoder library (widely used in radio broadcasting).
    • Based on ISO Dist 10 sources, believed to be patent safe as doesn't implement Layer 3 encoding.
    • Better maintained replacement for tooLAME
    • Version 0.3.10 or better required, 0.3.12 recommended for build fixes.

Build Dependencies