Monday, February 3, 2014

Building Ardour from Source

I want to develop a VST plugin.  Problem is I'm working on a Linux platform.  Audacity is apparently popular, but it only supports VST plugins on its Windows and Mac editions.  I recently discovered Ardour, which is really nice.  And, because I don't seem to like doing anything the easy way, decided to build it from the source.  It has eleventy-billion dependencies which are listed on their download page.  I grabbed the sources from all of them and built them as well.

I'm not including all of the details, but I will say that in most cases, I was able to cd into the package directory, run configure-make-make install without problem.  Some of these use 'waf', which until the other day I was completely unaware of.  In these cases, you run waf configure-waf-waf install instead, so it's very similar (and you get colorful output text).

I'm not sure if there was a "proper" order for building the packages.  I just kind of winged it and I got Ardour working.  I started by installing jack with apt-get jackd2 jackd2-dev.  I also kept everything segregated by installing the dependencies in /opt/ardour-deps.  Of course, this requires making sure LD_LIBRARY_PATH=/opt/ardour-deps/lib before running ardour, but no biggie.  I just aliased the executable with 'env LD_LIBRARY_PATH=/opt/ardour-deps/lib /usr/local/bin/ardour3'.

Here's a brief transcript of my notes while putting everything together:
  • libsndfile - got source, no probs building
  • gnomecanvas - got source, required intltool and libgail to build
  • libsigc++ - source from ardour site, no probs building
  • libcairo - source from ardour site, no probs building
  • libgtk+ - source from ardour site, no probs building
  • lrdf - source from ardour site, no probs building
  • boost 1.49.0 - got source, no probs building
  • fftw 3.3.1 - provided link broken, only found 3.3.3, apparently incompatible with other dependencies.   ultimately had to get with apt-get fftw3 fftw3-dev
  • glibmm 2.32.0 - got source, no probs building
  • cairomm 1.10.0 - got source, no probs building
  • pangomm 2.28.4 - got source, no probs building
  • atkmm 2.22.6 - got source, no probs building
  • gtkmm 2.24.2 - got source, no probs building
  • libart_lgpl 2.3.21 - got source, no probs building
  • libgnomecanvasmm 2.26.0 - got source, no probs building
  • liblo 0.26 - got source, no probs building
  • raptor2 2.0.6 - got source, no probs building
  • rasqal 0.9.28 - got source, no probs building
  • redland 1.0.15 - got source, no probs building
  • libogg 1.3.0 - got source, no probs building
  • flac 1.2.1 - got source, couldn't make examples with fftw 3.3.3, had to use alternate
  • libvorbis 1.3.2 - got source, no probs building
  • libsamplerate 0.1.8 - requires libsndfile
  • aubio 0.3.2 - requires alternate fftw
  • rdflib 3.2.0 - link broken, had to find elsewhere.  requires python_setuptools to install.
  • lv2 1.2.0 - 'waf' install, no probs building
  • serd 0.18.2 - 'waf' install, no probs building
  • sord 0.12.0 - 'waf' install, no probs building
  • sratom 0.4.2 - 'waf' install, no probs building
  • lilv 0.16.0 - 'waf' install, gave some message about python bindings disabled, haven't come across any consequences yet.
  • suil 0.6.10 'waf' install, no probs building
  • curl 7.25.0 - found source, long time building.  seemed to hang at 'check recvfrom', but waited ~5 minutes and it worked.
  • taglib 1.9.1- found source, requires cmake
  • vamp 2.5 - had to do some hunting from link, eventually found newer version.  built & installed and this apparently works.
  • rubberband 1.8.1 - can't confirm that I grabbed right version.  required alternate fftw3 lib.
I skipped the freetype "patch", but I think the text renders just fine on my platform.

Here's more detail on building some of the packages:
  • Building boost
    • ./bootstrap.sh --prefix=/opt/ardour-deps
    • long wait w/o messages after ./b2 install
      • ~2-5 minutes with no output, then 10+ minutes to compile
    • accidentally followed steps for alternative build.  No matter bc files put in /tmp directory.
  • Want to do cairo next, received complaints about no libpng
  • libsig++ - easy compile with config/make/make install
  • back to cairo
    • apt-get install libpng12-dev
    • apt-get install libpixman1-dev
    • apt-get install libfontconfig1 libfontconfig1-dev libfreetype6 libfreetype6-dev
  • building glibmm
    • needs glib-2.0
    • apt-get install libglib2.0-0 libglib2.0-dev
  • building pangomm
    • note: accidentally had build cairo instead of cairomm
    • apt-get install libcairo2-dev
    • apt-get install libpango1.0-dev
  • libatkmm
    • required apt-get install libatk1.0-0 libatk1.0-dev
  • aubio had issues, wouldn't accept my install of fftw3.  had to run apt-get install libfftw3-dev and it worked.
  • building ardour (final step)
    • if you get "unexpected version of vamp header" errors, then in waf configure: also had to include ALL vamp subdirs to "--also-includes"
    • had to add @aubio - rtprio 99 line to /etc/security/ldconfig (NOTE: this didn't work)
    • had to configure jack to not run in rtmode.
 This literally took me all day last Saturday, but Ardour appears to run fine.  I haven't experienced any crashes yet (although I haven't really pushed my luck).  I set user memory lock limit of 2048000 kB and max files of 16384 (no matter what, program complains of limits, but I think these are fair, since I'm not planning on doing anything fancy).

No comments:

Post a Comment