I had wanted to run
audacity on Solaris for quite some time. The first time I tried to compile it was at least 18 months ago. It was a painful process that I quickly gave up.
Fortunately, things have come a long way since then. Getting audacity to compile and run on Solaris isn't a trivial process, but to be realistic, it's hardly trivial on any operating system. There are a lot of dependencies, and the size of that list depends on how much functionality you want. I will attempt to outline the path of least resistance.
First off, I do not work in the open source group here at Sun. I got peripherally involved in helping make audacity work on Solaris based on my personal interest. There are other folks that have done most of the heavy lifting in this area, and I'd like to thank them for doing so. I did, however, help tweak some of the patches as required to allow audacity to be compiled with SunStudio 11 and 12.
While I'm on the subject, you can build all of the required packages using either gcc or SunStudio 11 or 12. The trick is to make sure that all of the packages are built with the same compiler. If you wish to use gcc, be sure the env.[c]sh script in the CBE is setting all the environment variables correctly. In addition, I'd recommend building SFEgcc.spec and using that version of gcc for building any of the SFE packages.
In order to build audacity, you'll need the following:
- A system running opensolaris
- Either SunStudio 11 or 12 or gcc
- The JDS CBE (Common Build Environment)
- SFE (spec-files-extra)
- OSS (Open Sound System)
Opensolaris
I will assume you already have a system running opensolaris, so let's move on.
JDS CBE
You'll want to install the CBE first, since you can use that to build and install gawk, which you'll need to build OSS. Pick up the latest tarball
here. The instructions for building and installing the CBE can be found
here.
One thing to note if you're running a recent opensolaris build. For example, in build 86 many packages were moved, renamed, or removed. I had to change the following in the cbe-install script in order for it to grab the right packages. Of course, I think they're right, but honestly I did this in a hurry and didn't try very hard to validate the changes.
OLD:
JDS_DEPENDENCIES="SUNWgpch SUNWi2cs SUNWi1cs SUNWi15cs SUNWceuos
SUNWcleu SUNWeuluf SUNWdeiso1 SUNWi5cs SUNWi13cs
SUNWi9cs SUNWeeuos SUNWi7cs SUNWesiso1 SUNWcleu2
SUNWeu8os SUNWfriso1 SUNWale SUNWhkleu SUNWhleu
SUNWinleu SUNWitiso1 SUNWjfpu SUNWkleu SUNWmeaos
SUNWsmbaS SUNWnafos SUNWnamos SUNWneuos SUNWsamos
SUNWseuos SUNWsviso1 SUNWtleu SUNWweuos SUNWgtar
SUNWwgetr SUNWwgetu SUNWhea SUNWsfwhea
SUNWsprot SUNWxcu4"
NEW:
JDS_DEPENDENCIES="SUNWgpch SUNWi2cs SUNWxwplt SUNWi15cs SUNWlang-cs
SUNWcleu SUNWlang-en SUNWlang-de SUNWlang-fr SUNWlang-hu SUNWlang-pl
SUNWlang-sk SUNWlang-common-extra SUNWlang-cs-extra SUNWlang-de-extra
SUNWlang-fr-extra SUNWlang-hu-extra SUNWlang-pl-extra SUNWlang-sk-extra
SUNWceuow SUNWi5cs SUNWi13cs SUNWi9cs SUNWlang-bg SUNWlang-bg-extra
SUNWi7cs SUNWlang-es SUNWlang-es-extra SUNWcleu2 SUNWale SUNWhkleu
SUNWhleu SUNWinleu SUNWlang-it SUNWlang-it-extra SUNWjfpu SUNWkleu
SUNWlang-ar SUNWlang-es SUNWlang-da SUNWlang-sv SUNWlang-sv-extra
SUNWtleu SUNWgtar SUNWwgetr SUNWwgetu SUNWhea SUNWsfwhea
SUNWsprot SUNWxcu4"
Once the installation completes, be sure to modify your .profile, .cshrc, or whatever script you need to update to grab the environment from /opt/jdsbld/bin/env.[c]sh. You'll either need to do that or source the appropriate file prior to building anything with the CBE.
SFE
The next step is to checkout the latest files from the spec-files-extra repository at sourceforge. This can be done by running the following command:
svn co https://pkgbuild.svn.sourceforge.net/svnroot/pkgbuild/spec-files-extra/trunk SFE
from the directory in which you wish to put these files. You'll end up with a subdirectory called SFE inside of which will be various .spec files, patches, etc.
Once the checkout is complete, cd into the SFE directory and run the following command to build and install gawk:
pkgtool build --download SFEgawk.spec
Once gawk is installed, the next step is OSS.
OSS
Download the latest OSS tarball from
here. As of this writing, the latest build was 1015. Follow the instructions on the RELNOTES.txt file for compiling and building the package. Once the package is installed, you may need to reboot in order to allow the OSS drivers to bind to your soundcard. If you're not sure whether you need to reboot, try running "osstest" after installing the package.
The first time I tried to install and use OSS, it was very difficult to install properly. I've found, though, that both builds 1014 and 1015 work quite well. My only real complaint is that the ossmixer application opens a window that doesn't even fit on my screen due to all the controls for the multi-channel soundcard. I also wish the volume control in xmms would control the mixer volume, but I admit I haven't bothered to see if there's a way to make that work.
Audacity
Last, and certainly not least, it's finally time to build and install audacity. You can do this one of two ways. You could just build and install every .spec file:
pkgtool build --download *.spec
in which case you might as well get yourself a mondo cup of coffee or go take a nap. Alternatively, you can build and install those packages that are necessary for audacity. If you ran "pkgtool build --download SFEaudacity.spec", you'd find it would fail indicating several dependent packages that had not yet been installed. To save you the trouble, at least with the current .spec files, this command line should suffice:
pkgtool build --download SFEogg-vorbis.spec SFElibsndfile.spec SFElibsamplerate.spec SFEportaudio.spec SFEfftw.spec SFEladspa.spec SFEladspa-swh-plugins.spec SFEsoundtouch.spec SFEwxwidgets.spec SFEaudacity.spec
If that's the case, you should see a message indicating that the build/install of all these packages was successful. Hopefully that's the case. If it isn't, fortunately pkgtool leaves detailed log files that should help you determine what went wrong during the build.
If all went well, fire up audacity and twiddle some bits.
Cheers.