Ardour 2.1 VST fails to build on a chroot environment.

I use Debian Etch. Created a chroot environment to check exactly what libraries, packages and/or dependencies need to be solved in order to build from scratch.

Like this:

mkdir /some/where
debootstrap etch /some/where
cd /some/where
chroot .

Upon doing apt-get source ardour, downloading Steinberg SDK and pasting it into …/libs/fst, changing SConstruct from VST=0 to VST=1, I type

scons VST=1 and I get

Enabling VST support. Note that distributing a VST-enabled ardour
is a violation of several different licences.
Build with VST=false if you intend to distribute ardour to others.
Checking for pkg-config version >= 0.8.0… yes
Checking for gthread-2.0… yes
Checking for lrdf… yes
Checking for libgnomecanvas-2.0… yes
Checking for gtk±2.0… yes
Checking for jack… yes
Checking for samplerate… yes
Checking for glib-2.0… yes
Checking for libxml-2.0… yes
Checking for raptor… yes
Congratulations, you have a functioning C++ compiler.
system triple: i686-pc-linux-gnu

detected DIST_TARGET = i686

IndexError: list index out of range:
File “/tmp/ardour-2.1/SConstruct”, line 613:
x86_flags = flag_line.split (": ")[1:][0].split ()

Any idea about how to proceed? Googling is not helping that much…

I passed through the same process lately.
What I did is to put the source file Ardour 2.1 into
the usr/src directory. After that I made the dependency tree with apt-get build-dep ardour command.