1

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++.

Josh Kelley
  • 217
  • 2
  • 9
  • A chroot is exactly what Debian developers use in this circumstance. Debian comes with several tools to make this very easy. – Gilles 'SO- stop being evil' Mar 02 '12 at 00:48
  • 1
    Here is a patch for backporting 4.7 to stable. It isn't what you were asking, but will give you an idea what is involved. See [Get newest gcc for debian](http://unix.stackexchange.com/questions/36388/get-newest-gcc-for-debian) – Faheem Mitha May 26 '12 at 03:42

1 Answers1

2

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.

Daniel Pittman
  • 7,554
  • 2
  • 31
  • 18