sukucorp at gmail.com
Wed Dec 14 15:24:23 PST 2005
On 12/14/05, Ken Moffat <ken at linuxfromscratch.org> wrote:
> On Wed, 14 Dec 2005, Tushar Teredesai wrote:
> > Hi:
> > I recently acquired an AMD64 desktop (yay!). Before installing LFS on
> > it, I have some questions regarding multilib. If they have already
> > been answered before, feel free to hit me with a cluebat and point me
> > to it.
> > 1. The book builds /cross-tools and then uses that to build /tools. If
> > I am not performing a native build, can I skip the cross-tools
> > section?
> I think you are misunderstanding _something_ here, but I'm not quite
> sure what. The system we create in /tools is similar to what regular
> lfs puts in /tools (not much more than a minimum to build a new final
> system), so for an amd64 multilib build we will create a biarch x86_64
> toolchain and necessary tools (that is, 64-bit code, plus some 32-bit
> Now, you say "I am not performing a native build", so you are coming
> from i686 ? In that case, _how_ are you going to create a 64-bit
> toolchain if you don't cross-compile ?
Sorry, that was a typo. I meant I am performing a native build. I will
be using a 64bit host.
What I understood is that if I am performing a native build I can skip
the cross-tools section and just build /tools similar to how we build
Another thing that I did not quite grasp is why are 32bit libraries
built during the temporary phase (/tools). Since the toolchain is also
capable of compiling 32bit code, I can potentially skip building the
32bit libraries when installing into /tools and only build 32bit
libraries for packages that I need.
> And if you already have a multilib host, still don't skip it - this is
> the 'CLFS' book, for multilib it's the only game in town, and we
> actually put glibc into /tools during the first chapter "Constructing
> Cross-Compile Tools".
> > 2. If I understand multilib correctly, I don't need to install the
> > 32bit libraries for all packages, but only for the dependencies that I
> > require. For example, if I need 32-bit mozilla, I only need to have
> > 32bit libraries for all direct and indirect dependencies of mozilla.
> > Correct?
> Correct. So perhaps only expat, png, freetype, fontconfig, X, jpeg,
> (maybe tiff and/or gif if your version of mozilla uses them), pkgconfig,
> glib, pango, atk, gtk, libIDL, mozilla - depends a bit on what you
> intend to do with a 32-bit mozilla, I assume plugins, so you might be
> able to drop some of these, or may need to add something else.
Yep, basically for plugins.
> > 3. Is there any recommendation for where to put the 32bit related
> > executables (such as -config scripts for packages)?
> Ryan's scripts (in the svn repo beside the BOOK) use a wrapper, and I
> think move the programs to -32. Of course, you have to identify which
> programs are of interest. I've tried just moving them to -32, and then
> passing the program names to configure, if possible, or sedding the
> Makefiles, or overriding with various things. On balance, I think I
> prefer Ryan's approach but I haven't tried it yet, and I don't know how
> much it solves and how much still needs kicking.
Perhaps it would be easier to have a pure-64 bit build and for 32 bit
libraries and packages use a seperate prefix such as /opt/32bit or
> Expect particular pain with jpeg-32 (I used Ryan's enormous patch from
> scripts/ in the end), pango-32 (or perhaps pango-64, the problems seem
> to vary for different builders), and mozilla. I used firefox-1.0.7 and
> the only thing worse than trying to build it as -m32 on x86_64 was
> trying to build it at all on a less popular multilib (I abandoned that,
> maybe a newer version will be easier).
> You'll also need to put a wrapper in front of the mozilla script
> (/usr/lib/mozilla/mozilla or whatever it is called), so that you can
> pass a different PANGO_RC_FILE to the main wrapper script.
> The bottom line for multilib BCLFS is that it helps to know what each
> package installs, and you can generally expect some pain in the most
> unlikely packages, so take your time and have fun!
Thanks, looks like I will be having lot of fun :)
mailto:tushar at linuxfromscratch.org
More information about the cross-lfs