Monday 3 June 2013

Installing UIM on Linux Mint 15 Cinnamon ("Olivia") for Japanese IME

In Linux Mint 15 - 64 bit with Cinnamon, the Ibus Input Method Editor does not work.
When you activate the IBus by clicking:

Menu -> Preferences -> Keyboard Input Methods

the following Alert Box pops up.
Clicking the "Yes" Button does as the same Alert Box will continue to pop up.



Activating the IBus Daemon from the terminal yields:



While it's nice to have IBus working for Japanese input, it is not possible in this instance and being Linux we have to find an alternative solution and that solution is to install UIM through the following steps.

1. Install uim and uim-anthy by searching through Software Manager, Synaptic Package Manager or through the terminal. These instructions uses the terminal for installation.
At the terminal type:

sudo apt-get install uim uim-anthy


2. Add language support

  • Menu -> Preferences -> Language Support
  • Click "Install/Remove Languages" Button
  • Select Japanese
  • Click "Apply Changes" Button
  • Select "uim" at the "Keyboard input method system:" Drop down box



3.  Setting up UIM

  • Menu -> Preferences -> Input Method
  • If there are more than one Input Method option, select the uim one with the blue icon.
  • Change settings to your liking then click "OK" Button.




4.  Set Keyboard Input Method

  • Menu -> Preferences -> Input Method
  • If there are more than one Input Method option, select the one with the keyboard icon.
  • Click Yes, Yes and OK and it will generate the .xinputrc file in your Home folder
5. Logout and Log back in or reboot the computer if necessary

6. Test with Gedit, Mozilla or Chrome and LibreOffice Writer. From the above settings, press space to switch between direct input method or Anthy (UTF-8). 

Friday 21 December 2012

Summer 2012 Project 3: Linux From Scratch Part 2

(Project Abandoned due to unexpected result and the goal was to install a low spec Linux OS for pc that overheats too much. Will try Archbang 32bit)

Summer 2012 Project 3: Linux From Scratch Part2

Reference: http://www.linuxfromscratch.org/lfs/

At the end of Part 1 the host computer was put into hibernation. Perhaps, should have done a sudo update-grub before that as upon restarting the computer the following error came up:
 
error: file '/grub/i386-pc/normal.mod' not found
 
Therefore it wasn't to boot into the host computer. This was fixed by re-installing a linux distro with grub2 on sda6 which contains the Mint Debian Edition. At the end of the install, there will be an os-probe follow by an update-grub command. All the work done in sda7 & sda8 where mint 12 KDE  and LFS respectively becomes relatively unaffected.

The following log entries follow on from the Summer 2012 Project 3: Linux From Scratch Part 1 posts.


Set LFS environment variable and mount the partition
kongu@kongu-Aspire-5820T ~ $ echo $LFS

kongu@kongu-Aspire-5820T ~ $ export LFS=/mnt/lfs
kongu@kongu-Aspire-5820T ~ $ echo $LFS
/mnt/lfs
kongu@kongu-Aspire-5820T ~ $ sudo mount -v -t ext4 /dev/sda8 $LFS 
[sudo] password for kongu: 
/dev/sda8 on /mnt/lfs type ext4 (rw)
kongu@kongu-Aspire-5820T ~ $ su -l lfs
Password: 
lfs@kongu-Aspire-5820T ~ $ cd /mnt/lfs
lfs@kongu-Aspire-5820T /mnt/lfs $ ls -al
total 32
drwxr-xr-x 5 root root  4096 Nov 30 11:39 .
drwxr-xr-x 5 root root  4096 Nov 30 10:16 ..
drwx------ 2 root root 16384 Nov 30 10:11 lost+found
drwxrwxrwt 2 lfs  root  4096 Nov 30 17:17 sources
drwxr-xr-x 8 lfs  root  4096 Nov 30 17:10 tools
lfs@kongu-Aspire-5820T /mnt/lfs $ cd sources
lfs@kongu-Aspire-5820T /mnt/lfs/sources $ 

Installation of Linux API Headers
lfs@kongu-Aspire-5820T /mnt/lfs/sources $ tar -vxf linux-3.5.2.tar.xz
lfs@kongu-Aspire-5820T /mnt/lfs/sources $ cd linux-3.5.2/
lfs@kongu-Aspire-5820T /mnt/lfs/sources/linux-3.5.2 $ make mrproper

 

Test and extract the user-visible kernel headers from the source. They are placed in an intermediate local directory and copied into the needed location because the extraction process removes any existing files in the target directory
lfs@kongu-Aspire-5820T /mnt/lfs/sources/linux-3.5.2 $ make headers_check
  CHK     include/linux/version.h
  UPD     include/linux/version.h
  HOSTCC  scripts/basic/fixdep
  SYSHDR  arch/x86/syscalls/../include/generated/asm/unistd_32.h
  SYSHDR  arch/x86/syscalls/../include/generated/asm/unistd_64.h
  SYSHDR  arch/x86/syscalls/../include/generated/asm/unistd_x32.h
  SYSTBL  arch/x86/syscalls/../include/generated/asm/syscalls_32.h
  HOSTCC  arch/x86/tools/relocs
  HOSTCC  scripts/unifdef
  INSTALL include/asm-generic (35 files)
  INSTALL include/drm (15 files)
  INSTALL include/linux/byteorder (2 files)
  INSTALL include/linux/caif (2 files)
  INSTALL include/linux/can (5 files)
  INSTALL include/linux/dvb (8 files)
  INSTALL include/linux/hdlc (1 file)
  INSTALL include/linux/hsi (1 file)
  INSTALL include/linux/isdn (1 file)
  INSTALL include/linux/mmc (1 file)
  INSTALL include/linux/netfilter/ipset (4 files)
  INSTALL include/linux/netfilter (75 files)
  INSTALL include/linux/netfilter_arp (2 files)
  INSTALL include/linux/netfilter_bridge (18 files)
  INSTALL include/linux/netfilter_ipv4 (11 files)
  INSTALL include/linux/netfilter_ipv6 (11 files)
  INSTALL include/linux/nfsd (5 files)
  INSTALL include/linux/raid (2 files)
  INSTALL include/linux/spi (1 file)
  INSTALL include/linux/sunrpc (1 file)
  INSTALL include/linux/tc_act (7 files)
  INSTALL include/linux/tc_ematch (4 files)
  INSTALL include/linux/usb (10 files)
  INSTALL include/linux/wimax (1 file)
  INSTALL include/linux (377 files)
  INSTALL include/mtd (5 files)
  INSTALL include/rdma (6 files)
  INSTALL include/scsi/fc (4 files)
  INSTALL include/scsi (3 files)
  INSTALL include/sound (10 files)
  INSTALL include/video (3 files)
  INSTALL include/xen (2 files)
  INSTALL include (0 file)
  INSTALL include/asm (58 files)
  CHECK   include/asm-generic (35 files)
  CHECK   include/drm (15 files)
  CHECK   include/linux/byteorder (2 files)
  CHECK   include/linux/caif (2 files)
  CHECK   include/linux/can (5 files)
  CHECK   include/linux/dvb (8 files)
  CHECK   include/linux/hdlc (1 files)
  CHECK   include/linux/hsi (1 files)
  CHECK   include/linux/isdn (1 files)
  CHECK   include/linux/mmc (1 files)
  CHECK   include/linux/netfilter/ipset (4 files)
  CHECK   include/linux/netfilter (75 files)
  CHECK   include/linux/netfilter_arp (2 files)
  CHECK   include/linux/netfilter_bridge (18 files)
  CHECK   include/linux/netfilter_ipv4 (11 files)
  CHECK   include/linux/netfilter_ipv6 (11 files)
  CHECK   include/linux/nfsd (5 files)
  CHECK   include/linux/raid (2 files)
  CHECK   include/linux/spi (1 files)
  CHECK   include/linux/sunrpc (1 files)
  CHECK   include/linux/tc_act (7 files)
  CHECK   include/linux/tc_ematch (4 files)
  CHECK   include/linux/usb (10 files)
  CHECK   include/linux/wimax (1 files)
  CHECK   include/linux (377 files)
/mnt/lfs/sources/linux-3.5.2/usr/include/linux/kexec.h:49: userspace cannot reference function or variable defined in the kernel
/mnt/lfs/sources/linux-3.5.2/usr/include/linux/soundcard.h:1054: userspace cannot reference function or variable defined in the kernel
  CHECK   include/mtd (5 files)
  CHECK   include/rdma (6 files)
  CHECK   include/scsi/fc (4 files)
  CHECK   include/scsi (3 files)
  CHECK   include/sound (10 files)
  CHECK   include/video (3 files)
  CHECK   include/xen (2 files)
  CHECK   include (0 files)
  CHECK   include/asm (58 files)
 


lfs@kongu-Aspire-5820T /mnt/lfs/sources/linux-3.5.2 $ make INSTALL_HDR_PATH=dest headers_install
  CHK     include/linux/version.h
make[1]: Nothing to be done for `all'.
make[1]: Nothing to be done for `relocs'.
  INSTALL include/asm-generic (35 files)
  INSTALL include/drm (15 files)
  INSTALL include/linux/byteorder (2 files)
  INSTALL include/linux/caif (2 files)
  INSTALL include/linux/can (5 files)
  INSTALL include/linux/dvb (8 files)
  INSTALL include/linux/hdlc (1 file)
  INSTALL include/linux/hsi (1 file)
  INSTALL include/linux/isdn (1 file)
  INSTALL include/linux/mmc (1 file)
  INSTALL include/linux/netfilter/ipset (4 files)
  INSTALL include/linux/netfilter (75 files)
  INSTALL include/linux/netfilter_arp (2 files)
  INSTALL include/linux/netfilter_bridge (18 files)
  INSTALL include/linux/netfilter_ipv4 (11 files)
  INSTALL include/linux/netfilter_ipv6 (11 files)
  INSTALL include/linux/nfsd (5 files)
  INSTALL include/linux/raid (2 files)
  INSTALL include/linux/spi (1 file)
  INSTALL include/linux/sunrpc (1 file)
  INSTALL include/linux/tc_act (7 files)
  INSTALL include/linux/tc_ematch (4 files)
  INSTALL include/linux/usb (10 files)
  INSTALL include/linux/wimax (1 file)
  INSTALL include/linux (377 files)
  INSTALL include/mtd (5 files)
  INSTALL include/rdma (6 files)
  INSTALL include/scsi/fc (4 files)
  INSTALL include/scsi (3 files)
  INSTALL include/sound (10 files)
  INSTALL include/video (3 files)
  INSTALL include/xen (2 files)
  INSTALL include (0 file)
  INSTALL include/asm (58 files)

lfs@kongu-Aspire-5820T /mnt/lfs/sources/linux-3.5.2 $ cp -rv dest/include/* /tools/include
Install Glibc

lfs@kongu-Aspire-5820T /mnt/lfs/sources/glibc-2.16.0 $ tar -vxf glibc-2.16.0.tar.xz
lfs@kongu-Aspire-5820T /mnt/lfs/sources $ cd glibc-2.16.0/
lfs@kongu-Aspire-5820T /mnt/lfs/sources/glibc-2.16.0 $ patch -Np1 -i ../glibc-2.16.0-res_query_fix-1.patch

patching file resolv/res_query.c
lfs@kongu-Aspire-5820T /mnt/lfs/sources/glibc-2.16.0 $ if [ ! -r /usr/include/rpc/types.h ]; then su -c 'makedir -p /usr/include/rpc'; su -c 'cp -v sunrpc/rpc/*.h /usr/include/rpc'; fi
lfs@kongu-Aspire-5820T /mnt/lfs/sources/glibc-2.16.0 $ sed -i 's/ -lgcc_s//' Makeconfig
lfs-kongu-Aspire-5820T /mnt/lfs/sources/glibc-2.16.0 $ mkdir -v ../glibc-build
mkdir: created directory `../glibc-build' 
 

lfs@kongu-Aspire-5820T /mnt/lfs/sources/glibc-2.16.0 $ cd ../glibc-build
lfs@kongu-Aspire-5820T /mnt/lfs/sources/glibc-build $ ../glibc-2.16.0/configure --prefix=/tools --host=$LFS_TGT --build=$(../glibc-2.16.0/scripts/config.guess) --disable-profile --enable-add-ons --enable-kernel=2.6.25 --with-headers=/tools/include lib_cv_forced_unwind=yes lib_cv_ctors_header=yes ../glibc-2.16.0/configure --prefix=/tools --host=$LFS_TGT --build=$(../glibc-2.16.0/scripts/config.guess) --disable-profile --enable-add-ons --enable-kernel=2.6.25 --with-headers=/tools/include libc_cv_forced_unwind=yes libc_cv_ctors_header=yes libc_cv_c_cleanup=yes

lfs@kongu-Aspire-5820T /mnt/lfs/sources/glibc-build $ make
lfs@kongu-Aspire-5820T /mnt/lfs/sources/glibc-build $ make install

Encountered Errors at the end of Section 5.7. Couldn't work out the cause so decided to start over at Section 5.4 Binutils-2.22 - Pass 1.

5.4 Installing Binutils-2.22 - Pass 1
lfs@kongu-Aspire-5820T /mnt/lfs/sources/binutils-build $ time { ../binutils-2.22/configure --prefix=/tools --with-sysroot=$LFS --with-lib-path=/tools/lib --target=$LFS_TGT --disable-nls --disable-werror && make && make install; } 

...
make[3]: Entering directory `/mnt/lfs/sources/binutils-build/libiberty/testsuite'
make[3]: Nothing to be done for `install'.
make[3]: Leaving directory `/mnt/lfs/sources/binutils-build/libiberty/testsuite'
make[2]: Leaving directory `/mnt/lfs/sources/binutils-build/libiberty'
make[1]: Nothing to be done for `install-target'.
make[1]: Leaving directory `/mnt/lfs/sources/binutils-build'

real    2m29.034s
user    1m29.770s
sys     0m18.265s

 

lfs@kongu-Aspire-5820T /mnt/lfs/sources/binutils-build $ cd ..                                         
lfs@kongu-Aspire-5820T /mnt/lfs/sources $ rm -r binutils-2.22
lfs@kongu-Aspire-5820T /mnt/lfs/sources $ rm -r binutils-build

rm: remove write-protected regular file `binutils-build/bfd/po/BLD-POTFILES'? y
rm: remove write-protected regular file `binutils-build/bfd/po/SRC-POTFILES'? y

 

5.5 Installing GCC-4.7.1 - Pass 1
lfs@kongu-Aspire-5820T /mnt/lfs/sources $ tar -vxf gcc-4.7.1.tar.bz2
lfs@kongu-Aspire-5820T /mnt/lfs/sources $ cd gcc-4.7.1/
lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-4.7.1 $ tar -Jxf ../mpfr-3.1.1.tar.xz
lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-4.7.1 $ mv -v mpfr-3.1.1 mpfr

`mpfr-3.1.1' -> `mpfr'
lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-4.7.1 $ tar -Jxf ../gmp-5.0.5.tar.xz 
lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-4.7.1 $ mv -v gmp-5.0.5 gmp 

`gmp-5.0.5' -> `gmp'
lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-4.7.1 $ tar -zxf ../mpc-1.0.tar.gz
lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-4.7.1 $ mv -v mpc-1.0 mpc 

`mpc-1.0' -> `mpc'

lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-4.7.1 $ for file in \
> $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h)
> do
> cp -uv $file{,.orig}
> sed -e 's@/lib\(64\)\?\(32\)\?/1d@/tools&@g' \
>     -e 's@/usr@/tools@g' $file.orig > $file
> echo '
> #undef STANDARD_STARTFILE_PREFIX_1
> #undef STANDARD_STARTFILE_PREFIX_2
> #define STANDARD_STARTFILE_PREFIX_1 "/tools/lib/"
> #define STANDARD_STARTFILE_PREFIX_2 ""' >> $file
>  touch $file.orig
> done

`gcc/config/cris/linux.h' -> `gcc/config/cris/linux.h.orig'
`gcc/config/tilegx/linux.h' -> `gcc/config/tilegx/linux.h.orig'
`gcc/config/sparc/linux.h' -> `gcc/config/sparc/linux.h.orig'
`gcc/config/sparc/linux64.h' -> `gcc/config/sparc/linux64.h.orig'
`gcc/config/sparc/sysv4.h' -> `gcc/config/sparc/sysv4.h.orig'
`gcc/config/i386/linux.h' -> `gcc/config/i386/linux.h.orig'
`gcc/config/i386/linux64.h' -> `gcc/config/i386/linux64.h.orig'
`gcc/config/i386/sysv4.h' -> `gcc/config/i386/sysv4.h.orig'
`gcc/config/frv/linux.h' -> `gcc/config/frv/linux.h.orig'
`gcc/config/rs6000/linux.h' -> `gcc/config/rs6000/linux.h.orig'
`gcc/config/rs6000/linux64.h' -> `gcc/config/rs6000/linux64.h.orig'
`gcc/config/rs6000/sysv4.h' -> `gcc/config/rs6000/sysv4.h.orig'
`gcc/config/alpha/linux.h' -> `gcc/config/alpha/linux.h.orig'
`gcc/config/vax/linux.h' -> `gcc/config/vax/linux.h.orig'
`gcc/config/microblaze/linux.h' -> `gcc/config/microblaze/linux.h.orig'
`gcc/config/m68k/linux.h' -> `gcc/config/m68k/linux.h.orig'
`gcc/config/mips/linux.h' -> `gcc/config/mips/linux.h.orig'
`gcc/config/mips/linux64.h' -> `gcc/config/mips/linux64.h.orig'
`gcc/config/linux.h' -> `gcc/config/linux.h.orig'
`gcc/config/mn10300/linux.h' -> `gcc/config/mn10300/linux.h.orig'
`gcc/config/m32r/linux.h' -> `gcc/config/m32r/linux.h.orig'
`gcc/config/sh/linux.h' -> `gcc/config/sh/linux.h.orig'
`gcc/config/ia64/linux.h' -> `gcc/config/ia64/linux.h.orig'
`gcc/config/ia64/sysv4.h' -> `gcc/config/ia64/sysv4.h.orig'
`gcc/config/bfin/linux.h' -> `gcc/config/bfin/linux.h.orig'
`gcc/config/s390/linux.h' -> `gcc/config/s390/linux.h.orig'
`gcc/config/xtensa/linux.h' -> `gcc/config/xtensa/linux.h.orig'
`gcc/config/tilepro/linux.h' -> `gcc/config/tilepro/linux.h.orig'



lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-4.7.1 $ sed -i '/k prot/agcc_cv_libc_provides_ssp=yes' gcc/configure
lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-4.7.1 $ mkdir -v ../gcc-build
mkdir: created directory `../gcc-build'
lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-4.7.1 $ cd ../gcc-build
lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-build $ ../gcc-4.7.1/configure --target=$LFS_TGT --prefix=/tools --with-sysroot=$LFS --with-newlib --without-headers --with-local-prefix=/tools --with-native-system-header-dir=/tools/include --disable-nls --disable-shared --disable-multilib --disable-decimal-float --disable-threads --disable-libmudflap --disable-libssp --disable-libgomp --disable-libquadmath --enable-languages=c --with-mpfr-include=$(pwd)/../gcc-4.7.1/mpfr/src --with-mpfr-lib=$(pwd)/mpfr/src/.libs


lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-build $ make
...

make[3]: Leaving directory `/mnt/lfs/sources/gcc-build/x86_64-lfs-linux-gnu/libgcc'
make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/x86_64-lfs-linux-gnu/libgcc'
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'

lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-build $ make install
...

make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/x86_64-lfs-linux-gnu/libgcc'
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'

lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-build $ ln -vs libgcc.a `$LFS_TGT-gcc -print-libgcc-file-name | sed 's/libgcc/&_eh/'`
ln: creating symbolic link `/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.7.1/libgcc_eh.a': File exists


lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-build $ cd ..
lfs@kongu-Aspire-5820T /mnt/lfs/sources $ rm -r gcc-4.7.1
lfs@kongu-Aspire-5820T /mnt/lfs/sources $ rm -r gcc-build/


5.6 Installing Linux 3.5.2 API Headers
lfs@kongu-Aspire-5820T /mnt/lfs/sources $ tar -xvf linux-3.5.2.tar.xz
lfs@kongu-Aspire-5820T /mnt/lfs/sources $ cd linux-3.5.2/
lfs@kongu-Aspire-5820T /mnt/lfs/sources/linux-3.5.2 $ make mrproper
lfs@kongu-Aspire-5820T /mnt/lfs/sources/linux-3.5.2 $ make headers_check

  CHK     include/linux/version.h
  UPD     include/linux/version.h
  HOSTCC  scripts/basic/fixdep
  SYSHDR  arch/x86/syscalls/../include/generated/asm/unistd_32.h
  SYSHDR  arch/x86/syscalls/../include/generated/asm/unistd_64.h
  SYSHDR  arch/x86/syscalls/../include/generated/asm/unistd_x32.h
  SYSTBL  arch/x86/syscalls/../include/generated/asm/syscalls_32.h
  HOSTCC  arch/x86/tools/relocs
  HOSTCC  scripts/unifdef
  INSTALL include/asm-generic (35 files)
  INSTALL include/drm (15 files)
  INSTALL include/linux/byteorder (2 files)
  INSTALL include/linux/caif (2 files)
  INSTALL include/linux/can (5 files)
  INSTALL include/linux/dvb (8 files)
  INSTALL include/linux/hdlc (1 file)
  INSTALL include/linux/hsi (1 file)
  INSTALL include/linux/isdn (1 file)
  INSTALL include/linux/mmc (1 file)
  INSTALL include/linux/netfilter/ipset (4 files)
  INSTALL include/linux/netfilter (75 files)
  INSTALL include/linux/netfilter_arp (2 files)
  INSTALL include/linux/netfilter_bridge (18 files)
  INSTALL include/linux/netfilter_ipv4 (11 files)
  INSTALL include/linux/netfilter_ipv6 (11 files)
  INSTALL include/linux/nfsd (5 files)
  INSTALL include/linux/raid (2 files)
  INSTALL include/linux/spi (1 file)
  INSTALL include/linux/sunrpc (1 file)
  INSTALL include/linux/tc_act (7 files)
  INSTALL include/linux/tc_ematch (4 files)
  INSTALL include/linux/usb (10 files)
  INSTALL include/linux/wimax (1 file)
  INSTALL include/linux (377 files)
  INSTALL include/mtd (5 files)
  INSTALL include/rdma (6 files)
  INSTALL include/scsi/fc (4 files)
  INSTALL include/scsi (3 files)
  INSTALL include/sound (10 files)
  INSTALL include/video (3 files)
  INSTALL include/xen (2 files)
  INSTALL include (0 file)
  INSTALL include/asm (58 files)
  CHECK   include/asm-generic (35 files)
  CHECK   include/drm (15 files)
  CHECK   include/linux/byteorder (2 files)
  CHECK   include/linux/caif (2 files)
  CHECK   include/linux/can (5 files)
  CHECK   include/linux/dvb (8 files)
  CHECK   include/linux/hdlc (1 files)
  CHECK   include/linux/hsi (1 files)
  CHECK   include/linux/isdn (1 files)
  CHECK   include/linux/mmc (1 files)
  CHECK   include/linux/netfilter/ipset (4 files)
  CHECK   include/linux/netfilter (75 files)
  CHECK   include/linux/netfilter_arp (2 files)
  CHECK   include/linux/netfilter_bridge (18 files)
  CHECK   include/linux/netfilter_ipv4 (11 files)
  CHECK   include/linux/netfilter_ipv6 (11 files)
  CHECK   include/linux/nfsd (5 files)
  CHECK   include/linux/raid (2 files)
  CHECK   include/linux/spi (1 files)
  CHECK   include/linux/sunrpc (1 files)
  CHECK   include/linux/tc_act (7 files)
  CHECK   include/linux/tc_ematch (4 files)
  CHECK   include/linux/usb (10 files)
  CHECK   include/linux/wimax (1 files)
  CHECK   include/linux (377 files)
/mnt/lfs/sources/linux-3.5.2/usr/include/linux/kexec.h:49: userspace cannot reference function or variable defined in the kernel
/mnt/lfs/sources/linux-3.5.2/usr/include/linux/soundcard.h:1054: userspace cannot reference function or variable defined in the kernel

  CHECK   include/mtd (5 files)
  CHECK   include/rdma (6 files)
  CHECK   include/scsi/fc (4 files)
  CHECK   include/scsi (3 files)
  CHECK   include/sound (10 files)
  CHECK   include/video (3 files)
  CHECK   include/xen (2 files)
  CHECK   include (0 files)
  CHECK   include/asm (58 files)

lfs@kongu-Aspire-5820T /mnt/lfs/sources/linux-3.5.2 $ make INSTALL_HDR_PATH=dest headers_install
  CHK     include/linux/version.h
make[1]: Nothing to be done for `all'.
make[1]: Nothing to be done for `relocs'.
  INSTALL include/asm-generic (35 files)
  INSTALL include/drm (15 files)
  INSTALL include/linux/byteorder (2 files)
  INSTALL include/linux/caif (2 files)
  INSTALL include/linux/can (5 files)
  INSTALL include/linux/dvb (8 files)
  INSTALL include/linux/hdlc (1 file)
  INSTALL include/linux/hsi (1 file)
  INSTALL include/linux/isdn (1 file)
  INSTALL include/linux/mmc (1 file)
  INSTALL include/linux/netfilter/ipset (4 files)
  INSTALL include/linux/netfilter (75 files)
  INSTALL include/linux/netfilter_arp (2 files)
  INSTALL include/linux/netfilter_bridge (18 files)
  INSTALL include/linux/netfilter_ipv4 (11 files)
  INSTALL include/linux/netfilter_ipv6 (11 files)
  INSTALL include/linux/nfsd (5 files)
  INSTALL include/linux/raid (2 files)
  INSTALL include/linux/spi (1 file)
  INSTALL include/linux/sunrpc (1 file)
  INSTALL include/linux/tc_act (7 files)
  INSTALL include/linux/tc_ematch (4 files)
  INSTALL include/linux/usb (10 files)
  INSTALL include/linux/wimax (1 file)
  INSTALL include/linux (377 files)
  INSTALL include/mtd (5 files)
  INSTALL include/rdma (6 files)
  INSTALL include/scsi/fc (4 files)
  INSTALL include/scsi (3 files)
  INSTALL include/sound (10 files)
  INSTALL include/video (3 files)
  INSTALL include/xen (2 files)
  INSTALL include (0 file)
  INSTALL include/asm (58 files)

 lfs@kongu-Aspire-5820T /mnt/lfs/sources/linux-3.5.2 $ cp -rv dest/include/* /tools/include
lfs@kongu-Aspire-5820T /mnt/lfs/sources/linux-3.5.2 $ cd ..
lfs@kongu-Aspire-5820T /mnt/lfs/sources $ rm -r linux-3.5.2

5.7 Installing Glibc-2.16.0

lfs@kongu-Aspire-5820T /mnt/lfs/sources $ tar -xvf glibc-2.16.0.tar.xz
lfs@kongu-Aspire-5820T /mnt/lfs/sources $ cd glibc-2.16.0/
lfs@kongu-Aspire-5820T /mnt/lfs/sources/glibc-2.16.0 $ if [ ! -r /usr/include/rpc/types.h ]; then
> su -c 'mkdir -p /usr/include/rpc'
> su -c 'cp -v sunrpc/rpc/*.h /usr/include/rpc'
> fi

lfs@kongu-Aspire-5820T /mnt/lfs/sources/glibc-2.16.0 $ sed -i 's/ -lgcc_s//' Makeconfig
lfs@kongu-Aspire-5820T /mnt/lfs/sources/glibc-2.16.0 $ sed -i 's/ -lgcc_s//' Makeconfig
lfs@kongu-Aspire-5820T /mnt/lfs/sources/glibc-2.16.0 $ mkdir -v ../glibc-build
mkdir: created directory `../glibc-build'
lfs@kongu-Aspire-5820T /mnt/lfs/sources/glibc-2.16.0 $ cd ../glibc-build/

lfs@kongu-Aspire-5820T /mnt/lfs/sources/glibc-build $ ../glibc-2.16.0/configure \
> --prefix=/tools \
> --host=$LFS_TGT \
> --build=$(../glibc-2.16.0/scripts/config.guess) \
> --disable-profile \
> --enable-add-ons \
> --enable-kernel=2.6.25 \
> --with-headers=/tools/include \
> libc_cv_forced_unwind=yes \
> libc_cv_ctors_header=yes \
> libc_cv_c_cleanup=yes
lfs@kongu-Aspire-5820T /mnt/lfs/sources/glibc-build $ make

...

make[2]: Leaving directory `/mnt/lfs/sources/glibc-2.16.0/elf'
make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.16.0'

lfs@kongu-Aspire-5820T /mnt/lfs/sources/glibc-build $ make install
...

stubs.h unchanged
rm -f /mnt/lfs/sources/glibc-build/stubs.h
make[1]: Leaving directory `/mnt/lfs/sources/glibc-2.16.0'

lfs@kongu-Aspire-5820T /mnt/lfs/sources/glibc-build $ echo 'main() {}' > dummy.c
lfs@kongu-Aspire-5820T /mnt/lfs/sources/glibc-build $ $LFS_TGT-gcc dummy.c
lfs@kongu-Aspire-5820T /mnt/lfs/sources/glibc-build $ readelf -l a.out | grep ': /tools'

NO RESULTS: Not good
                                     

 

Wednesday 28 November 2012

Summer 2012 Project 3: Linux From Scratch Part 1

(Project Abandoned due to unexpected result and the goal was to install a low spec Linux OS for pc that overheats too much. Will try Archbang 32bit)

 

Summer 2012 Project 3: Linux From Scratch Part1

Reference: http://www.linuxfromscratch.org/lfs/
Start: 27 November 2012 17:00

1. Tidy up Win7 Partition & Back-up onto external hard drive.

2. Check Host Systems Requirement


kongu@kongu-Aspire-5820T ~ $cat version-check.sh << "EOF"
#!/bin/bash
# Simple script to list version numbers of critical development tools
export LC_ALL=C
bash --version | head -n1 | cut -d" " -f2-4
echo "/bin/sh -> `readlink -f /bin/sh`"
echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-
bison --version | head -n1
if [ -e /usr/bin/yacc ];
then echo "/usr/bin/yacc -> `readlink -f /usr/bin/yacc`";
else echo "yacc not found"; fi
bzip2 --version 2>&1 < /dev/null | head -n1 | cut -d" " -f1,6-
echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2
diff --version | head -n1
find --version | head -n1
gawk --version | head -n1
if [ -e /usr/bin/awk ];
then echo "/usr/bin/awk -> `readlink -f /usr/bin/awk`";
else echo "awk not found"; fi
gcc --version | head -n1
ldd --version | head -n1 | cut -d" " -f2- # glibc version
grep --version | head -n1
gzip --version | head -n1
cat /proc/version
m4 --version | head -n1
make --version | head -n1
patch --version | head -n1
echo Perl `perl -V:version`
sed --version | head -n1
tar --version | head -n1
echo "Texinfo: `makeinfo --version | head -n1`"
xz --version | head -n1
echo 'main(){}' > dummy.c && gcc -o dummy dummy.c
if [ -x dummy ]
then echo "gcc compilation OK";
else echo "gcc compilation failed"; fi
rm -f dummy.c dummy

EOF
kongu@kongu-Aspire-5820T ~ $ ./version-check.sh

bash, version 4.2.10(1)-release
/bin/sh -> /bin/dash
Binutils: (GNU Binutils for Ubuntu) 2.21.53.20110810
./version-check.sh: line 7: bison: command not found
yacc not found
bzip2,  Version 1.0.5, 10-Dec-2007.
Coreutils:  8.5
diff (GNU diffutils) 3.0
find (GNU findutils) 4.4.2
GNU Awk 3.1.8
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
(Ubuntu EGLIBC 2.13-20ubuntu5.1) 2.13
grep (GNU grep) 2.9
gzip 1.3.12
Linux version 3.0.0-12-generic (buildd@crested) (gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) ) #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011
m4 (GNU M4) 1.4.16
GNU Make 3.81
patch 2.6.1
Perl version='5.12.4';
GNU sed version 4.2.1
tar (GNU tar) 1.25
./version-check.sh: line 30: makeinfo: command not found
Texinfo:
xz (XZ Utils) 5.0.0
gcc compilation OK  


kongu@kongu-Aspire-5820T ~ $ sudo apt-get install bison
kongu@kongu-Aspire-5820T ~ $ sudo apt-get install texinfo

kongu@kongu-Aspire-5820T ~ $ bash version-check.sh

bash, version 4.2.10(1)-release
/bin/sh -> /bin/dash
Binutils: (GNU Binutils for Ubuntu) 2.21.53.20110810
bison (GNU Bison) 2.4.1
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2,  Version 1.0.5, 10-Dec-2007.
Coreutils:  8.5
diff (GNU diffutils) 3.0
find (GNU findutils) 4.4.2
GNU Awk 3.1.8
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1
(Ubuntu EGLIBC 2.13-20ubuntu5.1) 2.13
grep (GNU grep) 2.9
gzip 1.3.12
Linux version 3.0.0-12-generic (buildd@crested) (gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) ) #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011
m4 (GNU M4) 1.4.16
GNU Make 3.81
patch 2.6.1
Perl version='5.12.4';
GNU sed version 4.2.1
tar (GNU tar) 1.25
Texinfo: makeinfo (GNU texinfo) 4.13
xz (XZ Utils) 5.0.0
gcc compilation OK


3. Prepare New Partition

Current Partitions:
sda5 - swap 
sda6 - Linux Mint Debian,
sda7 - Linux Mint 12 KDE,
use sda8 - Fedora 17 for LFS because Gnome3 is annoying.

Note: Don't forget to sudo update-grub after install

Current /etc/fstab on host system (Linux Mint 12 KDE sda7)

kongu@kongu-Aspire-5820T ~ $ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
#              
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda7 during installation
UUID=6168a1b9-50db-422b-8a4f-98933105da0a /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=6286cee4-03aa-4003-93c6-22fba0562827 none            swap    sw              0       0


Command to use: mkfs.ext4 /dev/sda8 
instead of mke2fs -jv /dev/sda8
kongu@kongu-Aspire-5820T ~ $ sudo mkfs.ext4 /dev/sda8
mke2fs 1.41.14 (22-Dec-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
655360 inodes, 2620160 blocks
131008 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2684354560
80 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Writing inode tables: done                           
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 24 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.


Check host filesystem (see LFS-book 7.2 section 2.3 p.17) 
kongu@kongu-Aspire-5820T ~ $ sudo debugfs -R feature /dev/sda7
debugfs 1.41.14 (22-Dec-2010)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize


Mount partition sda8 to /mnt/lfs
kongu@kongu-Aspire-5820T ~ $ export LFS=/mnt/lfs
kongu@kongu-Aspire-5820T ~ $ sudo mkdir -pv $LFS
mkdir: created directory `/mnt/lfs'


Enabled swap partition
kongu@kongu-Aspire-5820T ~ $ sudo swapon -v /dev/sda5
swapon on /dev/sda5
swapon: /dev/sda5: found swap signature: version 1, page-size 4, same byte order
swapon: /dev/sda5: pagesize=4096, swapsize=4294967296, devsize=4294967296
swapon: /dev/sda5: swapon failed: Device or resource busy

#note sda5 swap already enabled

4. Packages & Patches

Create working directory for sources
kongu@kongu-Aspire-5820T ~ $ sudo mkdir -v $LFS/sources
mkdir: created directory `/mnt/lfs/sources'

 

Make directory writable & sticky (only owner can delete)
kongu@kongu-Aspire-5820T ~ $ sudo chmod 1777 $LFS/sources
 

Get list of packages and md5sum 
kongu@kongu-Aspire-5820T ~ $ wget http://www.linuxfromscratch.org/lfs/downloads/stable/wget-list
--2012-11-30 10:51:27--  http://www.linuxfromscratch.org/lfs/downloads/stable/wget-list
Resolving www.linuxfromscratch.org... 216.171.237.234
Connecting to www.linuxfromscratch.org|216.171.237.234|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4788 (4.7K) [text/plain]
Saving to: 'wget-list.1'

100%[=========================================================>] 4,788       11.8K/s   in 0.4s   

2012-11-30 10:51:29 (11.8 KB/s) - 'wget-list.1' saved [4788/4788]
 
Download Checksum of packages
kongu@kongu-Aspire-5820T ~ $ wget http://www.linuxfromscratch.org/lfs/downloads/stable/md5sums
--2012-11-30 10:50:12--  http://www.linuxfromscratch.org/lfs/downloads/stable/md5sums
Resolving www.linuxfromscratch.org... 216.171.237.234
Connecting to www.linuxfromscratch.org|216.171.237.234|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4374 (4.3K) [text/plain]
Saving to: 'md5sums'

100%[=========================================================>] 4,374       13.1K/s   in 0.3s   

2012-11-30 10:50:13 (13.1 KB/s) - 'md5sums' saved [4374/4374]


Make the wget-list as input to wget
kongu@kongu-Aspire-5820T ~ $ wget -i wget-list -P $LFS/sources
--2012-11-30 10:53:47--  http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.xz
Resolving ftp.gnu.org... 208.118.235.20, 2001:4830:134:3::b
Connecting to ftp.gnu.org|208.118.235.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1214744 (1.2M) [application/x-tar]
Saving to: '/mnt/lfs/sources/autoconf-2.69.tar.xz'

100%[=========================================================>] 1,214,744    136K/s   in 10s    

2012-11-30 10:53:59 (114 KB/s) - '/mnt/lfs/sources/autoconf-2.69.tar.xz' saved [1214744/1214744]

--2012-11-30 10:53:59--  http://ftp.gnu.org/gnu/automake/automake-1.12.3.tar.xz
Reusing existing connection to ftp.gnu.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 1378784 (1.3M) [application/x-tar]
Saving to: '/mnt/lfs/sources/automake-1.12.3.tar.xz'

100%[=========================================================>] 1,378,784    170K/s   in 12s    

2012-11-30 10:54:12 (110 KB/s) - '/mnt/lfs/sources/automake-1.12.3.tar.xz' saved [1378784/1378784]

--2012-11-30 10:54:12--  http://ftp.gnu.org/gnu/bash/bash-4.2.tar.gz
Reusing existing connection to ftp.gnu.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 7009201 (6.7M) [application/x-gzip]
Saving to: '/mnt/lfs/sources/bash-4.2.tar.gz'

100%[=========================================================>] 7,009,201    181K/s   in 38s    

2012-11-30 10:54:50 (181 KB/s) - '/mnt/lfs/sources/bash-4.2.tar.gz' saved [7009201/7009201]

--2012-11-30 10:54:50--  http://ftp.gnu.org/gnu/binutils/binutils-2.22.tar.bz2
Reusing existing connection to ftp.gnu.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 19973532 (19M) [application/x-bzip2]
Saving to: '/mnt/lfs/sources/binutils-2.22.tar.bz2'

100%[=========================================================>] 19,973,532   150K/s   in 1m 41s 

2012-11-30 10:56:32 (193 KB/s) - '/mnt/lfs/sources/binutils-2.22.tar.bz2' saved [19973532/19973532]

--2012-11-30 10:56:32--  http://ftp.gnu.org/gnu/bison/bison-2.6.2.tar.xz
Reusing existing connection to ftp.gnu.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 1650196 (1.6M) [application/x-tar]
Saving to: '/mnt/lfs/sources/bison-2.6.2.tar.xz'

100%[=========================================================>] 1,650,196    242K/s   in 7.5s   

2012-11-30 10:56:39 (214 KB/s) - '/mnt/lfs/sources/bison-2.6.2.tar.xz' saved [1650196/1650196]

--2012-11-30 10:56:39--  http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz
Resolving www.bzip.org... 178.250.76.52
Connecting to www.bzip.org|178.250.76.52|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 782025 (764K) [application/x-gzip]
Saving to: '/mnt/lfs/sources/bzip2-1.0.6.tar.gz'

100%[=========================================================>] 782,025     49.8K/s   in 16s    

2012-11-30 10:56:57 (46.4 KB/s) - '/mnt/lfs/sources/bzip2-1.0.6.tar.gz' saved [782025/782025]

--2012-11-30 10:56:57--  http://sourceforge.net/projects/check/files/check/0.9.8/check-0.9.8.tar.gz
Resolving sourceforge.net... 216.34.181.60
Connecting to sourceforge.net|216.34.181.60|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://sourceforge.net/projects/check/files/check/0.9.8/check-0.9.8.tar.gz/download [following]
--2012-11-30 10:56:58--  http://sourceforge.net/projects/check/files/check/0.9.8/check-0.9.8.tar.gz/download
Connecting to sourceforge.net|216.34.181.60|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://downloads.sourceforge.net/project/check/check/0.9.8/check-0.9.8.tar.gz?r=&ts=1354237019&use_mirror=waix [following]
--2012-11-30 10:56:59--  http://downloads.sourceforge.net/project/check/check/0.9.8/check-0.9.8.tar.gz?r=&ts=1354237019&use_mirror=waix
Resolving downloads.sourceforge.net... 216.34.181.59
Connecting to downloads.sourceforge.net|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://waix.dl.sourceforge.net/project/check/check/0.9.8/check-0.9.8.tar.gz [following]
--2012-11-30 10:57:01--  http://waix.dl.sourceforge.net/project/check/check/0.9.8/check-0.9.8.tar.gz
Resolving waix.dl.sourceforge.net... 218.100.43.46
Connecting to waix.dl.sourceforge.net|218.100.43.46|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 558943 (546K) [application/x-gzip]
Saving to: '/mnt/lfs/sources/check-0.9.8.tar.gz'

100%[=========================================================>] 558,943      210K/s   in 2.6s   

2012-11-30 10:57:04 (210 KB/s) - '/mnt/lfs/sources/check-0.9.8.tar.gz' saved [558943/558943]

--2012-11-30 10:57:04--  http://ftp.gnu.org/gnu/coreutils/coreutils-8.19.tar.xz
Connecting to ftp.gnu.org|208.118.235.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5097392 (4.9M) [application/x-tar]
Saving to: '/mnt/lfs/sources/coreutils-8.19.tar.xz'

100%[=========================================================>] 5,097,392    281K/s   in 27s    

2012-11-30 10:57:32 (184 KB/s) - '/mnt/lfs/sources/coreutils-8.19.tar.xz' saved [5097392/5097392]

--2012-11-30 10:57:32--  http://ftp.gnu.org/gnu/dejagnu/dejagnu-1.5.tar.gz
Reusing existing connection to ftp.gnu.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 576269 (563K) [application/x-gzip]
Saving to: '/mnt/lfs/sources/dejagnu-1.5.tar.gz'

100%[=========================================================>] 576,269      195K/s   in 2.9s   

2012-11-30 10:57:35 (195 KB/s) - '/mnt/lfs/sources/dejagnu-1.5.tar.gz' saved [576269/576269]

--2012-11-30 10:57:35--  http://ftp.gnu.org/gnu/diffutils/diffutils-3.2.tar.gz
Reusing existing connection to ftp.gnu.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 2023539 (1.9M) [application/x-gzip]
Saving to: '/mnt/lfs/sources/diffutils-3.2.tar.gz'

100%[=========================================================>] 2,023,539    257K/s   in 9.0s   

2012-11-30 10:57:44 (219 KB/s) - '/mnt/lfs/sources/diffutils-3.2.tar.gz' saved [2023539/2023539]

--2012-11-30 10:57:44--  http://prdownloads.sourceforge.net/e2fsprogs/e2fsprogs-1.42.5.tar.gz
Resolving prdownloads.sourceforge.net... 216.34.181.59
Connecting to prdownloads.sourceforge.net|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v1.42.5/e2fsprogs-1.42.5.tar.gz [following]
--2012-11-30 10:57:46--  http://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v1.42.5/e2fsprogs-1.42.5.tar.gz
Reusing existing connection to prdownloads.sourceforge.net:80.
HTTP request sent, awaiting response... 302 Found
Location: http://waix.dl.sourceforge.net/project/e2fsprogs/e2fsprogs/v1.42.5/e2fsprogs-1.42.5.tar.gz [following]
--2012-11-30 10:57:46--  http://waix.dl.sourceforge.net/project/e2fsprogs/e2fsprogs/v1.42.5/e2fsprogs-1.42.5.tar.gz
Connecting to waix.dl.sourceforge.net|218.100.43.46|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5918892 (5.6M) [application/x-gzip]
Saving to: '/mnt/lfs/sources/e2fsprogs-1.42.5.tar.gz'

100%[=========================================================>] 5,918,892    326K/s   in 18s    

2012-11-30 10:58:05 (324 KB/s) - '/mnt/lfs/sources/e2fsprogs-1.42.5.tar.gz' saved [5918892/5918892]

--2012-11-30 10:58:05--  http://prdownloads.sourceforge.net/expect/expect5.45.tar.gz
Connecting to prdownloads.sourceforge.net|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://downloads.sourceforge.net/project/expect/Expect/5.45/expect5.45.tar.gz [following]
--2012-11-30 10:58:06--  http://downloads.sourceforge.net/project/expect/Expect/5.45/expect5.45.tar.gz
Reusing existing connection to prdownloads.sourceforge.net:80.
HTTP request sent, awaiting response... 302 Found
Location: http://waix.dl.sourceforge.net/project/expect/Expect/5.45/expect5.45.tar.gz [following]
--2012-11-30 10:58:07--  http://waix.dl.sourceforge.net/project/expect/Expect/5.45/expect5.45.tar.gz
Connecting to waix.dl.sourceforge.net|218.100.43.46|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 628808 (614K) [application/x-gzip]
Saving to: '/mnt/lfs/sources/expect5.45.tar.gz'

100%[=========================================================>] 628,808      169K/s   in 3.6s   

2012-11-30 10:58:11 (169 KB/s) - '/mnt/lfs/sources/expect5.45.tar.gz' saved [628808/628808]

--2012-11-30 10:58:11--  ftp://ftp.astron.com/pub/file/file-5.11.tar.gz
           => '/mnt/lfs/sources/file-5.11.tar.gz'
Resolving ftp.astron.com... 38.117.134.204, 208.77.212.98
Connecting to ftp.astron.com|38.117.134.204|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/file ... done.
==> SIZE file-5.11.tar.gz ... 610019
==> PASV ... done.    ==> RETR file-5.11.tar.gz ... done.
Length: 610019 (596K) (unauthoritative)

100%[=========================================================>] 610,019     96.8K/s   in 6.4s   

2012-11-30 10:58:23 (92.9 KB/s) - '/mnt/lfs/sources/file-5.11.tar.gz' saved [610019]

--2012-11-30 10:58:23--  http://ftp.gnu.org/gnu/findutils/findutils-4.4.2.tar.gz
Connecting to ftp.gnu.org|208.118.235.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2149838 (2.0M) [application/x-gzip]
Saving to: '/mnt/lfs/sources/findutils-4.4.2.tar.gz'

100%[=========================================================>] 2,149,838    304K/s   in 15s    

2012-11-30 10:58:39 (144 KB/s) - '/mnt/lfs/sources/findutils-4.4.2.tar.gz' saved [2149838/2149838]

--2012-11-30 10:58:39--  http://prdownloads.sourceforge.net/flex/flex-2.5.37.tar.bz2
Connecting to prdownloads.sourceforge.net|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://waix.dl.sourceforge.net/project/flex/flex-2.5.37.tar.bz2 [following]
--2012-11-30 10:58:40--  http://waix.dl.sourceforge.net/project/flex/flex-2.5.37.tar.bz2
Connecting to waix.dl.sourceforge.net|218.100.43.46|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1303313 (1.2M) [application/x-bzip2]
Saving to: '/mnt/lfs/sources/flex-2.5.37.tar.bz2'

100%[=========================================================>] 1,303,313    329K/s   in 4.1s   

2012-11-30 10:58:44 (310 KB/s) - '/mnt/lfs/sources/flex-2.5.37.tar.bz2' saved [1303313/1303313]

--2012-11-30 10:58:44--  http://ftp.gnu.org/gnu/gawk/gawk-4.0.1.tar.xz
Connecting to ftp.gnu.org|208.118.235.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1612448 (1.5M) [application/x-tar]
Saving to: '/mnt/lfs/sources/gawk-4.0.1.tar.xz'

100%[=========================================================>] 1,612,448    203K/s   in 9.9s   

2012-11-30 10:58:55 (159 KB/s) - '/mnt/lfs/sources/gawk-4.0.1.tar.xz' saved [1612448/1612448]

--2012-11-30 10:58:55--  http://ftp.gnu.org/gnu/gcc/gcc-4.7.1/gcc-4.7.1.tar.bz2
Reusing existing connection to ftp.gnu.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 82639660 (79M) [application/x-bzip2]
Saving to: '/mnt/lfs/sources/gcc-4.7.1.tar.bz2'

100%[=========================================================>] 82,639,660   267K/s   in 5m 39s 

2012-11-30 11:04:35 (238 KB/s) - '/mnt/lfs/sources/gcc-4.7.1.tar.bz2' saved [82639660/82639660]

--2012-11-30 11:04:35--  http://ftp.gnu.org/gnu/gdbm/gdbm-1.10.tar.gz
Reusing existing connection to ftp.gnu.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 655599 (640K) [application/x-gzip]
Saving to: '/mnt/lfs/sources/gdbm-1.10.tar.gz'

100%[=========================================================>] 655,599      185K/s   in 3.5s   

2012-11-30 11:04:39 (185 KB/s) - '/mnt/lfs/sources/gdbm-1.10.tar.gz' saved [655599/655599]

--2012-11-30 11:04:39--  http://ftp.gnu.org/gnu/gettext/gettext-0.18.1.1.tar.gz
Reusing existing connection to ftp.gnu.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 15139737 (14M) [application/x-gzip]
Saving to: '/mnt/lfs/sources/gettext-0.18.1.1.tar.gz'

100%[=========================================================>] 15,139,737   169K/s   in 68s    

2012-11-30 11:05:47 (217 KB/s) - '/mnt/lfs/sources/gettext-0.18.1.1.tar.gz' saved [15139737/15139737]

--2012-11-30 11:05:47--  http://ftp.gnu.org/gnu/glibc/glibc-2.16.0.tar.xz
Reusing existing connection to ftp.gnu.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 9990512 (9.5M) [application/x-tar]
Saving to: '/mnt/lfs/sources/glibc-2.16.0.tar.xz'

100%[=========================================================>] 9,990,512    189K/s   in 44s    

2012-11-30 11:06:31 (224 KB/s) - '/mnt/lfs/sources/glibc-2.16.0.tar.xz' saved [9990512/9990512]

--2012-11-30 11:06:31--  http://ftp.gnu.org/gnu/gmp/gmp-5.0.5.tar.xz
Reusing existing connection to ftp.gnu.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 1671264 (1.6M) [application/x-tar]
Saving to: '/mnt/lfs/sources/gmp-5.0.5.tar.xz'

100%[=========================================================>] 1,671,264    236K/s   in 7.2s   

2012-11-30 11:06:39 (227 KB/s) - '/mnt/lfs/sources/gmp-5.0.5.tar.xz' saved [1671264/1671264]

--2012-11-30 11:06:39--  http://ftp.gnu.org/gnu/grep/grep-2.14.tar.xz
Reusing existing connection to ftp.gnu.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 1195640 (1.1M) [application/x-tar]
Saving to: '/mnt/lfs/sources/grep-2.14.tar.xz'

100%[=========================================================>] 1,195,640    211K/s   in 6.1s   

2012-11-30 11:06:45 (193 KB/s) - '/mnt/lfs/sources/grep-2.14.tar.xz' saved [1195640/1195640]

--2012-11-30 11:06:45--  http://ftp.gnu.org/gnu/groff/groff-1.21.tar.gz
Reusing existing connection to ftp.gnu.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 3863837 (3.7M) [application/x-gzip]
Saving to: '/mnt/lfs/sources/groff-1.21.tar.gz'

100%[=========================================================>] 3,863,837    305K/s   in 18s    

2012-11-30 11:07:03 (209 KB/s) - '/mnt/lfs/sources/groff-1.21.tar.gz' saved [3863837/3863837]

--2012-11-30 11:07:03--  http://ftp.gnu.org/gnu/grub/grub-2.00.tar.xz
Reusing existing connection to ftp.gnu.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 5136412 (4.9M) [application/x-tar]
Saving to: '/mnt/lfs/sources/grub-2.00.tar.xz'

100%[=========================================================>] 5,136,412    214K/s   in 20s    

2012-11-30 11:07:24 (254 KB/s) - '/mnt/lfs/sources/grub-2.00.tar.xz' saved [5136412/5136412]

--2012-11-30 11:07:24--  http://ftp.gnu.org/gnu/gzip/gzip-1.5.tar.xz
Reusing existing connection to ftp.gnu.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 720956 (704K) [application/x-tar]
Saving to: '/mnt/lfs/sources/gzip-1.5.tar.xz'

100%[=========================================================>] 720,956      191K/s   in 3.7s   

2012-11-30 11:07:28 (191 KB/s) - '/mnt/lfs/sources/gzip-1.5.tar.xz' saved [720956/720956]

--2012-11-30 11:07:28--  http://anduin.linuxfromscratch.org/sources/LFS/lfs-packages/conglomeration//iana-etc/iana-etc-2.30.tar.bz2
Resolving anduin.linuxfromscratch.org... 66.135.59.49
Connecting to anduin.linuxfromscratch.org|66.135.59.49|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 205618 (201K) [application/x-bzip2]
Saving to: '/mnt/lfs/sources/iana-etc-2.30.tar.bz2'

100%[=========================================================>] 205,618     84.5K/s   in 2.4s   

2012-11-30 11:07:36 (84.5 KB/s) - '/mnt/lfs/sources/iana-etc-2.30.tar.bz2' saved [205618/205618]

--2012-11-30 11:07:36--  http://ftp.gnu.org/gnu/inetutils/inetutils-1.9.1.tar.gz
Connecting to ftp.gnu.org|208.118.235.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1987928 (1.9M) [application/x-gzip]
Saving to: '/mnt/lfs/sources/inetutils-1.9.1.tar.gz'

100%[=========================================================>] 1,987,928    244K/s   in 9.9s   

2012-11-30 11:07:47 (197 KB/s) - '/mnt/lfs/sources/inetutils-1.9.1.tar.gz' saved [1987928/1987928]

--2012-11-30 11:07:47--  http://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-3.5.1.tar.xz
Resolving www.kernel.org... 149.20.20.133, 149.20.4.69
Connecting to www.kernel.org|149.20.20.133|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 387984 (379K) [application/x-xz]
Saving to: '/mnt/lfs/sources/iproute2-3.5.1.tar.xz'

100%[=========================================================>] 387,984      115K/s   in 3.3s   

2012-11-30 11:07:51 (115 KB/s) - '/mnt/lfs/sources/iproute2-3.5.1.tar.xz' saved [387984/387984]

--2012-11-30 11:07:51--  http://ftp.altlinux.org/pub/people/legion/kbd/kbd-1.15.3.tar.gz
Resolving ftp.altlinux.org... 62.152.55.238
Connecting to ftp.altlinux.org|62.152.55.238|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1659867 (1.6M) [application/x-gzip]
Saving to: '/mnt/lfs/sources/kbd-1.15.3.tar.gz'

100%[=========================================================>] 1,659,867   29.4K/s   in 73s    

2012-11-30 11:09:11 (22.2 KB/s) - '/mnt/lfs/sources/kbd-1.15.3.tar.gz' saved [1659867/1659867]

--2012-11-30 11:09:11--  http://www.kernel.org/pub/linux/utils/kernel/kmod/kmod-9.tar.xz
Connecting to www.kernel.org|149.20.20.133|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1122668 (1.1M) [application/x-xz]
Saving to: '/mnt/lfs/sources/kmod-9.tar.xz'

100%[=========================================================>] 1,122,668    259K/s   in 4.4s   

2012-11-30 11:09:16 (248 KB/s) - '/mnt/lfs/sources/kmod-9.tar.xz' saved [1122668/1122668]

--2012-11-30 11:09:16--  http://www.greenwoodsoftware.com/less/less-444.tar.gz
Resolving www.greenwoodsoftware.com... 67.131.250.158
Connecting to www.greenwoodsoftware.com|67.131.250.158|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 307308 (300K) [application/x-gzip]
Saving to: '/mnt/lfs/sources/less-444.tar.gz'

100%[=========================================================>] 307,308      129K/s   in 2.3s   

2012-11-30 11:09:19 (129 KB/s) - '/mnt/lfs/sources/less-444.tar.gz' saved [307308/307308]

--2012-11-30 11:09:19--  http://www.linuxfromscratch.org/lfs/downloads/7.2/lfs-bootscripts-20120901.tar.bz2
Resolving www.linuxfromscratch.org... 216.171.237.234
Connecting to www.linuxfromscratch.org|216.171.237.234|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 33627 (33K) [application/x-bzip2]
Saving to: '/mnt/lfs/sources/lfs-bootscripts-20120901.tar.bz2'

100%[=========================================================>] 33,627      29.5K/s   in 1.1s   

2012-11-30 11:09:21 (29.5 KB/s) - '/mnt/lfs/sources/lfs-bootscripts-20120901.tar.bz2' saved [33627/33627]

--2012-11-30 11:09:21--  http://download.savannah.gnu.org/releases/libpipeline/libpipeline-1.2.1.tar.gz
Resolving download.savannah.gnu.org... 140.186.70.73
Connecting to download.savannah.gnu.org|140.186.70.73|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://download.savannah.gnu.org/releases-redirect/libpipeline/libpipeline-1.2.1.tar.gz [following]
--2012-11-30 11:09:23--  http://download.savannah.gnu.org/releases-redirect/libpipeline/libpipeline-1.2.1.tar.gz
Reusing existing connection to download.savannah.gnu.org:80.
HTTP request sent, awaiting response... 302 Found
Location: http://ftp.twaren.net/Unix/NonGNU//libpipeline/libpipeline-1.2.1.tar.gz [following]
--2012-11-30 11:09:24--  http://ftp.twaren.net/Unix/NonGNU//libpipeline/libpipeline-1.2.1.tar.gz
Resolving ftp.twaren.net... 140.110.123.9, 2001:e10:5c00:5::9
Connecting to ftp.twaren.net|140.110.123.9|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 741039 (724K) [application/x-gzip]
Saving to: '/mnt/lfs/sources/libpipeline-1.2.1.tar.gz'

100%[=========================================================>] 741,039      181K/s   in 4.0s   

2012-11-30 11:09:28 (181 KB/s) - '/mnt/lfs/sources/libpipeline-1.2.1.tar.gz' saved [741039/741039]

--2012-11-30 11:09:28--  http://ftp.gnu.org/gnu/libtool/libtool-2.4.2.tar.gz
Connecting to ftp.gnu.org|208.118.235.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2632347 (2.5M) [application/x-gzip]
Saving to: '/mnt/lfs/sources/libtool-2.4.2.tar.gz'

100%[=========================================================>] 2,632,347    269K/s   in 11s    

2012-11-30 11:09:40 (230 KB/s) - '/mnt/lfs/sources/libtool-2.4.2.tar.gz' saved [2632347/2632347]

--2012-11-30 11:09:40--  http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.5.2.tar.xz
Connecting to www.kernel.org|149.20.20.133|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 67570116 (64M) [application/x-xz]
Saving to: '/mnt/lfs/sources/linux-3.5.2.tar.xz'

100%[=========================================================>] 67,570,116   307K/s   in 4m 0s  

2012-11-30 11:13:40 (275 KB/s) - '/mnt/lfs/sources/linux-3.5.2.tar.xz' saved [67570116/67570116]

--2012-11-30 11:13:40--  http://ftp.gnu.org/gnu/m4/m4-1.4.16.tar.bz2
Connecting to ftp.gnu.org|208.118.235.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1258362 (1.2M) [application/x-bzip2]
Saving to: '/mnt/lfs/sources/m4-1.4.16.tar.bz2'

100%[=========================================================>] 1,258,362    199K/s   in 8.9s   

2012-11-30 11:13:50 (138 KB/s) - '/mnt/lfs/sources/m4-1.4.16.tar.bz2' saved [1258362/1258362]

--2012-11-30 11:13:50--  http://ftp.gnu.org/gnu/make/make-3.82.tar.bz2
Reusing existing connection to ftp.gnu.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 1242186 (1.2M) [application/x-bzip2]
Saving to: '/mnt/lfs/sources/make-3.82.tar.bz2'

100%[=========================================================>] 1,242,186   75.9K/s   in 10s    

2012-11-30 11:14:01 (116 KB/s) - '/mnt/lfs/sources/make-3.82.tar.bz2' saved [1242186/1242186]

--2012-11-30 11:14:01--  http://download.savannah.gnu.org/releases/man-db/man-db-2.6.2.tar.xz
Connecting to download.savannah.gnu.org|140.186.70.73|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://download.savannah.gnu.org/releases-redirect/man-db/man-db-2.6.2.tar.xz [following]
--2012-11-30 11:14:02--  http://download.savannah.gnu.org/releases-redirect/man-db/man-db-2.6.2.tar.xz
Reusing existing connection to download.savannah.gnu.org:80.
HTTP request sent, awaiting response... 302 Found
Location: http://ftp.twaren.net/Unix/NonGNU//man-db/man-db-2.6.2.tar.xz [following]
--2012-11-30 11:14:02--  http://ftp.twaren.net/Unix/NonGNU//man-db/man-db-2.6.2.tar.xz
Connecting to ftp.twaren.net|140.110.123.9|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1385068 (1.3M) [application/x-tar]
Saving to: '/mnt/lfs/sources/man-db-2.6.2.tar.xz'

100%[=========================================================>] 1,385,068    154K/s   in 9.6s   

2012-11-30 11:14:12 (141 KB/s) - '/mnt/lfs/sources/man-db-2.6.2.tar.xz' saved [1385068/1385068]

--2012-11-30 11:14:12--  http://www.kernel.org/pub/linux/docs/man-pages/man-pages-3.42.tar.xz
Connecting to www.kernel.org|149.20.20.133|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1095872 (1.0M) [application/x-xz]
Saving to: '/mnt/lfs/sources/man-pages-3.42.tar.xz'

100%[=========================================================>] 1,095,872    209K/s   in 6.2s   

2012-11-30 11:14:19 (172 KB/s) - '/mnt/lfs/sources/man-pages-3.42.tar.xz' saved [1095872/1095872]

--2012-11-30 11:14:19--  http://www.multiprecision.org/mpc/download/mpc-1.0.tar.gz
Resolving www.multiprecision.org... 213.165.76.208
Connecting to www.multiprecision.org|213.165.76.208|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 628311 (614K) [application/x-tar]
Saving to: '/mnt/lfs/sources/mpc-1.0.tar.gz'

100%[=========================================================>] 628,311     54.2K/s   in 12s    

2012-11-30 11:14:33 (50.5 KB/s) - '/mnt/lfs/sources/mpc-1.0.tar.gz' saved [628311/628311]

--2012-11-30 11:14:33--  http://www.mpfr.org/mpfr-3.1.1/mpfr-3.1.1.tar.xz
Resolving www.mpfr.org... 152.81.144.6
Connecting to www.mpfr.org|152.81.144.6|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1071688 (1.0M) [application/x-tar]
Saving to: '/mnt/lfs/sources/mpfr-3.1.1.tar.xz'

100%[=========================================================>] 1,071,688   38.1K/s   in 30s    

2012-11-30 11:15:14 (34.7 KB/s) - '/mnt/lfs/sources/mpfr-3.1.1.tar.xz' saved [1071688/1071688]

--2012-11-30 11:15:14--  ftp://ftp.gnu.org/gnu/ncurses/ncurses-5.9.tar.gz
           => '/mnt/lfs/sources/ncurses-5.9.tar.gz'
Connecting to ftp.gnu.org|208.118.235.20|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /gnu/ncurses ... done.
==> SIZE ncurses-5.9.tar.gz ... 2826473
==> PASV ... done.    ==> RETR ncurses-5.9.tar.gz ... done.
Length: 2826473 (2.7M) (unauthoritative)

100%[=========================================================>] 2,826,473    188K/s   in 15s    

2012-11-30 11:15:34 (181 KB/s) - '/mnt/lfs/sources/ncurses-5.9.tar.gz' saved [2826473]

--2012-11-30 11:15:34--  http://ftp.gnu.org/gnu/patch/patch-2.6.1.tar.bz2
Connecting to ftp.gnu.org|208.118.235.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 253719 (248K) [application/x-bzip2]
Saving to: '/mnt/lfs/sources/patch-2.6.1.tar.bz2'

100%[=========================================================>] 253,719     61.1K/s   in 4.1s   

2012-11-30 11:15:38 (61.1 KB/s) - '/mnt/lfs/sources/patch-2.6.1.tar.bz2' saved [253719/253719]

--2012-11-30 11:15:38--  http://www.cpan.org/src/5.0/perl-5.16.1.tar.bz2
Resolving www.cpan.org... 212.117.177.118, 199.15.176.140, 2a01:608:2:4::2, ...
Connecting to www.cpan.org|212.117.177.118|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-bzip2]
Saving to: '/mnt/lfs/sources/perl-5.16.1.tar.bz2'

    [                   <=>                                    ] 13,550,613   256K/s   in 57s    

2012-11-30 11:16:38 (230 KB/s) - '/mnt/lfs/sources/perl-5.16.1.tar.bz2' saved [13550613]

--2012-11-30 11:16:38--  http://pkgconfig.freedesktop.org/releases/pkg-config-0.27.tar.gz
Resolving pkgconfig.freedesktop.org... 131.252.210.176
Connecting to pkgconfig.freedesktop.org|131.252.210.176|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1912566 (1.8M) [application/x-gzip]
Saving to: '/mnt/lfs/sources/pkg-config-0.27.tar.gz'

100%[=========================================================>] 1,912,566    279K/s   in 7.7s   

2012-11-30 11:16:47 (244 KB/s) - '/mnt/lfs/sources/pkg-config-0.27.tar.gz' saved [1912566/1912566]

--2012-11-30 11:16:47--  http://procps.sourceforge.net/procps-3.2.8.tar.gz
Resolving procps.sourceforge.net... 216.34.181.96
Connecting to procps.sourceforge.net|216.34.181.96|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 285758 (279K) [application/x-gzip]
Saving to: '/mnt/lfs/sources/procps-3.2.8.tar.gz'

100%[=========================================================>] 285,758     73.9K/s   in 3.8s   

2012-11-30 11:16:52 (73.9 KB/s) - '/mnt/lfs/sources/procps-3.2.8.tar.gz' saved [285758/285758]

--2012-11-30 11:16:52--  http://prdownloads.sourceforge.net/psmisc/psmisc-22.19.tar.gz
Connecting to prdownloads.sourceforge.net|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://downloads.sourceforge.net/project/psmisc/psmisc/psmisc-22.19.tar.gz [following]
--2012-11-30 11:16:53--  http://downloads.sourceforge.net/project/psmisc/psmisc/psmisc-22.19.tar.gz
Reusing existing connection to prdownloads.sourceforge.net:80.
HTTP request sent, awaiting response... 302 Found
Location: http://waix.dl.sourceforge.net/project/psmisc/psmisc/psmisc-22.19.tar.gz [following]
--2012-11-30 11:16:54--  http://waix.dl.sourceforge.net/project/psmisc/psmisc/psmisc-22.19.tar.gz
Connecting to waix.dl.sourceforge.net|218.100.43.46|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 492733 (481K) [application/x-gzip]
Saving to: '/mnt/lfs/sources/psmisc-22.19.tar.gz'

100%[=========================================================>] 492,733      279K/s   in 1.7s   

2012-11-30 11:16:56 (279 KB/s) - '/mnt/lfs/sources/psmisc-22.19.tar.gz' saved [492733/492733]

--2012-11-30 11:16:56--  http://ftp.gnu.org/gnu/readline/readline-6.2.tar.gz
Connecting to ftp.gnu.org|208.118.235.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2277926 (2.2M) [application/x-gzip]
Saving to: '/mnt/lfs/sources/readline-6.2.tar.gz'

100%[=========================================================>] 2,277,926    185K/s   in 13s    

2012-11-30 11:17:10 (168 KB/s) - '/mnt/lfs/sources/readline-6.2.tar.gz' saved [2277926/2277926]

--2012-11-30 11:17:10--  http://ftp.gnu.org/gnu/sed/sed-4.2.1.tar.bz2
Reusing existing connection to ftp.gnu.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 899091 (878K) [application/x-bzip2]
Saving to: '/mnt/lfs/sources/sed-4.2.1.tar.bz2'

100%[=========================================================>] 899,091      193K/s   in 6.7s   

2012-11-30 11:17:17 (131 KB/s) - '/mnt/lfs/sources/sed-4.2.1.tar.bz2' saved [899091/899091]

--2012-11-30 11:17:17--  http://pkg-shadow.alioth.debian.org/releases/shadow-4.1.5.1.tar.bz2
Resolving pkg-shadow.alioth.debian.org... 217.196.43.134
Connecting to pkg-shadow.alioth.debian.org|217.196.43.134|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2193325 (2.1M) [application/x-bzip2]
Saving to: '/mnt/lfs/sources/shadow-4.1.5.1.tar.bz2'

100%[=========================================================>] 2,193,325    156K/s   in 15s    

2012-11-30 11:17:33 (142 KB/s) - '/mnt/lfs/sources/shadow-4.1.5.1.tar.bz2' saved [2193325/2193325]

--2012-11-30 11:17:33--  http://www.infodrom.org/projects/sysklogd/download/sysklogd-1.5.tar.gz
Resolving www.infodrom.org... 217.114.79.202
Connecting to www.infodrom.org|217.114.79.202|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 86557 (85K) [application/x-gzip]
Saving to: '/mnt/lfs/sources/sysklogd-1.5.tar.gz'

100%[=========================================================>] 86,557      41.0K/s   in 2.1s   

2012-11-30 11:17:42 (41.0 KB/s) - '/mnt/lfs/sources/sysklogd-1.5.tar.gz' saved [86557/86557]

--2012-11-30 11:17:42--  http://download.savannah.gnu.org/releases/sysvinit/sysvinit-2.88dsf.tar.bz2
Connecting to download.savannah.gnu.org|140.186.70.73|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://download.savannah.gnu.org/releases-redirect/sysvinit/sysvinit-2.88dsf.tar.bz2 [following]
--2012-11-30 11:17:43--  http://download.savannah.gnu.org/releases-redirect/sysvinit/sysvinit-2.88dsf.tar.bz2
Reusing existing connection to download.savannah.gnu.org:80.
HTTP request sent, awaiting response... 302 Found
Location: http://ftp.twaren.net/Unix/NonGNU//sysvinit/sysvinit-2.88dsf.tar.bz2 [following]
--2012-11-30 11:17:43--  http://ftp.twaren.net/Unix/NonGNU//sysvinit/sysvinit-2.88dsf.tar.bz2
Connecting to ftp.twaren.net|140.110.123.9|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 105551 (103K) [application/x-tar]
Saving to: '/mnt/lfs/sources/sysvinit-2.88dsf.tar.bz2'

100%[=========================================================>] 105,551      110K/s   in 0.9s   

2012-11-30 11:17:45 (110 KB/s) - '/mnt/lfs/sources/sysvinit-2.88dsf.tar.bz2' saved [105551/105551]

--2012-11-30 11:17:45--  http://ftp.gnu.org/gnu/tar/tar-1.26.tar.bz2
Connecting to ftp.gnu.org|208.118.235.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2339773 (2.2M) [application/x-bzip2]
Saving to: '/mnt/lfs/sources/tar-1.26.tar.bz2'

100%[=========================================================>] 2,339,773    225K/s   in 12s    

2012-11-30 11:17:57 (193 KB/s) - '/mnt/lfs/sources/tar-1.26.tar.bz2' saved [2339773/2339773]

--2012-11-30 11:17:57--  http://prdownloads.sourceforge.net/tcl/tcl8.5.12-src.tar.gz
Connecting to prdownloads.sourceforge.net|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://downloads.sourceforge.net/project/tcl/Tcl/8.5.12/tcl8.5.12-src.tar.gz [following]
--2012-11-30 11:17:58--  http://downloads.sourceforge.net/project/tcl/Tcl/8.5.12/tcl8.5.12-src.tar.gz
Reusing existing connection to prdownloads.sourceforge.net:80.
HTTP request sent, awaiting response... 302 Found
Location: http://waix.dl.sourceforge.net/project/tcl/Tcl/8.5.12/tcl8.5.12-src.tar.gz [following]
--2012-11-30 11:17:59--  http://waix.dl.sourceforge.net/project/tcl/Tcl/8.5.12/tcl8.5.12-src.tar.gz
Connecting to waix.dl.sourceforge.net|218.100.43.46|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4501505 (4.3M) [application/x-gzip]
Saving to: '/mnt/lfs/sources/tcl8.5.12-src.tar.gz'

100%[=========================================================>] 4,501,505    203K/s   in 15s    

2012-11-30 11:18:14 (288 KB/s) - '/mnt/lfs/sources/tcl8.5.12-src.tar.gz' saved [4501505/4501505]

--2012-11-30 11:18:14--  http://www.iana.org//time-zones/repository/releases/tzdata2012e.tar.gz
Resolving www.iana.org... 192.0.32.8, 2620:0:2d0:200::8
Connecting to www.iana.org|192.0.32.8|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-tar]
Saving to: '/mnt/lfs/sources/tzdata2012e.tar.gz'

    [         <=>                                              ] 206,251     93.7K/s   in 2.1s   

2012-11-30 11:18:18 (93.7 KB/s) - '/mnt/lfs/sources/tzdata2012e.tar.gz' saved [206251]

--2012-11-30 11:18:18--  http://ftp.gnu.org/gnu/texinfo/texinfo-4.13a.tar.gz
Connecting to ftp.gnu.org|208.118.235.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2751071 (2.6M) [application/x-gzip]
Saving to: '/mnt/lfs/sources/texinfo-4.13a.tar.gz'

100%[=========================================================>] 2,751,071    262K/s   in 15s    

2012-11-30 11:18:33 (184 KB/s) - '/mnt/lfs/sources/texinfo-4.13a.tar.gz' saved [2751071/2751071]

--2012-11-30 11:18:33--  http://www.freedesktop.org/software/systemd/systemd-188.tar.xz
Resolving www.freedesktop.org... 131.252.210.176
Connecting to www.freedesktop.org|131.252.210.176|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1348144 (1.3M) [application/x-tar]
Saving to: '/mnt/lfs/sources/systemd-188.tar.xz'

100%[=========================================================>] 1,348,144    187K/s   in 7.5s   

2012-11-30 11:18:41 (177 KB/s) - '/mnt/lfs/sources/systemd-188.tar.xz' saved [1348144/1348144]

--2012-11-30 11:18:41--  http://anduin.linuxfromscratch.org/sources/other/udev-lfs-188-3.tar.bz2
Connecting to anduin.linuxfromscratch.org|66.135.59.49|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 16713 (16K) [application/x-bzip2]
Saving to: '/mnt/lfs/sources/udev-lfs-188-3.tar.bz2'

100%[=========================================================>] 16,713      15.8K/s   in 1.0s   

2012-11-30 11:18:43 (15.8 KB/s) - '/mnt/lfs/sources/udev-lfs-188-3.tar.bz2' saved [16713/16713]

--2012-11-30 11:18:43--  http://www.kernel.org/pub/linux/utils/util-linux/v2.21/util-linux-2.21.2.tar.xz
Connecting to www.kernel.org|149.20.20.133|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2985668 (2.8M) [application/x-xz]
Saving to: '/mnt/lfs/sources/util-linux-2.21.2.tar.xz'

100%[=========================================================>] 2,985,668    300K/s   in 14s    

2012-11-30 11:18:57 (209 KB/s) - '/mnt/lfs/sources/util-linux-2.21.2.tar.xz' saved [2985668/2985668]

--2012-11-30 11:18:57--  ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2
           => '/mnt/lfs/sources/vim-7.3.tar.bz2'
Resolving ftp.vim.org... 192.87.102.43, 192.87.102.42, 2001:610:1:80aa:192:87:102:43, ...
Connecting to ftp.vim.org|192.87.102.43|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/vim/unix ... done.
==> SIZE vim-7.3.tar.bz2 ... 9080692
==> PASV ... done.    ==> RETR vim-7.3.tar.bz2 ... done.
Length: 9080692 (8.7M) (unauthoritative)

100%[=========================================================>] 9,080,692    261K/s   in 43s    

2012-11-30 11:19:48 (204 KB/s) - '/mnt/lfs/sources/vim-7.3.tar.bz2' saved [9080692]

--2012-11-30 11:19:48--  http://tukaani.org/xz/xz-5.0.4.tar.xz
Resolving tukaani.org... 84.34.147.45
Connecting to tukaani.org|84.34.147.45|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 915048 (894K) [application/x-tar]
Saving to: '/mnt/lfs/sources/xz-5.0.4.tar.xz'

100%[=========================================================>] 915,048     96.0K/s   in 11s    

2012-11-30 11:20:05 (81.4 KB/s) - '/mnt/lfs/sources/xz-5.0.4.tar.xz' saved [915048/915048]

--2012-11-30 11:20:05--  http://www.zlib.net/zlib-1.2.7.tar.bz2
Resolving www.zlib.net... 69.73.181.135
Connecting to www.zlib.net|69.73.181.135|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 505085 (493K) [application/x-tar]
Saving to: '/mnt/lfs/sources/zlib-1.2.7.tar.bz2'

100%[=========================================================>] 505,085      131K/s   in 3.8s   

2012-11-30 11:20:15 (131 KB/s) - '/mnt/lfs/sources/zlib-1.2.7.tar.bz2' saved [505085/505085]

--2012-11-30 11:20:15--  http://www.linuxfromscratch.org/patches/lfs/7.2/bash-4.2-fixes-8.patch
Connecting to www.linuxfromscratch.org|216.171.237.234|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 51929 (51K) [text/plain]
Saving to: '/mnt/lfs/sources/bash-4.2-fixes-8.patch'

100%[=========================================================>] 51,929      31.7K/s   in 1.6s   

2012-11-30 11:20:18 (31.7 KB/s) - '/mnt/lfs/sources/bash-4.2-fixes-8.patch' saved [51929/51929]

--2012-11-30 11:20:18--  http://www.linuxfromscratch.org/patches/lfs/7.2/binutils-2.22-build_fix-1.patch
Reusing existing connection to www.linuxfromscratch.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 1457 (1.4K) [text/plain]
Saving to: '/mnt/lfs/sources/binutils-2.22-build_fix-1.patch'

100%[=========================================================>] 1,457       --.-K/s   in 0s     

2012-11-30 11:20:18 (29.6 MB/s) - '/mnt/lfs/sources/binutils-2.22-build_fix-1.patch' saved [1457/1457]

--2012-11-30 11:20:18--  http://www.linuxfromscratch.org/patches/lfs/7.2/bzip2-1.0.6-install_docs-1.patch
Reusing existing connection to www.linuxfromscratch.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 1684 (1.6K) [text/plain]
Saving to: '/mnt/lfs/sources/bzip2-1.0.6-install_docs-1.patch'

100%[=========================================================>] 1,684       --.-K/s   in 0.001s 

2012-11-30 11:20:18 (1.15 MB/s) - '/mnt/lfs/sources/bzip2-1.0.6-install_docs-1.patch' saved [1684/1684]

--2012-11-30 11:20:18--  http://www.linuxfromscratch.org/patches/lfs/7.2/coreutils-8.19-i18n-1.patch
Reusing existing connection to www.linuxfromscratch.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 273310 (267K) [text/plain]
Saving to: '/mnt/lfs/sources/coreutils-8.19-i18n-1.patch'

100%[=========================================================>] 273,310      147K/s   in 1.8s   

2012-11-30 11:20:21 (147 KB/s) - '/mnt/lfs/sources/coreutils-8.19-i18n-1.patch' saved [273310/273310]

--2012-11-30 11:20:21--  http://www.linuxfromscratch.org/patches/lfs/7.2/flex-2.5.37-bison-2.6.1-1.patch
Reusing existing connection to www.linuxfromscratch.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 2812 (2.7K) [text/plain]
Saving to: '/mnt/lfs/sources/flex-2.5.37-bison-2.6.1-1.patch'

100%[=========================================================>] 2,812       8.33K/s   in 0.3s   

2012-11-30 11:20:21 (8.33 KB/s) - '/mnt/lfs/sources/flex-2.5.37-bison-2.6.1-1.patch' saved [2812/2812]

--2012-11-30 11:20:21--  http://www.linuxfromscratch.org/patches/lfs/7.2/glibc-2.16.0-res_query_fix-1.patch
Reusing existing connection to www.linuxfromscratch.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 1969 (1.9K) [text/plain]
Saving to: '/mnt/lfs/sources/glibc-2.16.0-res_query_fix-1.patch'

100%[=========================================================>] 1,969       --.-K/s   in 0.006s 

2012-11-30 11:20:22 (309 KB/s) - '/mnt/lfs/sources/glibc-2.16.0-res_query_fix-1.patch' saved [1969/1969]

--2012-11-30 11:20:22--  http://www.linuxfromscratch.org/patches/lfs/7.2/kbd-1.15.3-upstream_fixes-1.patch
Reusing existing connection to www.linuxfromscratch.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 1582 (1.5K) [text/plain]
Saving to: '/mnt/lfs/sources/kbd-1.15.3-upstream_fixes-1.patch'

100%[=========================================================>] 1,582       --.-K/s   in 0.001s 

2012-11-30 11:20:22 (1.02 MB/s) - '/mnt/lfs/sources/kbd-1.15.3-upstream_fixes-1.patch' saved [1582/1582]

--2012-11-30 11:20:22--  http://www.linuxfromscratch.org/patches/lfs/7.2/kbd-1.15.3-backspace-1.patch
Reusing existing connection to www.linuxfromscratch.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 12640 (12K) [text/plain]
Saving to: '/mnt/lfs/sources/kbd-1.15.3-backspace-1.patch'

100%[=========================================================>] 12,640      18.6K/s   in 0.7s   

2012-11-30 11:20:23 (18.6 KB/s) - '/mnt/lfs/sources/kbd-1.15.3-backspace-1.patch' saved [12640/12640]

--2012-11-30 11:20:23--  http://www.linuxfromscratch.org/patches/lfs/7.2/kmod-9-testsuite-1.patch
Reusing existing connection to www.linuxfromscratch.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 2283 (2.2K) [text/plain]
Saving to: '/mnt/lfs/sources/kmod-9-testsuite-1.patch'

100%[=========================================================>] 2,283       --.-K/s   in 0.003s 

2012-11-30 11:20:23 (670 KB/s) - '/mnt/lfs/sources/kmod-9-testsuite-1.patch' saved [2283/2283]

--2012-11-30 11:20:23--  http://www.linuxfromscratch.org/patches/lfs/7.2/make-3.82-upstream_fixes-2.patch
Reusing existing connection to www.linuxfromscratch.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 9889 (9.7K) [text/plain]
Saving to: '/mnt/lfs/sources/make-3.82-upstream_fixes-2.patch'

100%[=========================================================>] 9,889       28.6K/s   in 0.3s   

2012-11-30 11:20:24 (28.6 KB/s) - '/mnt/lfs/sources/make-3.82-upstream_fixes-2.patch' saved [9889/9889]

--2012-11-30 11:20:24--  http://www.linuxfromscratch.org/patches/lfs/7.2/patch-2.6.1-test_fix-1.patch
Reusing existing connection to www.linuxfromscratch.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 892 [text/plain]
Saving to: '/mnt/lfs/sources/patch-2.6.1-test_fix-1.patch'

100%[=========================================================>] 892         --.-K/s   in 0s     

2012-11-30 11:20:24 (87.5 MB/s) - '/mnt/lfs/sources/patch-2.6.1-test_fix-1.patch' saved [892/892]

--2012-11-30 11:20:24--  http://www.linuxfromscratch.org/patches/lfs/7.2/perl-5.16.1-libc-2.patch
Reusing existing connection to www.linuxfromscratch.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 1611 (1.6K) [text/plain]
Saving to: '/mnt/lfs/sources/perl-5.16.1-libc-2.patch'

100%[=========================================================>] 1,611       --.-K/s   in 0.001s 

2012-11-30 11:20:25 (2.47 MB/s) - '/mnt/lfs/sources/perl-5.16.1-libc-2.patch' saved [1611/1611]

--2012-11-30 11:20:25--  http://www.linuxfromscratch.org/patches/lfs/7.2/procps-3.2.8-fix_HZ_errors-1.patch
Reusing existing connection to www.linuxfromscratch.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 2361 (2.3K) [text/plain]
Saving to: '/mnt/lfs/sources/procps-3.2.8-fix_HZ_errors-1.patch'

100%[=========================================================>] 2,361       --.-K/s   in 0.004s 

2012-11-30 11:20:25 (649 KB/s) - '/mnt/lfs/sources/procps-3.2.8-fix_HZ_errors-1.patch' saved [2361/2361]

--2012-11-30 11:20:25--  http://www.linuxfromscratch.org/patches/lfs/7.2/procps-3.2.8-watch_unicode-1.patch
Reusing existing connection to www.linuxfromscratch.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 3622 (3.5K) [text/plain]
Saving to: '/mnt/lfs/sources/procps-3.2.8-watch_unicode-1.patch'

100%[=========================================================>] 3,622       --.-K/s   in 0.004s 

2012-11-30 11:20:25 (819 KB/s) - '/mnt/lfs/sources/procps-3.2.8-watch_unicode-1.patch' saved [3622/3622]

--2012-11-30 11:20:25--  http://www.linuxfromscratch.org/patches/lfs/7.2/readline-6.2-fixes-1.patch
Reusing existing connection to www.linuxfromscratch.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 1287 (1.3K) [text/plain]
Saving to: '/mnt/lfs/sources/readline-6.2-fixes-1.patch'

100%[=========================================================>] 1,287       --.-K/s   in 0.001s 

2012-11-30 11:20:26 (1.86 MB/s) - '/mnt/lfs/sources/readline-6.2-fixes-1.patch' saved [1287/1287]

--2012-11-30 11:20:26--  http://www.linuxfromscratch.org/patches/lfs/7.2/sed-4.2.1-testsuite_fixes-1.patch
Reusing existing connection to www.linuxfromscratch.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 1853 (1.8K) [text/plain]
Saving to: '/mnt/lfs/sources/sed-4.2.1-testsuite_fixes-1.patch'

100%[=========================================================>] 1,853       --.-K/s   in 0.002s 

2012-11-30 11:20:26 (1.17 MB/s) - '/mnt/lfs/sources/sed-4.2.1-testsuite_fixes-1.patch' saved [1853/1853]

FINISHED --2012-11-30 11:20:26--
Downloaded: 78 files, 293M in 24m 39s (203 KB/s)

Check checksum against downloaded packages 
kongu@kongu-Aspire-5820T ~ $ cp md5sums /mnt/lfs/sources
kongu@kongu-Aspire-5820T ~ $ pushd $LFS/sources

/mnt/lfs/sources ~
kongu@kongu-Aspire-5820T /mnt/lfs/sources $ md5sum -c md5sums
autoconf-2.69.tar.xz: OK
automake-1.12.3.tar.xz: OK
bash-4.2.tar.gz: OK
binutils-2.22.tar.bz2: OK
bison-2.6.2.tar.xz: OK
bzip2-1.0.6.tar.gz: OK
check-0.9.8.tar.gz: OK
coreutils-8.19.tar.xz: OK
dejagnu-1.5.tar.gz: OK
diffutils-3.2.tar.gz: OK
e2fsprogs-1.42.5.tar.gz: OK
expect5.45.tar.gz: OK
file-5.11.tar.gz: OK
findutils-4.4.2.tar.gz: OK
flex-2.5.37.tar.bz2: OK
gawk-4.0.1.tar.xz: OK
gcc-4.7.1.tar.bz2: OK
gdbm-1.10.tar.gz: OK
gettext-0.18.1.1.tar.gz: OK
glibc-2.16.0.tar.xz: OK
gmp-5.0.5.tar.xz: OK
grep-2.14.tar.xz: OK
groff-1.21.tar.gz: OK
grub-2.00.tar.xz: OK
gzip-1.5.tar.xz: OK
iana-etc-2.30.tar.bz2: OK
inetutils-1.9.1.tar.gz: OK
iproute2-3.5.1.tar.xz: OK
kbd-1.15.3.tar.gz: OK
kmod-9.tar.xz: OK
less-444.tar.gz: OK
lfs-bootscripts-20120901.tar.bz2: OK
libpipeline-1.2.1.tar.gz: OK
libtool-2.4.2.tar.gz: OK
linux-3.5.2.tar.xz: OK
m4-1.4.16.tar.bz2: OK
make-3.82.tar.bz2: OK
man-db-2.6.2.tar.xz: OK
man-pages-3.42.tar.xz: OK
mpc-1.0.tar.gz: OK
mpfr-3.1.1.tar.xz: OK
ncurses-5.9.tar.gz: OK
patch-2.6.1.tar.bz2: OK
perl-5.16.1.tar.bz2: OK
pkg-config-0.27.tar.gz: OK
procps-3.2.8.tar.gz: OK
psmisc-22.19.tar.gz: OK
readline-6.2.tar.gz: OK
sed-4.2.1.tar.bz2: OK
shadow-4.1.5.1.tar.bz2: OK
sysklogd-1.5.tar.gz: OK
sysvinit-2.88dsf.tar.bz2: OK
tar-1.26.tar.bz2: OK
tcl8.5.12-src.tar.gz: OK
tzdata2012e.tar.gz: OK
texinfo-4.13a.tar.gz: OK
systemd-188.tar.xz: OK
udev-lfs-188-3.tar.bz2: OK
util-linux-2.21.2.tar.xz: OK
vim-7.3.tar.bz2: OK
xz-5.0.4.tar.xz: OK
zlib-1.2.7.tar.bz2: OK
bash-4.2-fixes-8.patch: OK
binutils-2.22-build_fix-1.patch: OK
bzip2-1.0.6-install_docs-1.patch: OK
coreutils-8.19-i18n-1.patch: OK
flex-2.5.37-bison-2.6.1-1.patch: OK
glibc-2.16.0-res_query_fix-1.patch: OK
kbd-1.15.3-upstream_fixes-1.patch: OK
kbd-1.15.3-backspace-1.patch: OK
kmod-9-testsuite-1.patch: OK
make-3.82-upstream_fixes-2.patch: OK
patch-2.6.1-test_fix-1.patch: OK
perl-5.16.1-libc-2.patch: OK
procps-3.2.8-fix_HZ_errors-1.patch: OK
procps-3.2.8-watch_unicode-1.patch: OK
readline-6.2-fixes-1.patch: OK
sed-4.2.1-testsuite_fixes-1.patch: OK
 
kongu@kongu-Aspire-5820T /mnt/lfs/sources $ popd

5 Final Preparations


Check environment variable $LFS if not correct then 
export LFS=/mnt/lfs
kongu@kongu-Aspire-5820T ~ $ echo $LFS
/mnt/lfs
 

Create /mnt/lfs/tools directory to isolate from working environment
kongu@kongu-Aspire-5820T ~ $ sudo mkdir -v $LFS/tools
mkdir: created directory `/mnt/lfs/tools'
Create /mnt/lfs/tools symlink 
kongu@kongu-Aspire-5820T ~ $ sudo ln -sv $LFS/tools /
`/tools' -> `/mnt/lfs/tools'

Adding the LFS User

kongu@kongu-Aspire-5820T ~ $ sudo groupadd lfs
kongu@kongu-Aspire-5820T ~ $ sudo useradd -s /bin/bash -g lfs -m -k /dev/null lfs
The meaning of the command line options:
-s /bin/bash
This makes bash the default shell for user lfs.
-g lfs
This option adds user lfs to group lfs.
-m
This creates a home directory for lfs.
-k /dev/null
This parameter prevents possible copying of files from a skeleton directory (default is /etc/skel) by changing
the input location to the special null device.
lfs
This is the actual name for the created group and user.
To log in as lfs (as opposed to switching to user lfs when logged in as root, which does not require the lfs
user to have a password)

Give lfs a password: 
kongu@kongu-Aspire-5820T ~ $ sudo passwd lfs
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

Grant lfs full access to $LFS/tools by making lfs the directory owner

kongu@kongu-Aspire-5820T ~ $ sudo chown -v lfs $LFS/tools
changed ownership of `/mnt/lfs/tools' to lfs
kongu@kongu-Aspire-5820T ~ $ sudo chown -v lfs $LFS/sources
changed ownership of `/mnt/lfs/sources' to lfs

Login as lfs
kongu@kongu-Aspire-5820T ~ $ su - lfs
The “-” instructs su to start a login shell as opposed to a non-login shell. The difference between these two types of shells can be found in detail in bash(1) and info bash.
Setting Up the Environment
lfs@kongu-Aspire-5820T ~ $ cat > ~/.bash_profile << "EOF"
> exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
> EOF

When logged on as user lfs, the initial shell is usually a login shell which reads the /etc/profile of the host (probably containing some settings and environment variables) and then .bash_profile. The exec env -i.../bin/bash command in the .bash_profile file replaces the running shell with a new one with a completely empty environment, except for the HOME, TERM, and PS1 variables. This ensures that no unwanted and potentially hazardous environment variables from the host system leak into the build environment. The technique used here achieves the goal of ensuring a clean environment.
The new instance of the shell is a non-login shell, which does not read the /etc/profile or .bash_profile files, but rather reads the .bashrc file instead.
Create the .bashrc file 

lfs@kongu-Aspire-5820T ~ $ cat > ~/.bashrc << "EOF"
> set +h
> umask 022
> LFS=/mnt/lfs
> LC_ALL=POSIX
> LFS_TGT=$(uname -m)-lfs-linux-gnu
> PATH=/tools/bin:/bin:/usr/bin
> export LFS LC_ALL LFS_TGT PATH
> EOF

The set +h command turns off bash's hash function. Hashing is ordinarily a useful feature—bash uses a hash table to remember the full path of executable files to avoid searching the PATH time and again to find the same executable.


However, the new tools should be used as soon as they are installed. By switching off the hash function, the shell will always search the PATH when a program is to be run. As such, the shell will find the newly compiled tools
in $LFS/tools as soon as they are available without remembering a previous version of the same program in a different location.
 

Setting the user file-creation mask (umask) to 022 ensures that newly created files and directories are only writable by their owner, but are readable and executable by anyone (assuming default modes are used by the open(2) system call, new files will end up with permission mode 644 and directories with mode 755).
 

The LFS variable should be set to the chosen mount point.
 

The LC_ALL variable controls the localization of certain programs, making their messages follow the conventions of a specified country. If the host system uses a version of Glibc older than 2.2.4, having LC_ALL set to something other than “POSIX” or “C” (during this chapter) may cause issues if you exit the chroot environment and wish to return later. Setting LC_ALL to “POSIX” or “C” (the two are equivalent) ensures that everything will work as expected in the chroot environment.
 

The LFS_TGT variable sets a non-default, but compatible machine description for use when building our cross compiler and linker and when cross compiling our temporary toolchain. More information is contained in Section 5.2,
 

“Toolchain Technical Notes”.
By putting /tools/bin ahead of the standard PATH, all the programs installed in Chapter 5 are picked up by the shell immediately after their installation. This, combined with turning off hashing, limits the risk that old programs
are used from the host when the same programs are available in the chapter 5 environment.

Finally, to have the environment fully prepared for building the temporary tools, source the just-created user profile:
lfs@kongu-Aspire-5820T ~ $ source ~/.bash_profile
Check the number of CPUs for parallel processing

lfs@kongu-Aspire-5820T ~ $ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 37
model name      : Intel(R) Core(TM) i5 CPU       M 480  @ 2.67GHz
stepping        : 5
cpu MHz         : 1199.000
cache size      : 3072 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida arat dts tpr_shadow vnmi flexpriority ept vpid
bogomips        : 5321.00
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 37
model name      : Intel(R) Core(TM) i5 CPU       M 480  @ 2.67GHz
stepping        : 5
cpu MHz         : 1199.000
cache size      : 3072 KB
physical id     : 0
siblings        : 4
core id         : 0
cpu cores       : 2
apicid          : 1
initial apicid  : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida arat dts tpr_shadow vnmi flexpriority ept vpid
bogomips        : 5320.82
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 2
vendor_id       : GenuineIntel
cpu family      : 6
model           : 37
model name      : Intel(R) Core(TM) i5 CPU       M 480  @ 2.67GHz
stepping        : 5
cpu MHz         : 1199.000
cache size      : 3072 KB
physical id     : 0
siblings        : 4
core id         : 2
cpu cores       : 2
apicid          : 4
initial apicid  : 4
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida arat dts tpr_shadow vnmi flexpriority ept vpid
bogomips        : 5320.84
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 3
vendor_id       : GenuineIntel
cpu family      : 6
model           : 37
model name      : Intel(R) Core(TM) i5 CPU       M 480  @ 2.67GHz
stepping        : 5
cpu MHz         : 1199.000
cache size      : 3072 KB
physical id     : 0
siblings        : 4
core id         : 2
cpu cores       : 2
apicid          : 5
initial apicid  : 5
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida arat dts tpr_shadow vnmi flexpriority ept vpid
bogomips        : 5320.83
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

Set 4 simultaneous jobs for make as there are 4 processors
lfs@kongu-Aspire-5820T ~ $ export MAKEFLAGS='-j 4'

6. Constructing a temporary System

Check Environment variable is set properly
lfs@kongu-Aspire-5820T ~ $ echo $LFS
/mnt/lfs


Change to sources directory
lfs@kongu-Aspire-5820T ~ $ cd /mnt/lfs/sources
Extract Package with tar from list following as lfs

lfs@kongu-Aspire-5820T /mnt/lfs/sources $ tar -xvf binutils-2.22.tar.bz2
Change to the directory to where the package was extracted    
lfs@kongu-Aspire-5820T /mnt/lfs/sources $ cd binutils-2.22/Apply patch to binutils   
lfs@kongu-Aspire-5820T /mnt/lfs/sources/binutils-2.22 $ patch -Np1 -i ../binutils-2.22-build_fix-1.patch
patching file opcodes/ChangeLog
patching file opcodes/i386-dis.c

Create bindutils-build directory and move there
lfs@kongu-Aspire-5820T /mnt/lfs/sources/binutils-2.22 $ mkdir -v ../binutils-build
mkdir: created directory `../binutils-build'
lfs@kongu-Aspire-5820T /mnt/lfs/sources/binutils-2.22 $ cd ../binutils-build/

Compile binutils Pass 1

lfs@kongu-Aspire-5820T /mnt/lfs/sources/binutils-build $ ../binutils-2.22/configure \
> --prefix=/tools \
> --with-sysroot=$LFS \
> --with-lib-path=/tools/lib \
> --target=$LFS_TGT \
> --disable-nls \
> --disable-werror

The meaning of the configure options:
--prefix=/tools
This tells the configure script to prepare to install the Binutils programs in the /tools directory.
--with-sysroot=$LFS
For cross compilation, this tells the build system to look in $LFS for the target system libraries as needed.
--with-lib-path=/tools/lib
This specifies which library path the linker should be configured to use.
--target=$LFS_TGT
Because the machine description in the LFS_TGT variable is slightly different than the value returned by the config.guess script, this switch will tell the configure script to adjust Binutil's build system for building a cross linker.
--disable-nls
This disables internationalization as i18n is not needed for the temporary tools.
--disable-werror
This prevents the build from stopping in the event that there are warnings from the host's compiler.

 

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-lfs-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for objdir... .libs
checking for PWL_handle_timeout in -lpwl... no
checking for version 0.11 (revision 0 or later) of PPL... no
checking for default BUILD_CONFIG...
checking for bison... bison -y
checking for bison... bison
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... no
checking for lex... no
checking for flex... no
checking for makeinfo... makeinfo
checking for expect... no
checking for runtest... no
checking for ar... ar
checking for as... as
checking for dlltool... no
checking for ld... ld
checking for lipo... no
checking for nm... nm
checking for ranlib... ranlib
checking for strip... strip
checking for windres... no
checking for windmc... no
checking for objcopy... objcopy
checking for objdump... objdump
checking for x86_64-lfs-linux-gnu-cc... no
checking for x86_64-lfs-linux-gnu-gcc... no
checking for x86_64-lfs-linux-gnu-c++... no
checking for x86_64-lfs-linux-gnu-g++... no
checking for x86_64-lfs-linux-gnu-cxx... no
checking for x86_64-lfs-linux-gnu-gxx... no
checking for x86_64-lfs-linux-gnu-gcc... no
checking for x86_64-lfs-linux-gnu-gcj... no
checking for x86_64-lfs-linux-gnu-gfortran... no
checking for x86_64-lfs-linux-gnu-gccgo... no
checking for x86_64-lfs-linux-gnu-ar... no
checking for x86_64-lfs-linux-gnu-as... no
checking for x86_64-lfs-linux-gnu-dlltool... no
checking for x86_64-lfs-linux-gnu-ld... no
checking for x86_64-lfs-linux-gnu-lipo... no
checking for x86_64-lfs-linux-gnu-nm... no
checking for x86_64-lfs-linux-gnu-objdump... no
checking for x86_64-lfs-linux-gnu-ranlib... no
checking for x86_64-lfs-linux-gnu-strip... no
checking for x86_64-lfs-linux-gnu-windres... no
checking for x86_64-lfs-linux-gnu-windmc... no
checking where to find the target ar... just compiled
checking where to find the target as... just compiled
checking where to find the target cc... pre-installed
checking where to find the target c++... pre-installed
checking where to find the target c++ for libstdc++... pre-installed
checking where to find the target dlltool... just compiled
checking where to find the target gcc... pre-installed
checking where to find the target gcj... pre-installed
checking where to find the target gfortran... pre-installed
checking where to find the target gccgo... pre-installed
checking where to find the target ld... just compiled
checking where to find the target lipo... pre-installed
checking where to find the target nm... just compiled
checking where to find the target objdump... just compiled
checking where to find the target ranlib... just compiled
checking where to find the target strip... just compiled
checking where to find the target windres... just compiled
checking where to find the target windmc... just compiled
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether -fkeep-inline-functions is supported... yes
configure: creating ./config.status
config.status: creating Makefile
Make binutils 

lfs@kongu-Aspire-5820T /mnt/lfs/sources/binutils-build $ make
Make install binutils
lfs@kongu-Aspire-5820T /mnt/lfs/sources/binutils-build $ make install
Change back to source directory

lfs@kongu-Aspire-5820T /mnt/lfs/sources/binutils-build $ cd ..     
Binutils installs its assembler and linker in two locations, /tools/bin and /tools/$LFS_TGT/bin ($LFS_TGT). 
fs@kongu-Aspire-5820T /mnt/lfs/tools/bin $ ls -al
total 69752
drwxr-xr-x 2 lfs lfs     4096 Nov 30 15:40 .
drwxr-xr-x 6 lfs root    4096 Nov 30 15:40 ..
-rwxr-xr-x 1 lfs lfs  4311536 Nov 30 15:40 x86_64-lfs-linux-gnu-addr2line
-rwxr-xr-x 2 lfs lfs  4461442 Nov 30 15:40 x86_64-lfs-linux-gnu-ar
-rwxr-xr-x 2 lfs lfs  6058037 Nov 30 15:40 x86_64-lfs-linux-gnu-as
-rwxr-xr-x 1 lfs lfs  4272415 Nov 30 15:40 x86_64-lfs-linux-gnu-c++filt
-rwxr-xr-x 1 lfs lfs    87192 Nov 30 15:40 x86_64-lfs-linux-gnu-elfedit
-rwxr-xr-x 1 lfs lfs  4785501 Nov 30 15:40 x86_64-lfs-linux-gnu-gprof
-rwxr-xr-x 4 lfs lfs  6298414 Nov 30 15:40 x86_64-lfs-linux-gnu-ld
-rwxr-xr-x 4 lfs lfs  6298414 Nov 30 15:40 x86_64-lfs-linux-gnu-ld.bfd
-rwxr-xr-x 2 lfs lfs  4345989 Nov 30 15:40 x86_64-lfs-linux-gnu-nm
-rwxr-xr-x 2 lfs lfs  5117226 Nov 30 15:40 x86_64-lfs-linux-gnu-objcopy
-rwxr-xr-x 2 lfs lfs  6136677 Nov 30 15:40 x86_64-lfs-linux-gnu-objdump
-rwxr-xr-x 2 lfs lfs  4461465 Nov 30 15:40 x86_64-lfs-linux-gnu-ranlib
-rwxr-xr-x 1 lfs lfs   998419 Nov 30 15:40 x86_64-lfs-linux-gnu-readelf
-rwxr-xr-x 1 lfs lfs  4327036 Nov 30 15:40 x86_64-lfs-linux-gnu-size
-rwxr-xr-x 1 lfs lfs  4299806 Nov 30 15:40 x86_64-lfs-linux-gnu-strings
-rwxr-xr-x 2 lfs lfs  5117225 Nov 30 15:40 x86_64-lfs-linux-gnu-strip

 

lfs@kongu-Aspire-5820T /mnt/lfs/tools/x86_64-lfs-linux-gnu/bin $ ls -al
total 47196
drwxr-xr-x 2 lfs lfs    4096 Nov 30 15:40 .
drwxr-xr-x 4 lfs lfs    4096 Nov 30 15:40 ..
-rwxr-xr-x 2 lfs lfs 4461442 Nov 30 15:40 ar
-rwxr-xr-x 2 lfs lfs 6058037 Nov 30 15:40 as
-rwxr-xr-x 4 lfs lfs 6298414 Nov 30 15:40 ld
-rwxr-xr-x 4 lfs lfs 6298414 Nov 30 15:40 ld.bfd
-rwxr-xr-x 2 lfs lfs 4345989 Nov 30 15:40 nm
-rwxr-xr-x 2 lfs lfs 5117226 Nov 30 15:40 objcopy
-rwxr-xr-x 2 lfs lfs 6136677 Nov 30 15:40 objdump
-rwxr-xr-x 2 lfs lfs 4461465 Nov 30 15:40 ranlib
-rwxr-xr-x 2 lfs lfs 5117225 Nov 30 15:40 strip
 

Delete the extracted source directory and any -build directories that were created in the build process unless instructed otherwise.lfs@kongu-Aspire-5820T /mnt/lfs/sources $ rm -rf binutils-2.22
lfs@kongu-Aspire-5820T /mnt/lfs/sources $ rm -rf binutils-build/
Installation of Cross gcc Pass 1lfs@kongu-Aspire-5820T /mnt/lfs/sources $ tar -xvf gcc-4.7.1.tar.bz2
lfs@kongu-Aspire-5820T /mnt/lfs/sources $ cd gcc-4.7.1/
lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-4.7.1 $ tar -Jxf ../mpfr-3.1.1.tar.xz

lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-4.7.1 $ mv -v mpfr-3.1.1/ mpfr
`mpfr-3.1.1/' -> `mpfr'

lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-4.7.1 $ tar -Jxf ../gmp-5.0.5.tar.xz 
lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-4.7.1 $ mv -v gmp-5.0.5/ gmp 
`gmp-5.0.5/' -> `gmp'
lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-4.7.1 $ tar -zxf ../mpc-1.0.tar.gz
lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-4.7.1 $ mv -v mpc-1.0/ mpc 
`mpc-1.0/' -> `mpc'

The following command will change the location of GCC's default dynamic linker to use the one installed in /tools. It also removes /usr/include from GCC's include search path. Issue:
for file in  $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h); do  cp -uv $file{,.orig};  sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g'      -e 's@/usr@/tools@g' $file.orig > $file ;  echo '
#undef STANDARD_STARTFILE_PREFIX_1
#undef STANDARD_STARTFILE_PREFIX_2
#undef STANDARD_STARTFILE_PREFIX_1 "/tools/lib/"
for file in  $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h); do  cp -uv $file{,.orig};  sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g'      -e 's@/usr@/tools@g' $file.orig > $file ;  echo ' touch $file.orig; done

In case the above seems hard to follow, let's break it down a bit. First we find all the files under the gcc/config directory that are named either linux.h, linux64.h or sysv4.h. For each file found, we copy it to a file of the same name but with an added suffix of “.orig”. Then the first sed expression prepends “/tools” to every instance of “/lib/ld”, “/lib64/ld” or “/lib32/ld”, while the second one replaces hard-coded instances of “/usr”. Next, we add our
define statements which alter the default startfile prefix to the end of the file. Note that the trailing “/” in “/tools/lib/” is required. Finally, we use touch to update the timestamp on the copied files. When used in conjunction with cp -u, this prevents unexpected changes to the original files in case the commands are inadvertently run twice.

GCC doesn't detect stack protection correctly, which causes problems for the build of Glibc-2.16.0, so fix that by issuing the following command:
lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-4.7.1 $ sed -i '/k prot/agcc_cv_libc_provides_ssp=yes' gcc/configure
The GCC documentation recommends building GCC outside of the source directory in a dedicated build directory:
lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-4.7.1 $ mkdir -v ../gcc-build
mkdir: created directory `../gcc-build'
lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-4.7.1 $ cd ../gcc-build
lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-build $

Prepare gcc for compilation

lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-build $ ../gcc-4.7.1/configure --target=$LFS_TGT \
> --prefix=/tools \
> --with-sysroot=$LFS \
> --with-newlib \
> --without-headers \
> --with-local-prefix=/tools \
> --with-native-system-header-dir=/tools/include \
> --disable-nls \
> --disable-shared \
> --disable-multilib \
> --disable-decimal-float \
> --disable-threads \
> --disable-libmudflap \
> --disable-libssp \
> --disable-libgomp \
> --disable-libquadmath \
> --enable-languages=c \
> --with-mpfr-include=$(pwd)/../gcc-4.7.1/mpfr/src \
> --with-mpfr-lib=$(pwd)/mpfr/src/.libs

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-lfs-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for libitm support... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for objdir... .libs
checking for PWL_handle_timeout in -lpwl... no
checking for version 0.11 (revision 0 or later) of PPL... no
*** This configuration is not supported in the following subdirectories:
     target-libquadmath gnattools target-libada target-libstdc++-v3 target-libgfortran target-libgo target-libffi target-zlib target-libjava target-libobjc target-libgomp target-libmudflap target-libssp target-boehm-gc target-libitm
    (Any other directories should still work fine.)
checking for default BUILD_CONFIG...
checking for bison... bison -y
checking for bison... bison
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... no
checking for lex... no
checking for flex... no
checking for makeinfo... makeinfo
checking for expect... no
checking for runtest... no
checking for ar... ar
checking for as... as
checking for dlltool... no
checking for ld... ld
checking for lipo... no
checking for nm... nm
checking for ranlib... ranlib
checking for strip... strip
checking for windres... no
checking for windmc... no
checking for objcopy... objcopy
checking for objdump... objdump
checking for readelf... readelf
checking for x86_64-lfs-linux-gnu-cc... no
checking for x86_64-lfs-linux-gnu-gcc... no
checking for x86_64-lfs-linux-gnu-c++... no
checking for x86_64-lfs-linux-gnu-g++... no
checking for x86_64-lfs-linux-gnu-cxx... no
checking for x86_64-lfs-linux-gnu-gxx... no
checking for x86_64-lfs-linux-gnu-gcc... no
checking for x86_64-lfs-linux-gnu-gcj... no
checking for x86_64-lfs-linux-gnu-gfortran... no
checking for x86_64-lfs-linux-gnu-gccgo... no
checking for ar... /tools/x86_64-lfs-linux-gnu/bin/ar
checking for as... /tools/x86_64-lfs-linux-gnu/bin/as
checking for dlltool... no
checking for x86_64-lfs-linux-gnu-dlltool... no
checking for ld... /tools/x86_64-lfs-linux-gnu/bin/ld
checking for lipo... no
checking for x86_64-lfs-linux-gnu-lipo... no
checking for nm... /tools/x86_64-lfs-linux-gnu/bin/nm
checking for objdump... /tools/x86_64-lfs-linux-gnu/bin/objdump
checking for ranlib... /tools/x86_64-lfs-linux-gnu/bin/ranlib
checking for readelf... no
checking for x86_64-lfs-linux-gnu-readelf... x86_64-lfs-linux-gnu-readelf
checking for strip... /tools/x86_64-lfs-linux-gnu/bin/strip
checking for windres... no
checking for x86_64-lfs-linux-gnu-windres... no
checking for windmc... no
checking for x86_64-lfs-linux-gnu-windmc... no
checking where to find the target ar... pre-installed in /tools/x86_64-lfs-linux-gnu/bin
checking where to find the target as... pre-installed in /tools/x86_64-lfs-linux-gnu/bin
checking where to find the target cc... just compiled
checking where to find the target c++... pre-installed
checking where to find the target c++ for libstdc++... pre-installed
checking where to find the target dlltool... pre-installed
checking where to find the target gcc... just compiled
checking where to find the target gcj... pre-installed
checking where to find the target gfortran... pre-installed
checking where to find the target gccgo... pre-installed
checking where to find the target ld... pre-installed in /tools/x86_64-lfs-linux-gnu/bin
checking where to find the target lipo... pre-installed
checking where to find the target nm... pre-installed in /tools/x86_64-lfs-linux-gnu/bin
checking where to find the target objdump... pre-installed in /tools/x86_64-lfs-linux-gnu/bin
checking where to find the target ranlib... pre-installed in /tools/x86_64-lfs-linux-gnu/bin
checking where to find the target readelf... pre-installed
checking where to find the target strip... pre-installed in /tools/x86_64-lfs-linux-gnu/bin
checking where to find the target windres... pre-installed
checking where to find the target windmc... pre-installed
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether -fkeep-inline-functions is supported... yes
configure: creating ./config.status
config.status: creating Makefile

The meaning of the configure options:--with-newlib
Since a working C library is not yet available, this ensures that the inhibit_libc constant is defined when building libgcc. This prevents the compiling of any code that requires libc support.
--without-headers
When creating a complete cross-compiler, GCC requires standard headers compatible with the target system. For our purposes these headers will not be needed. This switch prevents GCC from looking for them.
--with-local-prefix=/tools
The local prefix is the location in the system that GCC will search for locally installed include files. The default is /usr/local. Setting this to /tools helps keep the host location of /usr/local out of this GCC's search path.
--with-native-system-header-dir=/tools/include
By default GCC searches /usr/include for system headers. In conjunction with the sysroot switch, this would translate normally to $LFS/usr/include. However the headers that will be installed in the next two sections will go to $LFS/tools/include. This switch ensures that gcc will find them correctly. In the second pass of GCC, this same switch will ensure that no headers from the host system are found.
--disable-shared
This switch forces GCC to link its internal libraries statically. We do this to avoid possible issues with the host system.
--disable-decimal-float,
--disable-threads,
--disable-libmudflap,
--disable-libssp, --disable-libgomp, --disable-libquadmath

These switches disable support for the decimal floating point extension, threading, libmudflap, libssp and libgomp and libquadmath respectively. These features will fail to compile when building a cross-compiler and
are not necessary for the task of cross-compiling the temporary libc.
--disable-multilib
On x86_64, LFS does not yet support a multilib configuration. This switch is harmless for x86.
--enable-languages=c
This option ensures that only the C compiler is built. This is the only language needed now.

Compile GCC by running:

lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-build $ make     
Install the package:
 

lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-build $ make install
Using --disable-shared means that the libgcc_eh.a file isn't created and installed. The Glibc package depends on this library as it uses -lgcc_eh within its build system. This dependency can be satisfied by creating a symlink to libgcc.a, since that file will end up containing the objects normally contained in libgcc_eh.a:
 

fs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-build $ ln -vs libgcc.a `$LFS_TGT-gcc -print-libgcc-file-name | sed 's/libgcc/&_eh/'`
`/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.7.1/libgcc_eh.a' -> `libgcc.a'

Return to /mnt/lfs/source and remove directories

lfs@kongu-Aspire-5820T /mnt/lfs/sources/gcc-build $ cd ..
lfs@kongu-Aspire-5820T /mnt/lfs/sources $ rm -rf gcc-4.7.1
lfs@kongu-Aspire-5820T /mnt/lfs/sources $ rm -rf gcc-build/