I have a i386 ubuntu hardy machine, and an amd64 ubuntu hardy machine. I want to compile a debian package (a.k.a. deb) for the amd64 machine on the i386 (because I don't have enough memory to compile is quickly on the amd64 machine). If I do a dpkg-buildpackage on the i386 machine, it produces a deb for i386, which can't be installed on the amd64 machine. Is there anyway to compile the deb for amd64 on the i386 machine?
| |||||||||||||||
feedback
|
|
So, there are some solutions to that:
| |||||||
feedback
|
|
One thing I do on Debian all the time is use a 64-bit kernel with a 32-bit userland for my normal system, and then create a chroot with 64-bit userland to build amd64 packages. The structure of the kernel packages in Ubuntu is a bit different, so I don't know if this is possible or recommendable there. Other than that, the clean solution is to use a virtual machine. QEMU is the obvious choice, because it can emulate just about anything on anything (and it's free). You can use qemubuilder (packaged in Ubuntu) to integrate the build with pbuilder. This can be a bit tricky to set up in my experience, but it might be worth it if you need to do this repeatedly. For a few packages, just fire up QEMU and log in by hand. If you are very adventurous you can also try cross-compiling, but this is probably much more difficult and doesn't work with all packages. Look for dpkg-cross to get started. Or how about you create a Personal Package Archive (PPA) on Launchpad and have your package be autobuilt there. | |||
|
feedback
|