DELAEMON BLOG

Live as if you were to die tomorrow. Learn as if you were to live forever.

Build coreutils on Fedora22

Fedora22上にcoreutilsをビルドする。

コードを用意して、./bootstrapを実行すると、必要なパッケージがわかる

git clone git@github.com:coreutils/coreutils.git
cd coreutils
./bootstrap
./bootstrap: line 424: autoconf: command not found
./bootstrap: Error: 'autoconf' not found
./bootstrap: line 424: automake: command not found
./bootstrap: Error: 'automake' not found
./bootstrap: line 424: autopoint: command not found
./bootstrap: Error: 'autopoint' not found
./bootstrap: line 221: bison: command not found
./bootstrap: Error: 'bison' not found
./bootstrap: line 221: gperf: command not found
./bootstrap: Error: 'gperf' not found
./bootstrap: line 424: makeinfo: command not found
./bootstrap: Error: 'makeinfo' not found
./bootstrap: line 221: patch: command not found
./bootstrap: Error: 'patch' not found

必要なものをインストール

sudo dnf install automake bison gperf patch gettext-devel texinfo

configure, make

./configure --prefix=${HOME}/bin/coreutils
make CFLAGS='-g'
make install

prefixで指定したディレクトリにビルドされたものが配置されてる

/home/user/bin/coreutils/bin/ls

ls以外のコマンドも出来てる。
次回はからは必要なものだけ make src/xxxで良い。