introduction.xml 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-system-introduction">
  8. <?dbhtml filename="introduction.html"?>
  9. <title>Introduction</title>
  10. <para>In this chapter, we enter the building site and start constructing the
  11. LFS system in earnest. That is, we chroot into the temporary mini Linux system,
  12. make a few final preparations, and then begin installing the packages.</para>
  13. <para>The installation of this software is straightforward. Although in many
  14. cases the installation instructions could be made shorter and more generic,
  15. we have opted to provide the full instructions for every package to minimize
  16. the possibilities for mistakes. The key to learning what makes a Linux system
  17. work is to know what each package is used for and why you (or the system)
  18. may need it.</para>
  19. <para>We do not recommend using optimizations. They can make
  20. a program run slightly faster, but they may also cause compilation
  21. difficulties and problems when running the program. If a package refuses to
  22. compile when using optimization, try to compile it without optimization and
  23. see if that fixes the problem. Even if the package does compile when using
  24. optimization, there is the risk it may have been compiled incorrectly because
  25. of the complex interactions between the code and build tools. Also note that
  26. the <option>-march</option> and <option>-mtune</option> options using values
  27. not specified in the book have not been tested. This may cause problems with
  28. the toolchain packages (Binutils, GCC and Glibc). The small potential gains
  29. achieved in using compiler optimizations are often outweighed by the risks.
  30. First-time builders of LFS are encouraged to build without custom
  31. optimizations. The subsequent system will still run very fast and be stable
  32. at the same time.</para>
  33. <para>The order that packages are installed in this chapter needs to be
  34. strictly followed to ensure that no program accidentally acquires a path
  35. referring to <filename class="directory">/tools</filename> hard-wired into
  36. it. For the same reason, do not compile separate packages in parallel.
  37. Compiling in parallel may save time (especially on dual-CPU machines), but it
  38. could result in a program containing a hard-wired path to <filename
  39. class="directory">/tools</filename>, which will cause the program to stop
  40. working when that directory is removed.</para>
  41. <para>Before the installation instructions, each installation page provides
  42. information about the package, including a concise description of what it
  43. contains, approximately how long it will take to build, and how much disk
  44. space is required during this building process. Following the installation
  45. instructions, there is a list of programs and libraries (along with brief
  46. descriptions of these) that the package installs.</para>
  47. <note><para>The SBU values and required disk space includes
  48. test suite data for all applicable packages in Chapter 6.</para></note>
  49. <sect2>
  50. <title>About libraries</title>
  51. <para>In general, the LFS editors discourage building and installing static
  52. libraries. The original purpose for most static libraries has been made
  53. obsolete in a modern Linux system. In addition linking a static library
  54. into a program can be detrimental. If an update to the library is needed
  55. to remove a security problem, all programs that use the static library will
  56. need to be relinked to the new library. Since the use of static libraries
  57. is not always obvious, the relevant programs (and the procedures needed to
  58. do the linking) may not even be known.</para>
  59. <para>In the procedures in Chapter 6, we remove or disable installation of
  60. most static libraries. In a few cases, especially glibc and gcc, the use
  61. of static libraries remains essential to the general package building
  62. process. Usually this is done by passing a
  63. <option>--disable-static</option> option to <command>configure</command>.
  64. In other cases, alternate means are needed.</para>
  65. <para>For a more complete discussion of libraries, see the discussion
  66. <ulink url="&blfs-root;/view/&short-version;/introduction/libraries.html">
  67. Libraries: Static or shared?</ulink> in the BLFS book.</para>
  68. </sect2>
  69. </sect1>