Сборка и установка JAMin с «нуля»

1. Вступление
2. Установка с «нуля»
3. Установка на ALT Linux Master 2.4
4. Установка на Fedora Core 3

2.1. Prerequisite software

2.1.1. pkgconfig, automake, autoconf

Important note: all of the instructions in this document assume that you are logged in as root. If not, you won't be able to install the needed libraries or programs. Before you start building anything you will need the latest of a few development packages. Pkgconfig is available from freedesktop.org. Just to make things much easier we're going to install all of these packages in /usr. If you understand ldconfig and the LD_LIBRARY_PATH environment variable you can install wherever you want but installing in /usr avoids much unpleasantness. The sequences of commands used to build and install these packages will look almost identical from package to package but don't become complacent, there are a few changes. The command sequences make the assumption that you are in the directory containing the tarballs. Here is the installation sequence for pkgconfig:

tar -xvzf pkgconfig*.tar.gz
cd pkgconfig*
./configure --prefix=/usr
make
make install
cd ..        

In addition to pkgconfig you will need a newer version of autoconf and automake. You can get these at http://www.gnu.org/directory/autoconf.html and http://www.gnu.org/directory/automake.html respectively. To build and install do the following:

tar -xvzf autoconf-*.tar.gz
cd autoconf-*
./configure --prefix=/usr
make
make install
cd ..
tar -xvzf automake-*.tar.gz
cd automake-*
./configure --prefix=/usr
make
make install
cd ..        

[back to top]

2.1.2. ALSA

ALSA is available at http://www.alsa-project.org. You want to get the latest stable release. Get all 5 packages   driver, library, utilities, tools, and OSS compatibility. The easiest way to build and install these is to put them all in a single directory. I made a directory called /disk2/sound and I will use that for all subsequent examples. I would suggest that if you download a new version of either JACK, JAM, or ALSA that you download new versions of the other two packages as well. This is because JACK is dependent on ALSA and JAMin is dependent on JACK. When you download the ALSA packages they will be in tar and bzip2 compressed format. Since you will probably be downloading these occasionally due to changes in JACK, JAMin, or ALSA you might want to make a script to build the packages. The following is the script that I made to configure and build the ALSA packages:

clear
echo
echo
echo "Making ALSA drivers"
echo
echo
bzip2 -d alsa-driver*.tar.bz2 2>/dev/null
tar -xvf alsa-driver*.tar
cd alsa-driver-*
./configure --with-isapnp=no --with-cards=ens1371,emu10k1,ice1712 --with-sequencer=yes
make
make install
./snddevices
chmod 666 /dev/dsp* /dev/mixer* /dev/sequencer* /dev/midi*
cd ..
find . -name alsa-driver\* -a -type d -exec rm -rf {} \;
cat >~/.asoundrc <<EOF
 pcm.ice1712 {
           type hw
           card 0
        }

        ctl.ice1712 {
           type hw
           card 0
        }
EOF

echo
echo
echo "Making ALSA libraries"
echo
echo
bzip2 -d alsa-lib*.tar.bz2 2>/dev/null
tar -xvf alsa-lib*.tar
cd alsa-lib*
./configure
make
make install
cd ..
find . -name alsa-lib\* -a -type d -exec rm -rf {} \;
 

echo
echo
echo "Making ALSA OSS compatibility"
echo
echo
bzip2 -d alsa-oss*.tar.bz2 2>/dev/null
tar -xvf alsa-oss*.tar
cd alsa-oss*
./configure --disable-alsatest
make
make install
cd ..
find . -name alsa-oss\* -a -type d -exec rm -rf {} \;
 

echo
echo
echo "Making ALSA tools"
echo
echo
bzip2 -d alsa-tools*.tar.bz2 2>/dev/null
tar -xvf alsa-tools*.tar
cd alsa-tools*
cd envy24*
./configure --disable-alsatest
make
make install
cd ../as10k1
./configure
make
make install
cd ../..
find . -name alsa-tools\* -a -type d -exec rm -rf {} \;
 

echo
echo
echo "Making ALSA utilities"
echo
echo
bzip2 -d alsa-utils*.tar.bz2
tar -xvf alsa-utils*.tar
cd alsa-utils*
./configure --disable-alsatest
make
make install
cd ..
find . -name alsa-utils\* -a -type d -exec rm -rf {} \;                

Kind of "wordy" isn't it? Oh well, I've always been a bit anal retentive anyway. Let's take a look at what's going on here. First, there is an implicit assumption in this script. You must be in the directory where your bzip2 compressed ALSA packages were downloaded. In my case that was /disk2/sound. Pay close attention to the ./configure line for the driver. You'll note that I am only setting up for three cards — Soundblaster PCI Live, Ensoniq AudioPCI, and the DSP24 (ice1712 just like the Delta 1010 and EWS88MT). I don't have any ISA cards and I wanted sequencer support. If you just want to compile for all possible cards leave out the --with-cards option. You need to do the ./snddevice to make the devices in the /proc/asound directory. I made a simple ~/.asoundrc file for the ice1712. Your system will be different depending on the card (or cards) you are using. The name for the pcm and ctl devices in ~/.asoundrc must match the driver id from modules.conf.

You need to read the INSTALL file in the alsa-driver-... directory (which I deleted in the above script) to get a good idea of how to configure ALSA. The following is what I added to my /etc/modules.conf file to configure my DSP24 card:

alias char-major-116 snd
alias char-major-14 soundcore

# ALSA portion
alias snd-card-0 snd-ice1712

# OSS/Free portion
alias sound-slot-0 ice1712

# OSS/Free portion - card #0
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss        

This should be about the same for any single card. Just change the card type. There's a lot more specific information to be garnered by checking for your specific soundcard in the ALSA Soundcard Matrix. If you want to do things the easy way you can try the alsaconf utility. The only problem with that is that there isn't a full list of sound cards. In my case I can use the M-Audio Delta 1010 setup because I happen to know that it uses the same chipset as mine. I didn't have any problem doing it by hand though so it's up to you.

[back to top]

2.1.3. The GIMP Toolkit

GTK is the GIMP Tool Kit. GIMP is the GNU Image Manipulation Package (GNU is GNU's Not Unix;). Acronym hell. At any rate, in order to use JAM (don't worry, we'll get there eventually) you need version 2 of GTK+. GTK+ has it's own list of prerequisites.

2.1.3.1. Glib

Directly from www.gtk.org — "GLib is the low-level core library that forms the basis of GTK+ and GNOME. It provides data structure handling for C, portability wrappers, and interfaces for such runtime functionality as an event loop, threads, dynamic loading, and an object system." Download the latest and do the following:

tar -xvzf glib*.tar.gz
cd glib*
./configure --prefix=/usr
make
make install
cd ..               

2.1.3.2. Pango

Again from www.gtk.org — "Pango is a library for layout and rendering of text, with an emphasis on internationalization. It forms the core of text and font handling for GTK+-2.0."

tar -xvzf pango*.tar.gz
cd pango*
./configure --prefix=/usr
make
make install
cd ..        

2.1.3.3. ATK

Once more, from www.gtk.org — "The ATK library provides a set of interfaces for accessibility. By supporting the ATK interfaces, an application or toolkit can be used with such tools as screen readers, magnifiers, and alternative input devices."

tar -xvzf atk*.tar.gz
cd atk*
./configure --prefix=/usr
make
make install
cd ..		  

2.1.3.4 GTK+

One more time — "GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete set of widgets, GTK+ is suitable for projects ranging from small one-off projects to complete application suites."

tar -xvzf gtk+*.tar.gz
cd gtk+*
./configure --prefix=/usr
make
make install
cd ..		  

[back to top]

2.1.4. libsndfile

The latest version of libsndfile is available from Erik de Castro Lopo's page at http://www.zip.com.au/~erikd/libsndfile. Download and do this:

tar -xvzf libsndfile*.tar.gz
cd libsndfile*
./configure --prefix=/usr
make
make install
cd ..		  

[back to top]

2.1.5. FFTW

FFTW is the "Fastest Fourier Transform in the West". The FFTW package is available from http://www.fftw.org. Download version 3.X and do this:

tar -xvzf fftw-3*.tar.gz
cd fftw-3*
./configure --prefix=/usr --enable-shared --enable-float
make
make install
cd ..		  

If you miss the --enable-float JAM won't build properly.

[back to top]

2.1.6. LADSPA

LADSPA stands for Linux Audio Developer's Simple Plugin API. It is available at http://www.ladspa.org. You will want to download the LADSPA SDK instead of just the LADSPA header file.

tar -xvzf ladspa_sdk.tar.gz
cd ladspa_sdk/src
make
make install
cd ..
rm -rf ladspa_sdk		  

This will also install some plugins in /usr/local/lib/ladspa.

[back to top]

2.1.7. SWH plugins

You will need Steve Harris' SWH plugins. Get them from http://plugin.org.uk/. Here's the command sequence:

tar -xvzf swh-plugins-*.tar.gz
cd swh-plugins-*
./configure
make install
cd ..		  

Note that these get installed in /usr/local.

[back to top]

2.1.8. JACK

The JACK Audio Connection Kit is the glue that holds professional Linux audio applications together. JACK is a low latency audio server that provides a means of allowing multiple applications to use a system's sound hardware at the same time. It will also allow them to share audio among themselves. JACK is a requirement for JAMin. JACK is available from http://jackit.sourceforge.net.

tar -xvzf jack-audio-connection-kit-*.tar.gz
cd jack-audio-connection-kit-*
./configure --prefix=/usr --enable-optimize
make
make install		  

Again, I'm installing in /usr. In versions of JACK later than 0.70.4 you can possibly get some xrun relief by doing this:

mkdir /mnt/ramfs
cat >>/etc/fstab <<EOF
none       /mnt/ramfs      tmpfs      defaults  0 0
EOF		  

Then add --with-default-tmpdir=/mnt/ramfs to the JACK configure line when you build it. This may help with xruns, especially if your /tmp directory is on a reiserfs partition. The jury is still out on ext2/3.

[back to top]

2.2 JAMin

2.2.1. Downloading JAMin

JAMin is available as a tarball from http://sourceforge.net/projects/jamin. JAMin is a rapidly changing beast. Because of this you may want to get the JAMin software from CVS. If you decide to use CVS here are the commands to download JAMin:

cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/jamin login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/jamin co jamin        

When you are prompted for a password simply press Enter.

[back to top]

2.2.2. Building and installing JAMin

After downloading the tarball:

tar -xvzf jamin-*.tar.gz
cd jamin-*
./configure
make
make install        

If you downloaded from CVS do the following:

cd jamin
sh autogen.sh
./configure
make
make install        

Notice that we didn't specify --prefix=/usr on the ./configure line. This is because JAMin is a program and it only needs to be in your path to run. You can put it in /usr if you want. Just remember to be consistent — do it the same way every time.

[back to top]

2.2.3. Configuring JAMin

JAMin has a single configuration file — jamin_ui. This file can be used to define GTK user interface customization. It is not required. There is an example loaded into ${prefix}/share/jamin/examples/jamin_ui when you do the make install. To customize that file, copy it to ~/.jamin/jamin_ui and make changes.

[back to top]