This is how I built my Xen server.
First install Debian 5.0 (Lenny). This should also work on 4 (Etch) too.
Everything is done on the command line as root.
To build Xen from source you’ll need as fair number of dependencies. The easiest way to install them is by using the apt-get install command as below:
apt-get install bcc bin86 gawk bridge-utils iproute libcurl3 libcurl4-openssl-dev bzip2 module-init-tools transfig tgif texinfo pciutils-dev mercurial build-essential make gcc libc6-dev zlib1g-dev python python-dev python-twisted libncurses5-dev patch libvncserver-dev libsdl-dev libjpeg62-dev
If you installed the 64bit version of Debian then you’ll also need gcc-multilib for the compile to work:
apt-get install gcc-multilib