LFS on Ubuntu(6) 一時的環境の構築 (Expect-5.43.0 〜)

Expect の解凍

tar zxvf expect-5.43.0.tar.gz
cd expect-5.43

バグフィックス

// GCC のテストスイートの失敗を回避
patch -Np1 -i ../expect-5.43.0-spawn-1.patch

// Tcl の最近の変更に対応
patch -Np1 -i ../expect-5.43.0-tcl_8.5.5_fix-1.patch

Expect の configure スクリプトが、ホストシステムの /usr/local/bin/stty ではなく、 /bin/stty を利用するように修正

cp -v configure{,.orig}
sed 's:/usr/local/bin:/bin:' configure.orig > configure

Expect をコンパイルするための準備

./configure --prefix=/tools --with-tcl=/tools/lib \
  --with-tclinclude=/tools/include --with-x=no

Expect のインストール

make
make test
make SCRIPTS="" install

DejaGNU のインストール

tar zxvf dejagnu-1.4.4.tar.gz
cd dejagnu-1.4.4
./configure --prefix=/tools
make install
make check

Ncurses のインストール

tar zxvf ncurses-5.7.tar.gz
cd ncurses-5.7
./configure --prefix=/tools --with-shared \
    --without-debug --without-ada --enable-overwrite
make
make install

Bash のインストール

tar zxvf bash-4.1.tar.gz
./configure --prefix=/tools --without-bash-malloc
make
make tests
make install
ln -vs bash /tools/bin/sh

Bzip2 のインストール

tar zxvf bzip2-1.0.5.tar.gz
cd bzip2-1.0.5
make PREFIX=/tools install

Coreutils のインストール

tar zxvf coreutils-8.4.tar.gz
cd coreutils-8.4
./configure --prefix=/tools --enable-install-program=hostname
make
make install

別名ファイルを作り出して手動で su をインストールする

cp -v src/su /tools/bin/su-tools

Diffutils のインストール

tar zxvf diffutils-2.8.1.tar.gz
cd diffutils-2.8.1
./configure --prefix=/tools
make
make install