ArtInvent
February 1st, 2008, 03:44 PM
This will tell you how to install Audacity 1.3.4 onto Gutsy using the source code. You will be able to leave a previously installed version of Audacity on your system and still use that when desired. It should also help you compile the next version of Audacity when it is released. Compiling is generally not for noobs, and not generally recommended if an up-to-date package is available. You should at least know what a repo is and know your way around the command line a bit. If you're up for a little challenge, however, dive in.
This HowTo may seem long winded but the actual steps taken are actually pretty easy. I just wanted to give a little in the way of theory for each step and not just issue a bunch of blind commands. This can be helpful if you run into trouble.
BACKGROUND
Audacity is a phenomenal piece of audio editing software with a peculiar development quirk. There are two lines of the software and have been for some time: the 1.2 'stable' series and the 1.3 'beta' series. The 1.3 series is by far the more capable, has been around for over two years, yet the developers insist on calling it 'beta' software and they never seem to release it as the real deal, even though it seems perfectly stable and refined for most of that time IMO.
On top of that, and perhaps because of it, the latest release of the 1.3 series is seldom available as a normal install package from repos, and even finding a .deb package for the latest Ubuntu is not possible. This version lag has been a constant problem ever since I've been using Audacity.
Next, if you settle for the older release and install an 8-month old version from the repos, it may not be compiled with all the options like mp3 and flac import and export.
In that light, I decided to try and shed my distaste of compiling from source and give it a go. It worked well and really wasn't that difficult and I have a fully-functional Audacity 1.3.4 on Gutsy with all the optional bells and whistles I need for the first time. Moreover, when the next 'beta' (sigh) is released, I will probably be well prepared to compile that post haste as well.
Since I found a few scattered tips and tutorials on how to do this, I thought I would start a thread here that aims to be as complete as possible.
Also note that these instructions likely work for any apt or Debian based distro. Also, I would appreciate it if people would correct any mistakes and add helpful bits, I can aim to edit the top post so others don't have to troll the whole thread for corrected instructions.
1. INSTALL DEPENDENCIES
99% of failed compiles are due to not having the right dependency packages installed. In order to compile, we need a number of runtime and development packages of the correct version. These run the gamut from user interface widgets to audio hardware enablers to codec libraries. It's quite a number of packages if you want full functionality, but when finished, much of it can be removed easily enough as Audacity doesn't need it all to actually run.
Make sure Universe and Multiverse repos are enabled, these should contain all the necessary packages.
First of all, if you've never tried to compile anything, you will need to install the Gnu C Compiler and some other stuff. The easiest way to do this is to install build-essential which should suffice.
sudo apt-get install build-essential
There is a way to have Ubuntu look for the required dependencies for a particular package and install them automatically.
$ sudo apt-get build-dep audacity
A alternate way way is to get all the dependencies for Audacity is to just fire a shotgun at the whole thing from the command line using the code below. I have tried to list here all the dependencies I have found as a reference. If the above build-dep seems to work, you can forgo the following command. Don't worry if you already have some of these packages, the install routine will only install those you don't have already.
$ sudo apt-get install cdbs gettext libasound2-dev libjack-dev libmad0-dev libvorbis-dev libogg-dev libflac-dev libflac++-dev libid3tag0-dev zlib1g-dev libwxbase2.6-dev libwxgtk2.6-dev wx2.6-headers libtwolame0 libtwolame-dev libgtk-dev libwxgtk-dev twolame libasound2-dev libjack0.100.0-dev portaudio19-dev libgtk2.0-dev libsndfile libsndfile-dev libsamplerate libsamplerate0-dev libsoundtouch libsoundtouch-dev
One of these two methods (or even both) should install all the packages. After this is finished GO BACK and read the output. If ANYTHING failed to install you must track it down and find it. There is no reason to proceed with the compile if a package is not present, it will waste lots of time. If the install routine can't find certain packages, you will have to make sure you have enough official or 3rd party repos enabled and track these down. I repeat: compiles fail because you don't have all the dependencies.
2. DOWNLOAD AUDACITY SOURCE CODE
We want the latest officially released beta and not the CVS builds. The Audacity Linux source code is usually found here:
http://audacity.sourceforge.net/download/beta_source (http://audacity.sourceforge.net/download/beta_source)
This can be downloaded as a compressed tarball in the tar.bz2 format. You will save this to your home folder and uncompress the archive. (I used Archive Manager.) You will end up with a folder called, which in my case is, "/audacity-src-1.3.4-beta".
3. CONFIGURE
Now we are ready to start the compile process. At the command line, change to the directory you just created, for instance -
$ cd ~/audacity-src-1.3.4-beta
Now we will start the lengthy configure. It's at this point that we will tell the compile to enable certain useful things like the ability to directly export and import FLAC, Ogg, MP3, MP2, ID3 tag writing that actually writes the tags, etc. Options are explained exhaustively if you run the command "./configure --help" but it's a little too much info for most mortals. Below is a pretty complete command you can run without trying to figure all this out for yourself. This step on my machine took about 3 minutes.
$ ./configure --with-libvorbis --with-libflac --with-libid3tag --with-soundtouch
This should spit out a lot of messages, but if you get 'error' messages at the end, it failed probably because Step 1 didn't succeed in getting you all the dependencies. You will have to hunt these down by using the error messages which pretty much always indicate pretty clearly which package it couldn't find etc. After tracking these down and installing, you can run this command in the same directory over again until no errors appear.
4. MAKE
The make command may also take 5 minutes or so, as this is the actual compile. Stare at the screen if you like watching grass grow. This will probably spit out a lot of 'warning' gobbledygook, but this should be okay. You just don't want any errors.
$ make
5. MAKE INSTALL
The final step is to install the compiled program so it can be run. Now, you can either do this command as 'sudo' in which case it will install across the board to all users. Or you can leave out the 'sudo' and just install it in your home directory which is what I did. If you choose the latter, you will be able to leave the previous Audacity version on your computer that were installed from repos. You can use the same .audacity folder with all of your preferences etc and choose which version you want to run. I simply made a menu launcher with the location of my special compile folder, and now I can run either version. (There are alternate ways to achieve similar things, this is simply the way I chose.)
$ make install
I actually got an error message at the end of this, but it only pertained to installing the program in /usr/bin/install which would make it a system wide program. Again, using 'sudo' in front of the command would make this go away. Trying to clarify the difference: without using 'sudo' in this step, if you just run the command 'audacity' from any directory except this one, you will be running the previous install of Audacity if you have one, not this compile, which is what I wanted. In my case I can either run the repo version 1.3.3 or this compile 1.3.4. You could also probably run the 1.2.x series from repos if you want without affecting this compile at all. In this way you can have any number of Audacity versions resident on your box and even compile different options for the same version in different directories. I'm boring you now so I'll stop.
6. RUN
Finished. Now there will be an 'audacity' file sitting in your folder. Double click on this or, within the folder at the CLI, run the 'audacity' command. Test the program especially the import and export of various filetypes to make sure you have it all right.
Make a shortcut, or menu item in the 'Sound and Video' section, for more convenience, making sure to specify the exact folder location.
7. ADDITIONAL STUFF
Now, if you want to use additional plugins like effects, beyond the 20 or so stock effects included in Audacity itself, which most of us do, you will need to install these separately. There are hundreds of these available. Most for Linux are in the LADSPA format and install easily system wide for any enabled audio program. The easiest way to find what's available is to open Synaptic and search for LADSPA. For instance: caps, cmt, ubuntustudio-audio-plugins, tap-plugins, swh-plugins.
8. CLEAN UP UNNECESSARY PACKAGES (optional)
Since you may have downloaded a bunch of development packages in Step 1 that are likely useless now that the compile is finished, you can easily purge these since they should not be registered as dependencies for any runtime package. Make sure you test and run the program for quite a while to make sure it's as it should be. You can always hold off on this step indefinitely.
If you want to conserve disk space do this. If disk space is less important and you want to be able to compile the next version of Audacity whenever that is issued, you can just leave it as is. Of course, new versions of Audacity may use newer versions of many of these packages like the WX widgets stuff so be aware.
The command to purge your system of the specific unnecessary dev packages is below.
$ sudo apt-get remove --purge libmad0-dev libvorbis-dev libogg-dev libflac-dev libflac++-dev libid3tag0-dev zlib1g-dev libwxbase2.6-dev libwxgtk2.6-dev libtwolame-dev libgtk-dev libwxgtk-dev portaudio19-dev libgtk2.0-dev
9. MAKING A .DEB PACKAGE -?
It all certainly begs the question of a .deb package. This would be the really intelligent thing to do, so that this could be sent to the good folks at GetDeb or even to a more official Ubuntu or third party repo. Why this is never done until 6 months after the latest version, I don't know. As a packaging noob I attempted to make my own .deb package using checkinstall. It resulted in a very small file that can't possibly be right. I have a bit to learn if I'm to become a package maintainer. If someone who knows the ins and outs of making .deb packages better than I would like to investigate and propose a solution, this would be very nice. Then only one of us would have to go through the above rigamarole, and the rest of us could just download a .deb or use Synaptic which is how the whole Ubuntu thing is meant to work.
10. OTHER TUTORIALS
I used two other web pages primarily and this HowTo is a synthesis and update of these efforts by others, thanks to their respective authors.
http://www.ubustu.com/globe/2007/04/21/compile-audacity-132-beta-with-feisty/
http://ubuntuforums.org/showthread.php?t=419358
11. FEEDBACK
I may have made mistakes in the above. I tried a few permutations and did some steps more than once, so this is a reconstruction of steps I took. If others would like to try this HowTo and test it, please leave some feedback if it worked or if I omitted a package or made a typo or my theory is just plain wrong.
AUDACIOUS!
This HowTo may seem long winded but the actual steps taken are actually pretty easy. I just wanted to give a little in the way of theory for each step and not just issue a bunch of blind commands. This can be helpful if you run into trouble.
BACKGROUND
Audacity is a phenomenal piece of audio editing software with a peculiar development quirk. There are two lines of the software and have been for some time: the 1.2 'stable' series and the 1.3 'beta' series. The 1.3 series is by far the more capable, has been around for over two years, yet the developers insist on calling it 'beta' software and they never seem to release it as the real deal, even though it seems perfectly stable and refined for most of that time IMO.
On top of that, and perhaps because of it, the latest release of the 1.3 series is seldom available as a normal install package from repos, and even finding a .deb package for the latest Ubuntu is not possible. This version lag has been a constant problem ever since I've been using Audacity.
Next, if you settle for the older release and install an 8-month old version from the repos, it may not be compiled with all the options like mp3 and flac import and export.
In that light, I decided to try and shed my distaste of compiling from source and give it a go. It worked well and really wasn't that difficult and I have a fully-functional Audacity 1.3.4 on Gutsy with all the optional bells and whistles I need for the first time. Moreover, when the next 'beta' (sigh) is released, I will probably be well prepared to compile that post haste as well.
Since I found a few scattered tips and tutorials on how to do this, I thought I would start a thread here that aims to be as complete as possible.
Also note that these instructions likely work for any apt or Debian based distro. Also, I would appreciate it if people would correct any mistakes and add helpful bits, I can aim to edit the top post so others don't have to troll the whole thread for corrected instructions.
1. INSTALL DEPENDENCIES
99% of failed compiles are due to not having the right dependency packages installed. In order to compile, we need a number of runtime and development packages of the correct version. These run the gamut from user interface widgets to audio hardware enablers to codec libraries. It's quite a number of packages if you want full functionality, but when finished, much of it can be removed easily enough as Audacity doesn't need it all to actually run.
Make sure Universe and Multiverse repos are enabled, these should contain all the necessary packages.
First of all, if you've never tried to compile anything, you will need to install the Gnu C Compiler and some other stuff. The easiest way to do this is to install build-essential which should suffice.
sudo apt-get install build-essential
There is a way to have Ubuntu look for the required dependencies for a particular package and install them automatically.
$ sudo apt-get build-dep audacity
A alternate way way is to get all the dependencies for Audacity is to just fire a shotgun at the whole thing from the command line using the code below. I have tried to list here all the dependencies I have found as a reference. If the above build-dep seems to work, you can forgo the following command. Don't worry if you already have some of these packages, the install routine will only install those you don't have already.
$ sudo apt-get install cdbs gettext libasound2-dev libjack-dev libmad0-dev libvorbis-dev libogg-dev libflac-dev libflac++-dev libid3tag0-dev zlib1g-dev libwxbase2.6-dev libwxgtk2.6-dev wx2.6-headers libtwolame0 libtwolame-dev libgtk-dev libwxgtk-dev twolame libasound2-dev libjack0.100.0-dev portaudio19-dev libgtk2.0-dev libsndfile libsndfile-dev libsamplerate libsamplerate0-dev libsoundtouch libsoundtouch-dev
One of these two methods (or even both) should install all the packages. After this is finished GO BACK and read the output. If ANYTHING failed to install you must track it down and find it. There is no reason to proceed with the compile if a package is not present, it will waste lots of time. If the install routine can't find certain packages, you will have to make sure you have enough official or 3rd party repos enabled and track these down. I repeat: compiles fail because you don't have all the dependencies.
2. DOWNLOAD AUDACITY SOURCE CODE
We want the latest officially released beta and not the CVS builds. The Audacity Linux source code is usually found here:
http://audacity.sourceforge.net/download/beta_source (http://audacity.sourceforge.net/download/beta_source)
This can be downloaded as a compressed tarball in the tar.bz2 format. You will save this to your home folder and uncompress the archive. (I used Archive Manager.) You will end up with a folder called, which in my case is, "/audacity-src-1.3.4-beta".
3. CONFIGURE
Now we are ready to start the compile process. At the command line, change to the directory you just created, for instance -
$ cd ~/audacity-src-1.3.4-beta
Now we will start the lengthy configure. It's at this point that we will tell the compile to enable certain useful things like the ability to directly export and import FLAC, Ogg, MP3, MP2, ID3 tag writing that actually writes the tags, etc. Options are explained exhaustively if you run the command "./configure --help" but it's a little too much info for most mortals. Below is a pretty complete command you can run without trying to figure all this out for yourself. This step on my machine took about 3 minutes.
$ ./configure --with-libvorbis --with-libflac --with-libid3tag --with-soundtouch
This should spit out a lot of messages, but if you get 'error' messages at the end, it failed probably because Step 1 didn't succeed in getting you all the dependencies. You will have to hunt these down by using the error messages which pretty much always indicate pretty clearly which package it couldn't find etc. After tracking these down and installing, you can run this command in the same directory over again until no errors appear.
4. MAKE
The make command may also take 5 minutes or so, as this is the actual compile. Stare at the screen if you like watching grass grow. This will probably spit out a lot of 'warning' gobbledygook, but this should be okay. You just don't want any errors.
$ make
5. MAKE INSTALL
The final step is to install the compiled program so it can be run. Now, you can either do this command as 'sudo' in which case it will install across the board to all users. Or you can leave out the 'sudo' and just install it in your home directory which is what I did. If you choose the latter, you will be able to leave the previous Audacity version on your computer that were installed from repos. You can use the same .audacity folder with all of your preferences etc and choose which version you want to run. I simply made a menu launcher with the location of my special compile folder, and now I can run either version. (There are alternate ways to achieve similar things, this is simply the way I chose.)
$ make install
I actually got an error message at the end of this, but it only pertained to installing the program in /usr/bin/install which would make it a system wide program. Again, using 'sudo' in front of the command would make this go away. Trying to clarify the difference: without using 'sudo' in this step, if you just run the command 'audacity' from any directory except this one, you will be running the previous install of Audacity if you have one, not this compile, which is what I wanted. In my case I can either run the repo version 1.3.3 or this compile 1.3.4. You could also probably run the 1.2.x series from repos if you want without affecting this compile at all. In this way you can have any number of Audacity versions resident on your box and even compile different options for the same version in different directories. I'm boring you now so I'll stop.
6. RUN
Finished. Now there will be an 'audacity' file sitting in your folder. Double click on this or, within the folder at the CLI, run the 'audacity' command. Test the program especially the import and export of various filetypes to make sure you have it all right.
Make a shortcut, or menu item in the 'Sound and Video' section, for more convenience, making sure to specify the exact folder location.
7. ADDITIONAL STUFF
Now, if you want to use additional plugins like effects, beyond the 20 or so stock effects included in Audacity itself, which most of us do, you will need to install these separately. There are hundreds of these available. Most for Linux are in the LADSPA format and install easily system wide for any enabled audio program. The easiest way to find what's available is to open Synaptic and search for LADSPA. For instance: caps, cmt, ubuntustudio-audio-plugins, tap-plugins, swh-plugins.
8. CLEAN UP UNNECESSARY PACKAGES (optional)
Since you may have downloaded a bunch of development packages in Step 1 that are likely useless now that the compile is finished, you can easily purge these since they should not be registered as dependencies for any runtime package. Make sure you test and run the program for quite a while to make sure it's as it should be. You can always hold off on this step indefinitely.
If you want to conserve disk space do this. If disk space is less important and you want to be able to compile the next version of Audacity whenever that is issued, you can just leave it as is. Of course, new versions of Audacity may use newer versions of many of these packages like the WX widgets stuff so be aware.
The command to purge your system of the specific unnecessary dev packages is below.
$ sudo apt-get remove --purge libmad0-dev libvorbis-dev libogg-dev libflac-dev libflac++-dev libid3tag0-dev zlib1g-dev libwxbase2.6-dev libwxgtk2.6-dev libtwolame-dev libgtk-dev libwxgtk-dev portaudio19-dev libgtk2.0-dev
9. MAKING A .DEB PACKAGE -?
It all certainly begs the question of a .deb package. This would be the really intelligent thing to do, so that this could be sent to the good folks at GetDeb or even to a more official Ubuntu or third party repo. Why this is never done until 6 months after the latest version, I don't know. As a packaging noob I attempted to make my own .deb package using checkinstall. It resulted in a very small file that can't possibly be right. I have a bit to learn if I'm to become a package maintainer. If someone who knows the ins and outs of making .deb packages better than I would like to investigate and propose a solution, this would be very nice. Then only one of us would have to go through the above rigamarole, and the rest of us could just download a .deb or use Synaptic which is how the whole Ubuntu thing is meant to work.
10. OTHER TUTORIALS
I used two other web pages primarily and this HowTo is a synthesis and update of these efforts by others, thanks to their respective authors.
http://www.ubustu.com/globe/2007/04/21/compile-audacity-132-beta-with-feisty/
http://ubuntuforums.org/showthread.php?t=419358
11. FEEDBACK
I may have made mistakes in the above. I tried a few permutations and did some steps more than once, so this is a reconstruction of steps I took. If others would like to try this HowTo and test it, please leave some feedback if it worked or if I omitted a package or made a typo or my theory is just plain wrong.
AUDACIOUS!