[lfs-support] Understanding 32bit vs 64bit and multilib systems

Simon Geard delgarde at ihug.co.nz
Tue Nov 27 02:23:18 PST 2012

On Mon, 2012-11-26 at 19:51 -0800, Kyle Brennan wrote:
> Hi,
> I'm not sure that this is the right mailing list, but I'm going to throw
> this out there anyways.  
> I've got a few questions about building LFS on a 64 bit host and how
> multilib works.  
> 1. What exactly is multilib?  (I've googled, wikipedia'd etc and I'm still a
> bit confused) from my understanding, it's simply an additional set of 
> libraries that will allow for a system to interpret both 32 bit and 64 bit
> machine code.

That's pretty much it - multilib means having two sets of libraries, one
32-bit, one 64-bit. Normally, the latter would be primary - i.e all the
executables are linked to the 64-bit versions, the 32-bit libraries
being present only for running 32-bit executables.

And that, of course, is the only reason to do multilib - you have a
application that's only available as a 32-bit binary, no source code.
E.g Skype, where no 64-bit binaries are available, and nor is the source
code that would let you build your own. You *can* run that on a 64-bit
distro, but only by dragging in a tonne of extra 32-bit packages to make
it work.

> 2. I'm building on a 64 bit system, if I follow the book exactly, would this
> build yield a 32 bit or 64 bit system?

It's whatever the host distro is, so if you're running a 64-bit host,
you'll get a 64-bit LFS. One caution though - when we say 64-bit, we're
talking about the software, not the hardware. A 32-bit host running on
64-bit hardware still gives you a 32-bit LFS.

> 3. if the answer to question one is 64 bit, is this automatically a multilib
> system or are there additional steps that will pave the way to multilib?

Nope, multilib is quite a bit more complicated. The CLFS folks are
probably the best ones to ask about that.

> 4. can I use the LFS book to create a 32bit system on a 64 bit OS?  (I'm
> assuming that the book for this would be CLFS though)

Not by following the book to the letter. If the host is multilib and has
32-bit versions of everything the book depends on, I suppose it'd be
possible with a few changes. But it'd be much easier to boot a 32-bit
host (perhaps in a VM), and build it from there.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20121127/8c85556b/attachment.sig>

More information about the lfs-support mailing list