I'm on Debian 7.9 (wheezy) x64, and I would like to install build-essential:i386.

I already added i386 in dpkg --architecture, updated aptitude and installed java-jdk-1.6:i386 successfully.

BTW, no matter how I try, build-essential systematically generates an error of dependencies with:

apt-get install build-essential:i386
Depend : dpkg-dev:i386 (>= 1.13.5)
E: Unable to correct problems, you have held broken packages...

If someone has an idea... Thanks.

Also, I found this on Debian Mailing Lists - Re: cross-build-essential

Say I want to have the build-essential for i386 installed on amd64. I could install build-essential:i386, replacing gcc/g++:amd64 with gcc/g++:i386. Wouldn't that give me everything needed to cross-compile for i386?

In that case, yes, because you can run x86 code on an AMD64 or Intel 64 CPU. Though you would indeed be replacing gcc-4.7:amd64 etc. with gcc-4.7:i386 etc. as the packages aren't co-installable with themselves.

Is it true?


Well, the thing is, you do not really need build-essential:i386 on a amd64 system, depending on what you want to compile, you might need libpam-dev:i386 or other 32bit -dev libraries, but you should use the 64bit tools, even to generate 32bit code, mainly because they should, in theory, run faster ... they have access to more memory ...

  • 1
    I solved my problem with by installing g++-multilib & gcc-multilib.
    – m4hmud
    Feb 23 '16 at 14:39

Yes, it's true that you can't have build-essential:i386 and build-essential:amd64 installed at the same time. That would require the presence of two instances of some executables (for example gcc), and that isn't supported by the Multiarch Specification:

Unresolved issues

Co-installable packages for executables

Co-installation of executables would potentially make it possible to reuse a single disk image on systems of multiple architectures with no modification. This could be implemented on top of multiarch using architecture-qualified paths for executables, but would require an additional mechanism (such as kernel support, or boot-time symlinking) to implement PATH handling.

  • Can you quote the relevant portion of the "MultiArch Specification" or other relevant document? I took a quick look at the "MultiArch Specification", but don't see the specific point addressed there. Feb 23 '16 at 10:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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