1

Note: This question has been previously asked on askubuntu.com but was rejected as off-topic, and instead, I was redirected to this site. Therefore I'm reposting it here.

I'm trying to compile a program under GNU/Linux for both 32 and 64 bit at the same time. However, some dependencies are in conflict with itself meaning that it's not possible to install both their amd64 and i386 version at the same time.

Example:

ubuntu@ubuntu:~$ sudo apt-get --no-install-recommends install libfltk1.3-dev:amd64 libfltk1.3-dev:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libfltk1.3-dev : Conflicts: libfltk1.3-dev:i386 but 1.3.2-4 is to be installed
 libfltk1.3-dev:i386 : Conflicts: libfltk1.3-dev but 1.3.2-4 is to be installed
E: Unable to correct problems, you have held broken packages.

Before I opt for building it separately (on a 32-bit and a 64-bit operating system), I thought I ask whether there's a possibility for some workaround to this. This was tested on Ubuntu 14.04.

UPDATE: This post highlights that multiarch doesn't yet support co-installation of binaries for different architectures (only libraries and headers). libfltk1.3-dev includes /usr/bin/fltk-config, so this is most likely the reason why it's in conflict with multiple instances of itself.

2

libfltk1.3-dev doesn't support co-installation of multi-arch variants (yet?), so you can't install both amd64 and i386 flavours simultaneously to build 32- and 64-bit programs at the same time. (For libfltk1.3-dev, this is because the package includes fltk-config; to allow multi-arch co-installation would require pulling that out into a separate package.)

Currently the most versatile approach is to use chroots; if you're building Debian packages, then sbuild supports multiple architectures out of the box, otherwise you'll need to use debootstrap manually.

  • I found the exact same answer right before you posted yours. I never used chroots before so I have to learn how to use it first. Thanks anyway. – mYself Dec 31 '15 at 13:31
  • @mYself You can read my howto on the topic. – Gilles Dec 31 '15 at 19:59
  • Yes, the clean solution is to use a chroot because some dev packages are not multi-arch co-installable. If you do not want to do that you might hack your way around that with something like this: gabriel.urdhr.fr/2014/08/20/compile-wine-debian – ysdx Feb 25 '16 at 22:17

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.