lfs on x86_64

Andy Neebel andne167 at hotmail.com
Wed Jan 14 06:09:03 PST 2004

I don't know if this is the right place to post, but I don't think that
support is, and it isn't about NPTL, 2.6, or any of that fun stuff.  There
is a post similar to this in support, but it's buried in a thread somewhere.

I recently built a new computer, and the processor in it is an Athlon 64.  I
have built a (fairly) successful LFS system on it, and had some notes about
how to go about doing so. (as well as patches to 'fix' issues with default
directories).  However, in trying to play some games on the computer, I
managed to destroy all of the filesystems on the drive, and lost all of my
notes and partitions.  I am still trying to get something to install that I
can use as a base, so it will be awhile before I have a chance to recreate
the notes/patches.  I had been using SuSE 9.0 for x86_64 which I had
mirrored off of the ftp server onto my hard drive.  I don't normally have an
internet connection, so it will be a little while before I can do that

There are a few major notes that I do remember from playing around with the

1) If you use a 32bit base distro, then LFS compiles with no problems,
because it is running in compatibility mode for the build, so the computer
thinks that it is a 686.
2) You can build a single toolchain (I think, haven't tested much) from a
64bit host without any trouble, but you need to link /tools/lib to
/tools/lib64, and /lib to /lib64 and /usr/lib to /usr/lib64 and so on.  Some
packages do see the x86_64 platform and reconise that they need to install
in lib64 instead of lib.  Gcc and Glibc both do this.
 Also, --disable-multilib needs to be passed to gcc, otherwise it builds
both a 64bit and 32bit library
3) Building a double toolchain is more difficult, but possible.  Most of my
notes involved this,  and it is the most complex.  However, most of the
complexity comes from building libraries twice.  I still had work to do on
this, but lfs did build, and X (cvs version so I had support for my card,
but worked too) built without errors.  The main part of this is
patching the packages to use lib64 in the libdir instead of lib.  Two
packages do have trouble, one is gettext, and in shadow, login needs to be
staticly built and installed, otherwise it segfaults.  I did use a 2.6
kernel on the latest system like this because of the hardware support, and I
wanted to build an NPTL system in the future.  There is also a new ch5
package on this setup, file needs to be installed so that the linker knows
which libraries to use when linking.

There is a web page that someone put up about building 64bit from a 32bit
host, but I don't know the URL.  It is in the lfs-support archives
somewhere, that's how I found it.

Hope to have more soon


More information about the lfs-dev mailing list