Problem with "fixing" ld in phase 2

Kevin White kwhite at
Tue Apr 20 17:47:36 PDT 2004

I'm having a problem with fixing ld in phase 2, this command in 
"Re-adjusting the toolchain":

make -C ld INSTALL=/tools/bin/install install

Now, when I actually MADE that binutils, in Chapter 5, the full path to 
the source was here:

srcdir = /lfs/scratch/binutils-2.14/ld
top_srcdir = /lfs/scratch/binutils-2.14/ld

But now that I'm chrooted into lfs, that dir doesn't exist any more, so 
this make fails:

root:/scratch/binutils-build# make -C ld 
INSTALL=${STAGE1_DIR}/bin/install install
make: Entering directory `/scratch/binutils-build/ld'
cd /lfs/scratch/binutils-2.14/ld && automake --cygnus Makefile
/bin/sh: line 1: cd: /lfs/scratch/binutils-2.14/ld: No such file or 
make: *** [/lfs/scratch/binutils-2.14/ld/] Error 1
make: Leaving directory `/scratch/binutils-build/ld'

It appears to be doing this:

all: all-redirect
.SUFFIXES: .S .c .dvi .info .l .lo .o .obj .ps .s .texi .texinfo .txi .y
$(srcdir)/ # $(top_srcdir)/ 
         cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile

and it can't do that cd, so the make install fails.

Of course, I'm not 100% sure why it is trying to do that line on the 
install target, but it seems to be.

If I do this in the chroot:

ln -s / /lfs

then the make install works.

Basically, using the build-binutils from chapter 5 in chapter 6 leaves 
an embedded path to the source which makes this install fail.

Has anyone else seen this?

I'm not sure if I should try to do that ln so that this works, or if I 
should just deal with it not working (as the notes mention that it isn't 
100% necessary).


More information about the lfs-support mailing list