Hi,
First of all: Unless you are a programmer with lots of experience in C/C++ and a real UNIX hero, too, I recommend you try really hard to get a Linux distribution with a ready-to-run Ardour binary package (maybe ubuntu?).
However, if you’re still sure you want to build it, here is how my build of ardour 2.7.1 was done:
Hardware: Lenovo T60 (laptop)
OS: custom-installed Debian 5 (uname -a: Linux fireant 2.6.26-1-amd64 #1 SMP Sat Jan 10 17:57:00 UTC 2009 x86_64 GNU/Linux)
First, I installed the x11 development headers, the x11 render extension headers, libasound, libz, libexpat, libjpeg, libgpg-error and libgcrypt from the Debian distribution DVD.
The destination for my build of ardour was /usr/local/ardour, you’ll have to replace that with whatever destination directory you’d like to use.
I built the following source packages in the order they are listed here:
boost_1_39_0.tar.gz
libxml2-2.7.3.tar.gz
libxslt-1.1.22.tar.gz
liblo-0.26.tar.gz
fftw-3.2.1.tar.gz
libsamplerate-0.1.7.tar.gz
pixman-0.15.2.tar.gz
libpng-1.2.35.tar.gz
tiff-3.8.2.zip
jasper-1.900.1.zip
xrender-0.8.3.tar.gz
libart_lgpl-2.3.20.tar.gz
freetype-2.3.9.tar.gz
fontconfig-2.6.0.tar.gz
libsndfile-1.0.19.tar.gz
jack-audio-connection-kit-0.116.2.tar.gz
aubio-0.3.2.tar.gz
raptor-1.4.18.tar.gz
liblrdf-0.4.0.tar.gz
glib-2.20.1.tar.gz
cairo-1.8.6.tar.gz
atk-1.26.0.tar.gz
pango-1.24.2.tar.gz
gtk±2.16.1.tar.gz
libglade-2.6.3.tar.gz
libgnomecanvas-2.9.1.tar.gz
libsigc+±2.2.3.tar.gz
glibmm-2.20.0.tar.gz
cairomm-1.8.0.tar.gz
pangomm-2.24.0.tar.gz
gtkmm-2.16.0.tar.gz
scons-1.2.0.tar.gz (nothing to compile, just unpack it)
ardour-2.7.1.tar.bz2
- SET ENVIRONMENT VARIABLES:
BEFORE you start to compile the packages, set the neccessary environment variables:
export CFLAGS="-fPIC -I/usr/local/ardour/include -L/usr/local/ardour/lib -L/usr/local/ardour/lib64"
export CXXFLAGS="-fPIC -I/usr/local/ardour/include -L/usr/local/ardour/lib -L/usr/local/ardour/lib64"
export PATH="/usr/local/ardour/bin:${PATH}"
export LD_LIBRARY_PATH="/usr/local/ardour/lib:/usr/local/ardour/lib64"
export LD_RUN_PATH="/usr/local/ardour/lib:/usr/local/ardour/lib64"
export PKG_CONFIG_PATH="/usr/local/ardour/lib/pkgconfig:/usr/local/ardour/lib64/pkgconfig"
-
CREATE DESTINATION DIRECTORY AND COPY BOOST:
mkdir /path/to/destination/directory
cd /path/to/destination/directory
mkdir include
cp -R /path/to/boost_1_39_0/boost ./include/
-
START BUILDING according to build order:
./configure --prefix=/path/to/destination/directory
make
make install
If you have multiple processors, you can also use make -j n where n is the number of jobs to run in parallel.
I commonly use two jobs per CPU-thread, so for example that would be make -j 16 for a 4-processor dual-core machine.
Don’t overdo it unless you have lots of memory.
- FFTW must be compiled and installed twice:
fftw needs to be compiled at least twice, each time with different settings
- ./configure --disable-single
- ./configure --enable-single
(I also built the double-precision version, using ./configure --enable-long-double; so that would be another build of fftw)
after each build and install, use “make distclean” before changing the settings and compiling again
-
LIBLRDF needs some patching:
in liblrdf’s “examples” directory, the ladspa header file is missing, so you need to create a link before you compile liblrdf, otherwise the build fails:
cd examples && ln -s …/src/ladspa.h ./ldaspa.h
-
XRENDER needs some more patching:
xrender’s configure script is broken, so it creates an empty “-I” parameter for gcc (without specifying an include path)
in xrender’s configure script, near line 9144, replace the following line:
RENDER_CFLAGS="-I$x_includes"
with:
RENDER_CFLAGS=""
then, 3 lines below, delete the following line:
CPPFLAGS="$CPPFLAGS $RENDER_CFLAGS"
for compiling xrender, you also have to tell pkg-config that you really have X11 installed
Debian does not seem to provide an x11.pc configuration file for pkg-config, so either you get it from somewhere else, or you fake it (in the latter case, add -lX11 to the “Libs” line, like:
Libs: -L${libdir} -lX11
after compiling xrender, check the Cflags entry in it’s pkgconfig-file (xrender.pc)
if you see an “-I” with no more text behind it, delete the “-I”, otherwise later builds of other libraries may fail silently until MUCH later, when the ardour build suddenly fails because of unrelocatable symbols
- GTK+ needs some workarounds:
GTK+ configure script forgets the link against libm (the math library), so before compiling GTK+, change CFLAGS and CXXFLAGS:
export CFLAGS="-fPIC -I/usr/local/ardour/include -L/usr/local/ardour/lib -L/usr/local/ardour/lib64 -lm"
export CXXFLAGS="-fPIC -I/usr/local/ardour/include -L/usr/local/ardour/lib -L/usr/local/ardour/lib64 -lm"
after building GTK+, UNDO that change (set it to what it was before)
(generally, expect trouble building GTK-related stuff - atk, pango, cairo, glib, glibmm, cairomm, pangomm, etc. - it breaks all the time for numerous reasons, so I can’t tell you how to do a failsafe compile … good luck.)
- FINALLY - BUILDING ARDOUR
FINALLY, after building AND installing (make install) all the libraries, you can build ardour using scons.
Unfortunately, scons seems to break the environment, so pkg-config doesn’t work when called from scons.
As a workaround, create a wrapper script around pkg-config:
mv pkg-config pkg-config-bin
vi pkg-config:
#!/bin/bash
export PKG_CONFIG_PATH=/usr/local/ardour/lib/pkgconfig:/usr/local/ardour/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pkgconfig
pkg-config-bin $*
After that, everything should work. Now build ardour using scons:
chmod 0755 scons-1.2.0/scripts/*
scons-1.2.0/scripts/scons PREFIX=/path/to/destination/directory
and after that completes successfully:
scons-1.2.0/scripts/scons install
Don’t forget to delete the pkg-config wrapper script and to rename pkg-config-bin back to pkg-config after all the work is done.
Another hint:
DO NOT RUN THE BUILD PROCESS OF ANY PACKAGE AS ROOT (unless you want to scrap every other application on your system)
first, create the destination directory and chown it to your unprivileged user account. then build the packages and install them, after that recursively chown the whole destination directory back to user root / group root.
I’ve seen people unintentionally update, for example, their GTK libraries, breaking everything from GNOME to Firefox on their machine. Repairing that isn’t too much fun.
I hope this information is helpful.
regards,
Robert