Can I build packages for Debian 5.0 using Debian 6.0 or Debian Wheezy?I assume that I could do a complete chroot'ed installation of Debian 5.0 and do my builds there, but it might be nice to have something lighter-weight.For bonus points - can I build packages for Debian 5.0 using the version of g++ from Debian 6.0 or Debian Wheezy?  I'm responsible for developing some Debian 5.0 software, but I'd like to start using C++11 features that aren't available in Debian 5.0's g++.
Compiling for old versions of Debian
debian;compiling
You might find the schroot or pbuilder packages convenient for this, since they are designed to maintain a build environment for multiple versions of Debian.That said, a basic chroot is a couple of hundred MB in size; you could have thousands of them on most modern systems without really noticing.  debootstrap is a great tool for getting those working swiftly.Building with a newer version of G++ is traditionally exciting, because the support libraries also need to change - and so the older glibc release may not support your newer binary code well.You should be able to backport the appropriate version of G++ and have it work, but directly using the newer version might cause problems.  The release notes should help understand that.