Re: How to build a 32-bit package in Debian?
On Wed, Jan 26, 2011 at 12:44:02PM +0100, Goswin von Brederlow wrote:
> Adam Borowski <email@example.com> writes:
> > On Mon, Jan 17, 2011 at 11:49:17AM +0800, Paul Wise wrote:
> >> Add lib32 packages for the deps.
> Actually you need ia32-libs-dev and also gcc-multilib when you COMPILE a
> 32bit package. ia32-libs itself is only sufficient for building non-free
> 32bit packages with prebuild binaries.
Aren't ia32-libs on their way out, together with rest of the bi-arch stuff?
> >> Help fix squeeze RC bugs then start work on multi-arch when the wheezy
> >> cycle starts.
> > There's a wonderful thing called "xapt", aka "multi-arch working today".
> > Sadly, it can't be integrated into build-depends like real multi-arch will
> > be, but getting all libraries you need is a matter of typing:
> > # xapt -a pdp11 liblossage1 liblossage-dev
> Please don't use xapt. That tool is so far purely for use in chroots
> (for pbuilder) and for cross compiling.
Like, building i386 binaries on an amd64?
> It does not handle any dependencies between 32bit libs and the native
> packages. E.g. for shared files, conffiles, scripts that need to call
> other binaries. So using it to execute 32bit binaries will give verry
> poor results.
It seems to work just fine for me, even for completely foreign architectures
with no qemu-user installed (in this case you won't be able to run the
binaries but building works). Not handling dependencies well means just
that you may have to install them manually.
> The right tool for this would be the old ia32-apt-get
Except, xapt works for all architectures, not just the specific case of i386
> or the revised apt-ma-emu. Saddly the squeeze freeze hit before
> apt-ma-emu was ready for upload so it won't be in squeeze.
At a glance, it appears to do the same thing as xapt except that it doesn't
require manual selection of packages to install and can do upgrades
automatically. Which are good things, thanks for telling us about this
tool. It would be nice to have it in experimental.
xapt is there, apt-ma-emu is not (and I didn't know about it). The results
are awesome -- example build times:
* native: 115 minutes
* qemu-system: 133 minutes
* distcc: 16 minutes
* xapt: 44 seconds
And that with a build-dependency chain of over 50 packages, of which I had
to specify only those directly depended upon.
The best we can hope for, though, is apt-ma-emu being already obsolete by
1KB // Microsoft corollary to Hanlon's razor:
// Never attribute to stupidity what can be
// adequately explained by malice.