3

I'm trying to set up a build environment for a software package in Debian Jessie. I need to produce amd64, i386 and eventually armel and armhf binaries of the software. It would be cool if I could cross-compile it to ALL of the architectures supported by Debian, which are a lot more than that, but those 4 are the ones I particularly care about.

I started with amd64 Debian Jessie and added i386 multiarch.

It all worked well until I had to install libpulse-dev, which is a dependency of the software. When installing it, I got

The following packages have unmet dependencies: libpulse-dev : Depends: libglib2.0-dev but it is not going to be installed

with apt-get and

The following packages have unmet dependencies: libglib2.0-dev : Conflicts: libglib2.0-dev:i386 but 2.42.1-1 is installed.

with aptitude.

It looks like libglib2:amd64 and libglib2:i386 conflict — they can't be installed at the same time. Someone on #debian at Freenode told me that it's a well-known limitation of multiarch.

I have to have that package installed in order to make i386 builds.

I'm thinking of removing i386 multiarch, since it doesn't work, and setting up i386 chroot and building the i386 version of the software inside that chroot.

That chroot solution should work for i386, but it doesn't work for when I will be producing binaries for armel, armhf, arm64, mips and all others architectures — I won't be able to make those builds in armel, armhf, arm64, mips, etc. chroots since I can't run arm and mips executables on my processor.

How can I produce builds of the software that target amd64, i386, armel, armhf, arm64 and mips architectures on the same Debian Jessie system in a consistent manner (i.e. all builds are done the same way, not "builds for one architecture use chroot, but builds for other architectures use multiarch") without getting libglib2 conflicts like I do when using multiarch?

1

Unfortunately glib2.0 isn't multiarch-compliant (yet); you can subscribe to https://bugs.debian.org/648621 if you want to keep an eye on things.

To build software for various architectures you can use pbuilder and/or qemubuilder. Debian has very good support for chroots using Qemu to run binaries on different architectures; debootstrap supports this natively.

0

You can combine the two approaches, do cross compilation with multiarch for dependencies but use a dedicated chroot for each target architecture.

This way you won't have as many problems with conflicts. I can't gaurantee that it will work for your package but it has a much better chance that trying to do all architectures under the same root filesystem.

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.