C. 依赖关系

LFS 中的每一个软件包要想正常构建并安装,都依赖于一个或者多个其它软件包。有些软件包还会出现循环依赖的情况。也就是,第一个软件包依赖于第二个,而第二个也依赖于第一个。因为这些依赖关系,LFS 软件包的构建顺序就非常重要。本页记述了 LFS 中每一个软件包构建时的以来关系。

对于每一个我们构建的软件包,都列出了三种依赖关系。首先是,要构建该软件包,需要首先构建哪些软件包。其次是,除了第一行的内容外,要运行软件包的测试套件,还需要哪些软件包。最后是,有哪些软件包在构建时依赖于当前软件包。大多数情况下,产生这种现象的原因,都是因为它们的脚本中直接引用了其它软件包的二进制文件的路径。如果不按照特定的顺序构建,有可能导致形如 /tools/bin/[binary] 的路径被写入最终系统的脚本中。很显然,这是我们不希望看到的。

Autoconf

Installation depends on: Bash, Coreutils, Grep, M4, Make, Perl, Sed, and Texinfo
Test suite depends on: Automake, Diffutils, Findutils, GCC, and Libtool
Must be installed before: Automake

Automake

Installation depends on: Autoconf, Bash, Coreutils, Gettext, Grep, M4, Make, Perl, Sed, and Texinfo
Test suite depends on: Binutils, Bison, Bzip2, DejaGNU, Diffutils, Expect, Findutils, Flex, GCC, Gettext, Gzip, Libtool, and Tar. Can also use several other packages that are not installed in LFS.
Must be installed before: None

Bash

Installation depends on: Bash, Bison, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep, Make, Ncurses, Patch, Readline, Sed, and Texinfo
Test suite depends on: None
Must be installed before: None

Berkeley DB

Installation depends on: Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep, Make, and Sed
Test suite depends on: Not run. Requires TCL installed on the final system
Must be installed before: None

Binutils

Installation depends on: Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, Make, Perl, Sed, and Texinfo
Test suite depends on: DejaGNU and Expect
Must be installed before: None

Bison

Installation depends on: Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, M4, Make, and Sed
Test suite depends on: Diffutils and Findutils
Must be installed before: Flex, Kbd, and Tar

Bzip2

Installation depends on: Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Make, and Patch
Test suite depends on: None
Must be installed before: None

Coreutils

Installation depends on: Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, Make, Patch, Perl, Sed, and Texinfo
Test suite depends on: Diffutils, E2fsprogs
Must be installed before: Bash, Diffutils, Findutils, Man-DB, and Udev

DejaGNU

Installation depends on: Bash, Coreutils, Diffutils, GCC, Grep, Make, and Sed
Test suite depends on: No testsuite available
Must be installed before: None

Diffutils

Installation depends on: Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, Make, Patch, Sed, and Texinfo
Test suite depends on: No testsuite available
Must be installed before: None

Expect

Installation depends on: Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make, Patch, Sed, and Tcl
Test suite depends on: None
Must be installed before: None

E2fsprogs

Installation depends on: Bash, Binutils, Coreutils, Gawk, GCC, Gettext, Glibc, Grep, Gzip, Make, Sed, and Texinfo
Test suite depends on: Diffutils
Must be installed before: Util-Linux

File

Installation depends on: Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep, Make, Sed, and Zlib
Test suite depends on: No testsuite available
Must be installed before: None

Findutils

Installation depends on: Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, Make, Sed, and Texinfo
Test suite depends on: DejaGNU, Diffutils, and Expect
Must be installed before: None

Flex

Installation depends on: Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, M4, Make, Patch, Sed, and Texinfo
Test suite depends on: Bison and Gawk
Must be installed before: IPRoute2, Kbd, and Man-DB

Gawk

Installation depends on: Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, Make, Patch, Sed and, Texinfo
Test suite depends on: Diffutils
Must be installed before: None

Gcc

Installation depends on: Bash, Binutils, Coreutils, Diffutils, Findutils, Gawk, GCC, Gettext, Glibc, GMP (Chapter 6), Grep, M4 (Chapter 5), Make, MPFR (Chapter 6), Patch, Perl, Sed, Tar, and Texinfo
Test suite depends on: DejaGNU and Expect
Must be installed before: None

Gettext

Installation depends on: Bash, Binutils, Coreutils, Gawk, GCC, Glibc, Grep, Make, Sed, and Texinfo
Test suite depends on: Diffutils, Perl, and Tcl
Must be installed before: Automake

Glibc

Installation depends on: Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Gettext, Grep, Gzip, Make, Perl, Sed, and Texinfo
Test suite depends on: None
Must be installed before: None

GMP

Installation depends on: Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep, M4, Make, Sed and Texinfo
Test suite depends on: None
Must be installed before: MPFR, GCC

Grep

Installation depends on: Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, Make, Patch, Sed, and Texinfo
Test suite depends on: Gawk
Must be installed before: Man-DB

Groff

Installation depends on: Bash, Binutils, Bison, Coreutils, Gawk, GCC, Glibc, Grep, Make, Patch, Sed, and Texinfo
Test suite depends on: No testsuite available
Must be installed before: Man-DB and Perl

GRUB

Installation depends on: Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make, Ncurses, Sed, and Texinfo
Test suite depends on: None
Must be installed before: None

Gzip

Installation depends on: Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, Sed, and Texinfo
Test suite depends on: Diffutils
Must be installed before: Man-DB

Iana-Etc

Installation depends on: Coreutils, Gawk, and Make
Test suite depends on: No testsuite available
Must be installed before: Perl

Inetutils

Installation depends on: Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, Ncurses, Patch, Sed, and Texinfo
Test suite depends on: No testsuite available
Must be installed before: Tar

IProute2

Installation depends on: Bash, Berkeley DB, Bison, Coreutils, Flex, GCC, Glibc, Make, and Linux API Headers
Test suite depends on: No testsuite available
Must be installed before: None

Kbd

Installation depends on: Bash, Binutils, Bison, Coreutils, Flex, GCC, Gettext, Glibc, Gzip, Make, Patch, and Sed
Test suite depends on: No testsuite available
Must be installed before: None

Less

Installation depends on: Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make, Ncurses, and Sed
Test suite depends on: No testsuite available
Must be installed before: None

Libtool

Installation depends on: Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep, Make, Sed, and Texinfo
Test suite depends on: Findutils
Must be installed before: None

Linux Kernel

Installation depends on: Bash, Binutils, Coreutils, Diffutils, Findutils, GCC, Glibc, Grep, Gzip, Make, Module-Init-Tools, Ncurses, and Sed
Test suite depends on: No testsuite available
Must be installed before: None

M4

Installation depends on: Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, Sed, and Texinfo
Test suite depends on: Diffutils
Must be installed before: Autoconf and Bison

Make

Installation depends on: Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, Make, Sed, and Texinfo
Test suite depends on: Perl and Procps
Must be installed before: None

Man-DB

Installation depends on: Bash, Berkeley DB, Binutils, Bzip2, Coreutils, Flex, GCC, Gettext, Glibc, Grep, Groff, Gzip, Less, Make, and Sed
Test suite depends on: Not run. Requires Man-DB testsuite package
Must be installed before: None

Module-Init-Tools

Installation depends on: Bash, Binutils, Coreutils, Findutils, GCC, Glibc, Grep, Make, Patch, Sed, and Zlib
Test suite depends on: Diffutils, File, Gawk, Gzip, and Mktemp
Must be installed before: None

MPFR

Installation depends on: Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep, GMP, Make, Sed and Texinfo
Test suite depends on: None
Must be installed before: GCC

Ncurses

Installation depends on: Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep, Make, Patch, and Sed
Test suite depends on: No testsuite available
Must be installed before: Bash, GRUB, Inetutils, Less, Procps, Psmisc, Readline, Texinfo, Util-Linux, and Vim

Patch

Installation depends on: Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, and Sed
Test suite depends on: No testsuite available
Must be installed before: None

Perl

Installation depends on: Bash, Berkeley DB, Binutils, Coreutils, Gawk, GCC, Glibc, Grep, Groff, Make, Sed, and Zlib
Test suite depends on: Iana-Etc and Procps
Must be installed before: Autoconf

Procps

Installation depends on: Bash, Binutils, Coreutils, GCC, Glibc, Make, and Ncurses
Test suite depends on: No testsuite available
Must be installed before: None

Psmisc

Installation depends on: Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, Make, Ncurses, and Sed
Test suite depends on: No testsuite available
Must be installed before: None

Readline

Installation depends on: Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, Ncurses, Patch, Sed, and Texinfo
Test suite depends on: No testsuite available
Must be installed before: Bash

Sed

Installation depends on: Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, Make, Sed, and Texinfo
Test suite depends on: Diffutils and Gawk
Must be installed before: E2fsprogs, File, Libtool, and Shadow

Shadow

Installation depends on: Bash, Binutils, Coreutils, Diffutils, Findutils, Gawk, GCC, Gettext, Glibc, Grep, Make, and Sed
Test suite depends on: No testsuite available
Must be installed before: None

Sysklogd

Installation depends on: Binutils, Coreutils, GCC, Glibc, Make, and Patch
Test suite depends on: No testsuite available
Must be installed before: None

Sysvinit

Installation depends on: Binutils, Coreutils, GCC, Glibc, Make, and Sed
Test suite depends on: No testsuite available
Must be installed before: None

Tar

Installation depends on: Bash, Binutils, Bison, Coreutils, GCC, Gettext, Glibc, Grep, Inetutils, Make, Sed, and Texinfo
Test suite depends on: Diffutils, Findutils, Gawk, and Gzip
Must be installed before: None

Tcl

Installation depends on: Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make, and Sed
Test suite depends on: None
Must be installed before: None

Texinfo

Installation depends on: Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, Make, Ncurses, Patch, and Sed
Test suite depends on: None
Must be installed before: None

Udev

Installation depends on: Binutils, Coreutils, GCC, Glibc, and Make
Test suite depends on: Findutils, Perl, and Sed
Must be installed before: None

Util-Linux

Installation depends on: Bash, Binutils, Coreutils, E2fprogs, GCC, Gettext, Glibc, Grep, Make, Ncurses, Patch, Sed, and Zlib
Test suite depends on: No testsuite available
Must be installed before: None

Vim

Installation depends on: Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make, Ncurses, and Sed
Test suite depends on: None
Must be installed before: None

Zlib

Installation depends on: Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, and Sed
Test suite depends on: None
Must be installed before: File, Module-Init-Tools, Perl, and Util-Linux

Host by Unixetc