On Nov 14, 2012, at 9:52 AM, lei huang wrote: > chroot "$LFS" /tools/bin/env -i \ > HOME=/root \ > TERM="$TERM" \ > PS1='\u:\w\$ ' \ > PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \ > /tools/bin/bash --login +h > > root:/sources/glibc-build# bash -version > GNU bash, version 4.2.36(1)-release (i686-pc-linux-gnu) > Copyright (C) 2011 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html > > > > This is free software; you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > > > III. Building the LFS System > 6. Installing Basic System Software > 6.9.1. Installation of Glibc > > > ./scripts/mkinstalldirs /sources/glibc-build/linkobj > (cd /sources/glibc-build/linkobj; \ > /tools/lib/gcc/i686-pc-linux-gnu/4.7.1/../../../../i686-pc-linux-gnu/ > bin/ar > x ../libc_pic.a; \ > rm $(/tools/lib/gcc/i686-pc-linux-gnu/4.7.1/../../../../i686-pc- > linux-gnu/bin/ar > t ../sunrpc/librpc_compat_pic.a | sed 's/^compat-//'); \ > /tools/lib/gcc/i686-pc-linux-gnu/4.7.1/../../../../i686-pc-linux-gnu/ > bin/ar > x ../sunrpc/librpc_compat_pic.a; \ > /tools/lib/gcc/i686-pc-linux-gnu/4.7.1/../../../../i686-pc-linux-gnu/ > bin/ar > cr libc_pic.a *.os; \ > rm *.os) > /bin/sh: command substitution: line 3: syntax error near unexpected > token `)' > /bin/sh: command substitution: line 3: > `/tools/lib/gcc/i686-pc-linux-gnu/4.7.1/../../../../i686-pc-linux- > gnu/bin/ar > t ../sunrpc/librpc_compat_pic.a | sed 's/^compat-//')' > make[1]: *** [/sources/glibc-build/linkobj/libc_pic.a] Error 1 > make[1]: Leaving directory `/sources/glibc-2.16.0' > make: *** [all] Error 2 > > test:: > root:/sources/glibc-build# DD=$(uname -m) > bash: command substitution: line 31: syntax error near unexpected > token `)' > bash: command substitution: line 31: `uname -m)'
Did you use dash as your default shell when building bash in chapter 5? If your host /bin/sh wasn't linked to bash (as stated in the host system requirements) your bash build will be broken as above. If I recall correctly. It may be the problem or not. Not a clear answer in this thread. http://archives.linuxfromscratch.org/mail-archives/lfs-support/2011-December/041666.html Sincerely, William Harrington Sincerely, William Harrington -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page