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.

mYself
  • 13

1 Answers1

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.

Stephen Kitt
  • 434,908