Sample Header Ad - 728x90

Set up environment for cross-compilation to i386, armel, armhf, arm64 and mips with no libglib2 conflicts

3 votes
2 answers
1561 views
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?
Asked by Zorro-One (31 rep)
Aug 5, 2015, 03:06 AM
Last activity: Sep 2, 2018, 09:27 PM