Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have rebuilt a deb package with a custom patch for my computer which is a 64bit machine. I did it using:

sudo apt-get -b source [package name]

Now my question is, how to do that in a similar manner to cross-compile the same package for 32bit machines?

Thanks, Nicolay

share|improve this question
Is uploading to Launchpad an option? Launchpad provides build servers that can create the packages for you in whatever architecture you want. – Nathan Osman Jul 29 '11 at 23:28
up vote 3 down vote accepted

It is mostly not possible to cross-compile a 32bit package from a 64bit deb package if the package contains any source files or libraries.

You'll need to repackage using the 32bit libraries and recompile the source code.

My suggestion would be to split your compile and packaging - do your 32bit work in a separate 32bit Virtual Machine.

Perhaps better, would be to set up a LaunchPad PPA and let Launchpad do the compiling for both 64bit and 32bit architectures automatically.

share|improve this answer

You can use a cross-compile environment and/or some helper tools.

Personally I favour xdeb it have never failed me!

This guide: Using Xdeb will help you setup the Xdeb environment and how to use the tools.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.