LFS 5.0 on AMD64 (x86-64)

Rainer Peter Feller rainer at maren.desy.de
Thu Jan 22 07:58:27 PST 2004


On Sun, 4 Jan 2004, Eric Johnson wrote:

> I have built a system based on LFS 5.0 on my Opteron box and thought I would
> share my experiences here, since the topic is raised here sometimes.
>
> My goal was to start with a recent, 32-bit only GNU/Linux system (I used
> Slackware 9.1) and build a basic GNU/Linux system with as much as possible built
>    for AMD64, but with the ability to build and run 32-bit binaries as well.
> Some notes on how I have done this are available at
> http://home.ix.netcom.com/~ejohns/glfs-amd64/index.html
>
> The main differences between my build and LFS 5.0:
>
> *  Since I was starting from 32-bit only system, I had to first build an AMD64
> cross-compiling toolchain.  Then, to run AMD64 binaries, I had to build and
> install a statically-linked AMD64 Linux kernel.  Both of these were installed in
> the host system before starting the LFS build.
>
> *  For 32-bit compatibility, I needed a 32-bit glibc in addition to the AMD64
> one.  After completing chapter 6 (omitting grub), I build an i686
> cross-compiler, and built the 32-bit glibc using it.
>
> *  After building the 32-bit glibc, I built gcc again with multilib enabled, so
> that the same build of gcc can produce both 32-bit and 64-bit AMD64 binaries.
>
> *  Neither grub nor lilo would build natively for AMD64, so I built grub after
> building the multilib-enabled gcc.
>
> I think the way I built the 32-bit glibc was not satisfactory; glibc-2.3.2 did
> not cross compile easily so I used glibc-2.3.1.  It would probably be better to
> build a 32-bit system to create the 32-bit glibc libraries, and copy them into
> the AMD64 system.
>
> Everything in LFS 5.0, except grub, compiled natively for AMD64.  However,
> shadow had severe problems until I patched it (the patch is available at
> http://home.ix.netcom.com/~ejohns/glfs-amd64/patches/shadow-4.0.3-amd64-types.patch).
>   I have done very little with this system beyond the initial build; I would
> expect there are going to be problems with some of the other applications.
> AMD64 is a fairly new platform; anyone who tries to build their own system
> should probably expect to have to fix problems and seek out patches.

while trying to use the toolchain I run into this :
../../gcc-3.3.2/gcc/unwind-dw2.c: In function `uw_frame_state_for':
../../gcc-3.3.2/gcc/unwind-dw2.c:942: error: structure has no member named
`esp'
../../gcc-3.3.2/gcc/unwind-dw2.c:942: error: structure has no member named
`eax'
../../gcc-3.3.2/gcc/unwind-dw2.c:942: error: structure has no member named
`ebx'
../../gcc-3.3.2/gcc/unwind-dw2.c:942: error: structure has no member named
`ecx'
../../gcc-3.3.2/gcc/unwind-dw2.c:942: error: structure has no member named
`edx'
../../gcc-3.3.2/gcc/unwind-dw2.c:942: error: structure has no member named
`esi'
../../gcc-3.3.2/gcc/unwind-dw2.c:942: error: structure has no member named
`edi'
../../gcc-3.3.2/gcc/unwind-dw2.c:942: error: structure has no member named
`ebp'
../../gcc-3.3.2/gcc/unwind-dw2.c:942: error: structure has no member named
`eip'

what to do?

  H
CUH Rainer Peter Feller
  H




More information about the lfs-support mailing list