Error at 5.8 Adjusting the Toolchain (Last stable version of the book)

pieter blomme pieter.blomme at gmail.com
Thu Nov 5 12:28:40 PST 2009


Hi,

I tried creating a Linux from Scratch using the latest stable version of the
online LFS-book. My host system is an Ubuntu 9.10 Karmic Koala.

So I arrived at chapter 5.8, adjusting the toolchain and all went ok until
there.  Some minor errors here and there, but nothing lethal.  I completely
followed the book up til now.
Creating the symbolic link seemed to go okay aswell:

lfs at Pluto:/mnt/lfs/sources$ SPECS=`dirname $($LFS_TGT-gcc
-print-libgcc-file-name)`/specs

lfs at Pluto:/mnt/lfs/sources$ $LFS_TGT-gcc -dumpspecs | sed
\
>   -e 's@/lib\(64\)\?/ld@/tools&@g'
\
>   -e "/^\*cpp:$/{n;s,$, -isystem /tools/include,}" >
$SPECS
lfs at Pluto:/mnt/lfs/sources$ echo "New specs file is:
$SPECS"
New specs file is:
/mnt/lfs/tools/bin/../lib/gcc/i686-lfs-linux-gnu/4.4.1/specs
lfs at Pluto:/mnt/lfs/sources$ unset SPECS

I check the symbolic link, it seemed to have been altered correctly.

Then I tried the testing, which failed:
lfs at Pluto:/mnt/lfs/sources$ echo 'main(){}' >
dummy.c
lfs at Pluto:/mnt/lfs/sources$ $LFS_TGT-gcc -B/tools/lib
dummy.c
/mnt/lfs/tools/bin/../lib/gcc/i686-lfs-linux-gnu/4.4.1/../../../../i686-lfs-linux-gnu/bin/ld:
crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit
status
lfs at Pluto:/mnt/lfs/sources$ readelf -l a.out | grep ':
/tools'
readelf: Error: 'a.out': No such file

I tried to continue despite the errors, to see how grave they were.
Binutils could not make, as the book had suggested:
lfs at Pluto:/mnt/lfs/sources/binutils-build$ CC="$LFS_TGT-gcc -B/tools/lib/" \
>    AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib \
>    ../binutils-2.19.1/configure --prefix=/tools \
>    --disable-nls --with-lib-path=/tools/lib
checking build system type... i686-pc-linux-gnulibc1
checking host system type... i686-pc-linux-gnulibc1
checking target system type... i686-pc-linux-gnulibc1
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... i686-lfs-linux-gnu-gcc -B/tools/lib/
checking for C compiler default output file name... configure: error: in
`/mnt/lfs/sources/binutils-build':
configure: error: C compiler cannot create executables
See `config.log' for more details.

Checking the config.log didn't teach me a lot of new things.  But the error
came before installing Binutils in second pass allready.  Judging by the
error, I suppose it has to do with the C-compiler, so here's the Glibc make
and make install output from the shell:

lfs at Pluto:/mnt/lfs/sources/glibc-build$
make

(I omitted a part over here that didn't contain errors)

/bin/sh scripts/move-if-change
/mnt/lfs/sources/glibc-build/bits/stdio_lim.h.new
/mnt/lfs/sources/glibc-build/bits/stdio_lim.h

rm -f /mnt/lfs/sources/glibc-build/bits/stdio_lim.hT
/mnt/lfs/sources/glibc-build/bits/stdio_lim.dT
/mnt/lfs/sources/glibc-build/bits/stdio_lim.dt
touch /mnt/lfs/sources/glibc-build/bits/stdio_lim.st

mawk -f scripts/gen-sorted.awk
\
               -v subdirs='csu assert ctype locale intl catgets math setjmp
signal stdlib stdio-common libio malloc string wcsmbs time dirent grp pwd
posix io termios resource misc socket sysvipc gmon gnulib iconv iconvdata
wctype manual shadow gshadow po argp crypt nss localedata timezone rt
conform debug  dlfcn elf'
\

               -v srcpfx=''
\
               nptl/sysdeps/pthread/Subdirs sysdeps/unix/inet/Subdirs
sysdeps/unix/Subdirs assert/Depend intl/Depend catgets/Depend stdlib/Depend
stdio-common/Depend libio/Depend malloc/Depend string/Depend wcsmbs/Depend
time/Depend posix/Depend iconvdata/Depend nss/Depend localedata/Depend
rt/Depend debug/Depend >
/mnt/lfs/sources/glibc-build/sysd-sorted-tmp

mawk: scripts/gen-sorted.awk: line 19: regular expression compile failed
(bad class -- [], [^] or
[)
/[^

mawk: scripts/gen-sorted.awk: line 19: syntax error at or near
]
mawk: scripts/gen-sorted.awk: line 19: runaway regular expression /, "",
subd
...

make[1]: Leaving directory
`/mnt/lfs/sources/glibc-2.10.1'
make[1]: Entering directory
`/mnt/lfs/sources/glibc-2.10.1'
mawk -f scripts/gen-sorted.awk
\
               -v subdirs='csu assert ctype locale intl catgets math setjmp
signal stdlib stdio-common libio malloc string wcsmbs time dirent grp pwd
posix io termios resource misc socket sysvipc gmon gnulib iconv iconvdata
wctype manual shadow gshadow po argp crypt nss localedata timezone rt
conform debug  dlfcn elf'
\

               -v srcpfx=''
\
               nptl/sysdeps/pthread/Subdirs sysdeps/unix/inet/Subdirs
sysdeps/unix/Subdirs assert/Depend intl/Depend catgets/Depend stdlib/Depend
stdio-common/Depend libio/Depend malloc/Depend string/Depend wcsmbs/Depend
time/Depend posix/Depend iconvdata/Depend nss/Depend localedata/Depend
rt/Depend debug/Depend >
/mnt/lfs/sources/glibc-build/sysd-sorted-tmp

mawk: scripts/gen-sorted.awk: line 19: regular expression compile failed
(bad class -- [], [^] or
[)
/[^

mawk: scripts/gen-sorted.awk: line 19: syntax error at or near
]
mawk: scripts/gen-sorted.awk: line 19: runaway regular expression /, "",
subd
...

rm -f /mnt/lfs/sources/glibc-build/stamp.o; >
/mnt/lfs/sources/glibc-build/stamp.o

rm -f /mnt/lfs/sources/glibc-build/stamp.os; >
/mnt/lfs/sources/glibc-build/stamp.os

rm -f /mnt/lfs/sources/glibc-build/stamp.oS; >
/mnt/lfs/sources/glibc-build/stamp.oS

cd /mnt/lfs/sources/glibc-build &&
/mnt/lfs/tools/bin/../lib/gcc/i686-lfs-linux-gnu/4.4.1/../../../../i686-lfs-linux-gnu/bin/ar
cruv libc.a `cat stamp.o`
:
/mnt/lfs/sources/glibc-build/libc.a

cd /mnt/lfs/sources/glibc-build &&
/mnt/lfs/tools/bin/../lib/gcc/i686-lfs-linux-gnu/4.4.1/../../../../i686-lfs-linux-gnu/bin/ar
cruv libc_pic.a `cat stamp.os`
:
/mnt/lfs/sources/glibc-build/libc_pic.a

cd /mnt/lfs/sources/glibc-build &&
/mnt/lfs/tools/bin/../lib/gcc/i686-lfs-linux-gnu/4.4.1/../../../../i686-lfs-linux-gnu/bin/ar
cruv libc_nonshared.a `cat
stamp.oS`

:
/mnt/lfs/sources/glibc-build/libc_nonshared.a

make[1]: *** No rule to make target
`/mnt/lfs/sources/glibc-build/Versions.all', needed by
`/mnt/lfs/sources/glibc-build/abi-versions.h'.  Stop.
make[1]: Leaving directory
`/mnt/lfs/sources/glibc-2.10.1'
make: *** [all] Error
2
lfs at Pluto:/mnt/lfs/sources/glibc-build$ make
install
LANGUAGE=C LC_ALL=C; export LANGUAGE LC_ALL;
\
        make -r PARALLELMFLAGS="" CVSOPTS="" -C ../glibc-2.10.1 objdir=`pwd`
install

make[1]: Entering directory
`/mnt/lfs/sources/glibc-2.10.1'
mawk -f scripts/gen-sorted.awk
\
               -v subdirs='csu assert ctype locale intl catgets math setjmp
signal stdlib stdio-common libio malloc string wcsmbs time dirent grp pwd
posix io termios resource misc socket sysvipc gmon gnulib iconv iconvdata
wctype manual shadow gshadow po argp crypt nss localedata timezone rt
conform debug  dlfcn elf'
\

               -v srcpfx=''
\
               nptl/sysdeps/pthread/Subdirs sysdeps/unix/inet/Subdirs
sysdeps/unix/Subdirs assert/Depend intl/Depend catgets/Depend stdlib/Depend
stdio-common/Depend libio/Depend malloc/Depend string/Depend wcsmbs/Depend
time/Depend posix/Depend iconvdata/Depend nss/Depend localedata/Depend
rt/Depend debug/Depend >
/mnt/lfs/sources/glibc-build/sysd-sorted-tmp

mawk: scripts/gen-sorted.awk: line 19: regular expression compile failed
(bad class -- [], [^] or
[)
/[^

mawk: scripts/gen-sorted.awk: line 19: syntax error at or near
]
mawk: scripts/gen-sorted.awk: line 19: runaway regular expression /, "",
subd
...

make[1]: *** No rule to make target
`/mnt/lfs/sources/glibc-build/Versions.all', needed by
`/mnt/lfs/sources/glibc-build/abi-versions.h'.  Stop.
make[1]: Leaving directory
`/mnt/lfs/sources/glibc-2.10.1'
make: *** [install] Error 2

Not all that familiar with linux, just basic shell scripting, package
installingen and experience with a couple of computer languages.  This is my
first real effort to modify the linux inner-system, so it might very well be
that an error came along that I did not treat the way I should have
treated.

Thanks in advance,
Pieter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20091105/08ee203a/attachment.html>


More information about the lfs-support mailing list