Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 need to cross-compile for 64-bit architecture on a 32-bit platform (using gcc-multilib and -m64 flag).

For this I need to install 64-bit versions of the dependent libraries.

How do I do that?

share|improve this question
up vote 2 down vote accepted

You can't. You will have to manually cross compile the libraries and store them in a non standard location ( so they don't overwrite the 32 bit ones ).

It would probably be easier to just install a 64 bit system and build it natively, or make a debian package and upload it to your PPA on launchpad and let it worry about building it on each of the architectures.

See for more information on packaging and other development issues.

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.