Compiling from SVN HOWTO

From FreeBoB

(partly copy/pasted from the instructions of Davide Morelli at http://www.davidemorelli.it/)

Table of contents

General Notes

One of the most important things to verify is where your distribution puts its executables and libraries. If you have any of the support libraries or jackd installed using a package manager, you have to overwrite that version with the newer one we are compiling here. You can also uninstall the packages, but that can result in dependency problems.

When using './configure' from a tarball build system, you can use the '--prefix' option to indicate where the files should be installed. This prefix has to be set correctly so that the distribution's binary packages are overwritten. Usually it is either '/usr' or '/usr/local'.

The build system then installs files in the following locations:

executables           $PREFIX/bin
libraries             $PREFIX/lib
include files         $PREFIX/include
...

The prefix is distribution dependant. Here is a list of distributions with their default prefixes:

* RedHat/Fedora: --prefix=/usr 
* Arch Linux: --prefix=/usr
* ...

To find the prefix out, you can use the 'which' command (for executables):

$ which jackd
/usr/bin/jackd

This means that the prefix should be set to '/usr', hence the configure script should be invoked as

./configure --prefix=/usr

You can also use 'locate jackd' or 'find / -name "jackd"'. Instead of jackd, you can use libraw1394.so, libiec61883.so, etc. depending on what you have installed.

If you don't have any of these installed, you can try 'which gcc', as you will have to have gcc installed in order to build FreeBoB.

Support Libraries

General tools

Be sure to have svn, automake, autoconf, libXML, ALSA and other required stuff installed. In case your distribution doesn't include the headers in packages by default (and you're not installing from source), you will need the development packages (xxx-dev or xxx-devel) as well.

On an APT enabled system you can do (as root):

# apt-get install subversion automake autoconf \ 
                  libtool libxml2-dev libcap-dev libasound2-dev

required library: libraw1394

FreeBoB needs the very latest version of such libraries so you can't simply write apt-get install stuff, you need to compile from source. This source has to be obtained from the development repository, in this case Subversion based:

Here's how you obtain the SVN version of libraw1394 (internet connection needed!):

svn co svn://svn.linux1394.org/libraw1394/trunk libraw1394-svn

These are the configuration commands (remember the prefix section above!):

$ cd libraw1394-svn
$ autoreconf -f -i -s
$ ./configure --prefix=YOUR_PREFIX

And here's how you build:

$ make

And installing the library (as root):

# make install

required library: libiec61883

Now let's work on libiec61883. The procedure is identical to that for libraw1394.

$ svn checkout svn://svn.linux1394.org/libiec61883/trunk/ libiec61883
$ cd libiec61883
$ autoreconf -f -i -s
$ ./configure --prefix=YOUR_PREFIX
$ make

As root:

# make install

required library: libavc1394

And once again for libavc1394:

$ svn co https://svn.sourceforge.net/svnroot/libavc1394/trunk libavc1394
$ cd libavc1394
$ ./bootstrap
$ ./configure --prefix=YOUR_PREFIX
$ make

As root:

# make install

kernel support

Make sure that you have the ieee1394 kernel modules loaded:

(as root)
# /sbin/modprobe ohci1394
# /sbin/modprobe raw1394

Now check whether the /dev/raw1394 device was created by udev. If not, you have to create it manually:

(as root)
# mknod -m666 /dev/raw1394 c 171 0

libfreebob

Downloading and installing

Now let’s compile freebob. Get the sources from the SVN repository (the 1.0 stable branch):

svn co https://svn.sourceforge.net/svnroot/freebob/branches/libfreebob-1.0 libfreebob

If you like to run bleeding edge software you can try the head version. But it might not work for you. If you experience problems with the head version, please try the 1.0 stable branch. In any case we'd like to hear from your experience!

svn co https://svn.sourceforge.net/svnroot/freebob/trunk/libfreebob libfreebob

Again the same steps:

$ cd libfreebob
$ autoreconf -v -i -s
$ ./configure --prefix=YOUR_PREFIX
$ make

As root:

$ make install

(Once again, remember to substitute YOUR_PREFIX with your own setting -- see above!)

Testing your configuration

Now it's time to test the configuration. Hook up and power up your BeBoB device, and then run (as user):

$ cd libfreebob
$ tests/test-freebob discover

If everything went fine, you'll get a fill report on your audio card, note the port and node (the first lines).

Compiling the jack server from SVN

Please take a look at http://jackaudio.org for more info.

The first step is obtaining the source:

$ svn co http://subversion.jackaudio.org/jack/trunk/jack jack
[copious output]

Now we will configure, compile and install the new jackd. We’ll need to specify a default temporary directory. If you already have jackd installed do

jackd --version

I get: jackd version 0.99.0 tmpdir /dev/shm protocol 13, so I need to pass the /dev/shm path to the configure script in the --with-default-tmpdir option. Check and change it to fit yours.

$ cd jack
$ ./autogen.sh --prefix=YOUR_PREFIX --with-default-tmpdir=/dev/shm
[copious output]

At the end of the configure phase you should see something like this:

jack-audio-connection-kit 0.101.1 :

| Build with ALSA support............................... : true
| Build with OSS support................................ : true
| Build with CoreAudio support.......................... : false
| Build with PortAudio support.......................... : true
| Build with FreeBob support............................ : true
|
| Default driver backend................................ : "alsa"
| Shared memory interface............................... : "System V"

If the output indicates 'false' for FreeBoB support, there is a problem with your libfreebob installation. The configure output will probably contain a line like this:

checking for LIBFREEBOB... no

Fix your libfreebob installation first.

Now we can proceed to the make & make install steps:

$ make
[more output]

As root:

$ make install

You should have it all now.

Testing

The following should work:

$ jackd -d freebob

If not, be sure that you are specifying a correct port: for the second firewire port use:

$ jackd -d freebob -d1

For good results you should use a command line like:

$ jackd -R -d freebob -p128

For more information wrt jack look at http://jackit.sf.net or work the google magic. That is out of our scope.