Changeset aad85a6 for chapter06


Ignore:
Timestamp:
04/20/2015 11:28:26 AM (9 years ago)
Author:
Krejzi <krejzi@…>
Branches:
7.8-systemd, 7.9-systemd
Children:
a65f8ca2
Parents:
9d438f4
Message:

Imported changes from the main book.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/systemd@10894 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Location:
chapter06
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • chapter06/acl.xml

    r9d438f4 raad85a6  
    6060    <para>Prepare Acl for compilation:</para>
    6161
    62 <screen><userinput remap="configure">./configure --prefix=/usr --libexecdir=/usr/lib</userinput></screen>
     62<screen><userinput remap="configure">./configure --prefix=/usr    \
     63            --disable-static \
     64            --libexecdir=/usr/lib</userinput></screen>
    6365
    6466    <para>Compile the package:</para>
  • chapter06/attr.xml

    r9d438f4 raad85a6  
    5454    <para>Prepare Attr for compilation:</para>
    5555
    56 <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
     56<screen><userinput remap="configure">./configure --prefix=/usr --disable-static</userinput></screen>
    5757
    5858    <para>Compile the package:</para>
  • chapter06/bison.xml

    r9d438f4 raad85a6  
    4040  <sect2 role="installation">
    4141    <title>Installation of Bison</title>
     42<!-- bison only installs a static library
     43    <para>Inhibit static library installation:</para>
    4244
     45<screen><userinput remap="pre">sed -i '/lib_LIBRARIES =/d' Makefile.in</userinput></screen>   
     46-->
    4347    <para>Prepare Bison for compilation:</para>
    4448
    4549<screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/bison-&bison-version;</userinput></screen>
    46 <!--
    47     <para>The configure system causes Bison to be built without support for
    48     internationalization of error messages if a <command>bison</command>
    49     program is not already in $PATH. The following addition will correct
    50     this:</para>
    5150
    52 <screen><userinput remap="configure">echo '#define YYENABLE_NLS 1' &gt;&gt; lib/config.h</userinput></screen>
    53 -->
    5451    <para>Compile the package:</para>
    5552
  • chapter06/dbus.xml

    r9d438f4 raad85a6  
    5353            --localstatedir=/var                \
    5454            --docdir=/usr/share/doc/dbus-&dbus-version; \
     55            --disable-static                    \
    5556            --with-console-auth-dir=/run/console</userinput></screen>
    5657
  • chapter06/expat.xml

    r9d438f4 raad85a6  
    4444    <para>Prepare Expat for compilation:</para>
    4545
    46 <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
     46<screen><userinput remap="configure">./configure --prefix=/usr --disable-static</userinput></screen>
    4747
    4848    <para>Compile the package:</para>
  • chapter06/flex.xml

    r9d438f4 raad85a6  
    4848    <para>Prepare Flex for compilation:</para>
    4949
    50 <screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/flex-&flex-version;</userinput></screen>
     50<screen><userinput remap="configure">./configure --prefix=/usr    \
     51            --docdir=/usr/share/doc/flex-&flex-version;</userinput></screen>
    5152
    5253    <para>Compile the package:</para>
  • chapter06/gdbm.xml

    r9d438f4 raad85a6  
    4747    <para>Prepare GDBM for compilation:</para>
    4848
    49 <screen><userinput remap="configure">./configure --prefix=/usr --enable-libgdbm-compat</userinput></screen>
     49<screen><userinput remap="configure">./configure --prefix=/usr \
     50            --disable-static \
     51            --enable-libgdbm-compat</userinput></screen>
    5052
    5153    <variablelist>
  • chapter06/gettext.xml

    r9d438f4 raad85a6  
    4646    <para>Prepare Gettext for compilation:</para>
    4747
    48 <screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/gettext-&gettext-version;</userinput></screen>
     48<screen><userinput remap="configure">./configure --prefix=/usr    \
     49            --disable-static \
     50            --docdir=/usr/share/doc/gettext-&gettext-version;</userinput></screen>
    4951
    5052    <para>Compile the package:</para>
  • chapter06/glibc.xml

    r9d438f4 raad85a6  
    249249    </indexterm>
    250250
     251  <sect3>
     252  <title>Adding nsswitch.conf</title>
     253
    251254    <para>The <filename>/etc/nsswitch.conf</filename> file needs to be created
    252     because, although Glibc provides defaults when this file is missing or corrupt,
    253     the Glibc defaults do not work well in a networked environment. The time zone
    254     also needs to be configured.</para>
     255    because the Glibc defaults do not work well in a networked environment.
     256    </para>
    255257
    256258    <para>Create a new file <filename>/etc/nsswitch.conf</filename> by running the
     
    275277EOF</userinput></screen>
    276278
    277     <para>Install timezone data:</para>
     279    </sect3>
     280
     281    <sect3>
     282    <title>Adding time zone data</title>
     283
     284    <para>Install and set up the timezone data with the following:</para>
    278285<screen><userinput>tar -xf ../tzdata&tzdata-version;.tar.gz
    279286
     
    353360    time zone selected (e.g., Canada/Eastern).</para>
    354361
    355   </sect2>
    356 
    357   <sect2 id="conf-ld" role="configuration">
     362  </sect3>
     363
     364  <sect3 id="conf-ld" role="configuration">
    358365    <title>Configuring the Dynamic Loader</title>
    359366
     
    398405mkdir -pv /etc/ld.so.conf.d</userinput></screen>
    399406
     407  </sect3>
    400408  </sect2>
    401409
  • chapter06/gmp.xml

    r9d438f4 raad85a6  
    5353    <para>Prepare GMP for compilation:</para>
    5454
    55 <screen><userinput remap="configure">./configure --prefix=/usr \
    56             --enable-cxx  \
     55<screen><userinput remap="configure">./configure --prefix=/usr    \
     56            --enable-cxx     \
     57            --disable-static \
    5758            --docdir=/usr/share/doc/gmp-&gmp-version;</userinput></screen>
    5859
  • chapter06/introduction.xml

    r9d438f4 raad85a6  
    5656  test suite data for all applicable packages in Chapter 6.</para></note>
    5757
     58  <sect2>
     59    <title>About libraries</title>
     60
     61    <para>In general, the LFS editors discourage building and installing static
     62    libraries.  The original purpose for most static libraries has been made
     63    obsolete in a modern Linux system.  In addition linking a static library
     64    into a program can be detrimental.  If an update to the library is needed
     65    to remove a security problem, all programs that use the static library will
     66    need to be relinked to the new library.  Since the use of static libraries
     67    is not always obvious, deciding which programs (and the procedures needed to
     68    do the linking) may not even be known.</para>
     69
     70    <para>In the prcedures in Chapter 6, we remove or disable installation of
     71    most static libraries.  In a few cases, especially glibc and gcc, the use
     72    of static libraries remains essential to the general package building
     73    process.  Usually this is done by passing a
     74    <option>--disable-static</option> option to <command>configure</command>.
     75    In other cases, alternate means are needed.</para>
     76
     77    <para>For a more complete discussion of libraries, see the discussion
     78    <ulink url="&blfs-root;/view/&short-version;/introduction/libraries.html">
     79    Libraries: Static or shared?</ulink> in the BLFS book.</para>
     80
     81  </sect2>
     82
    5883</sect1>
  • chapter06/kmod.xml

    r9d438f4 raad85a6  
    7575<screen><userinput remap="make">make</userinput></screen>
    7676
     77    <para>This package does not come with a test suite that can be run in the
     78    LFS chroot environment.  At a minimum the git program is required and
     79    several tests will not run outside of a git repository. </para>
     80
     81<!--
    7782    <para>To test the results, issue:</para>
    7883
    7984<screen><userinput remap="test">make check</userinput></screen>
    80 
     85-->
    8186    <para>Install the package, and create symlinks for
    8287    compatibility with Module-Init-Tools (the package that previously handled
  • chapter06/libcap.xml

    r9d438f4 raad85a6  
    4343  <sect2 role="installation">
    4444    <title>Installation of Libcap</title>
     45
     46    <para>Prevent a static library from being installed:</para>
     47
     48<screen><userinput remap="pre">sed -i '/install.*STALIBNAME/d' libcap/Makefile</userinput></screen>
    4549
    4650    <para>Compile the package:</para>
  • chapter06/mpc.xml

    r9d438f4 raad85a6  
    4545    <para>Prepare MPC for compilation:</para>
    4646
    47 <screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/mpc-&mpc-version;</userinput></screen>
     47<screen><userinput remap="configure">./configure --prefix=/usr    \
     48            --disable-static \
     49            --docdir=/usr/share/doc/mpc-&mpc-version;</userinput></screen>
    4850
    4951    <para>Compile the package and generate the HTML documentation:</para>
  • chapter06/mpfr.xml

    r9d438f4 raad85a6  
    5050
    5151<screen><userinput remap="configure">./configure --prefix=/usr        \
     52            --disable-static     \
    5253            --enable-thread-safe \
    5354            --docdir=/usr/share/doc/mpfr-&mpfr-version;</userinput></screen>
  • chapter06/ncurses.xml

    r9d438f4 raad85a6  
    4242    <title>Installation of Ncurses</title>
    4343
    44     <!-- FIXME: Uncomment if using a dated ncurses release instead of a numbered
    45          one.
    46 
    47     <para>Since the release of Ncurses-&ncurses-version;, some bugs have been fixed
    48     and features added. The most important news are .......
    49     To get these fixes and features, apply the rollup patch:</para>
    50 
    51 <screen><userinput>bzcat ../&ncurses-rollup-patch; | patch -Np1</userinput></screen>
    52     -->
     44    <para>Don't install a static library that is not handled by configure:</para>
     45
     46<screen><userinput remap="pre">sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in</userinput></screen>
    5347
    5448    <para>Prepare Ncurses for compilation:</para>
     
    5852            --with-shared           \
    5953            --without-debug         \
     54            --without-normal        \
    6055            --enable-pc-files       \
    6156            --enable-widec</userinput></screen>
     
    8681      </varlistentry>
    8782
     83      <varlistentry>
     84        <term><parameter>--without-normal</parameter></term>
     85        <listitem>
     86          <para>This switch disables building and installing most static libraries.
     87          </para>
     88        </listitem>
     89      </varlistentry>
     90
    8891    </variablelist>
    8992
     
    120123    rm -vf                    /usr/lib/lib${lib}.so
    121124    echo "INPUT(-l${lib}w)" &gt; /usr/lib/lib${lib}.so
    122     ln -sfv lib${lib}w.a      /usr/lib/lib${lib}.a
    123125    ln -sfv ${lib}w.pc        /usr/lib/pkgconfig/${lib}.pc
    124 done
    125 
    126 ln -sfv libncurses++w.a /usr/lib/libncurses++.a</userinput></screen>
     126done</userinput></screen>
    127127
    128128    <para>Finally, make sure that old applications that look for
     
    132132<screen><userinput remap="install">rm -vf                     /usr/lib/libcursesw.so
    133133echo "INPUT(-lncursesw)" &gt; /usr/lib/libcursesw.so
    134 ln -sfv libncurses.so      /usr/lib/libcurses.so
    135 ln -sfv libncursesw.a      /usr/lib/libcursesw.a
    136 ln -sfv libncurses.a       /usr/lib/libcurses.a</userinput></screen>
     134ln -sfv libncurses.so      /usr/lib/libcurses.so</userinput></screen>
    137135
    138136    <para>If desired, install the Ncurses documentation:</para>
     
    169167
    170168      <seglistitem>
    171         <seg>captoinfo (link to tic), clear, infocmp, infotocap (link to tic),
    172         ncursesw5-config, reset (link to tset), tabs, tic, toe, tput, and tset</seg>
    173         <seg>libcursesw.{a,so} (symlink and linker script to libncursesw.{a,so}),
    174         libformw.{a,so}, libmenuw.{a,so}, libncurses++w.a, libncursesw.{a,so},
    175         libpanelw.{a,so}, and their non-wide-character counterparts without "w"
    176         in the library names.</seg>
    177         <seg>/usr/share/tabset, /usr/share/terminfo, and
    178         /usr/share/doc/ncurses-&ncurses-version;</seg>
     169        <seg>
     170           captoinfo (link to tic),
     171           clear,
     172           infocmp,
     173           infotocap (link to tic),
     174           ncursesw5-config,
     175           reset (link to tset),
     176           tabs,
     177           tic,
     178           toe,
     179           tput, and
     180           tset
     181        </seg>
     182        <seg>
     183           libcursesw.so (symlink and linker script to libncursesw.so),
     184           libformw.so,
     185           libmenuw.so,
     186           libncursesw.so,
     187           libpanelw.so, and their non-wide-character counterparts without "w"
     188              in the library names.</seg>
     189        <seg>
     190           /usr/share/tabset,
     191           /usr/share/terminfo, and
     192           /usr/share/doc/ncurses-&ncurses-version;
     193        </seg>
    179194      </seglistitem>
    180195    </segmentedlist>
  • chapter06/readline.xml

    r9d438f4 raad85a6  
    5757    <para>Prepare Readline for compilation:</para>
    5858
    59 <screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/readline-&readline-version;</userinput></screen>
     59<screen><userinput remap="configure">./configure --prefix=/usr    \
     60            --disable-static \
     61            --docdir=/usr/share/doc/readline-&readline-version;</userinput></screen>
    6062
    6163    <para>Compile the package:</para>
  • chapter06/revisedchroot.xml

    r9d438f4 raad85a6  
    3636  </note>
    3737
    38 <screen role="nodump"><userinput>rm -rf /tools</userinput></screen>
    39 
    4038  <para>If the virtual kernel file systems have been unmounted, either manually
    4139  or through a reboot, ensure that the virtual kernel file systems are mounted
     
    4442  linkend="ch-system-kernfsmount"/>.</para>
    4543
     44  <para>Finally, thre were several static libraries that were not supressed earlier
     45  in the chapter in order to satisfy the regression tests in several packages. These
     46  libraries are from binutils, bzip2, e2fsprogs, <!--flex,--> libtool, and zlib.  If desired,
     47  remove them now:</para>
     48
     49<screen><userinput>rm /usr/lib/lib{bfd,opcodes}.a
     50rm /usr/lib/libbz2.a
     51rm /usr/lib/lib{com_err,e2p,ext2fs,ss}.a
     52<!--rm /usr/lib/lib{fl,fl_pic}.a
     53-->rm /usr/lib/libltdl.a
     54rm /usr/lib/libz.a</userinput></screen>
     55
     56<!-- Flex shared library is broken. Keep static until next flex release. -->
     57
    4658</sect1>
  • chapter06/util-linux.xml

    r9d438f4 raad85a6  
    6363    <para>Prepare Util-linux for compilation:</para>
    6464
    65 <screen><userinput remap="configure">./configure ADJTIME_PATH=/var/lib/hwclock/adjtime   \
     65<screen><userinput remap="configure">./configure ADJTIME_PATH=/var/lib/hwclock/adjtime     \
    6666            --docdir=/usr/share/doc/util-linux-&util-linux-version; \
    6767            --disable-chfn-chsh  \
     
    7272            --disable-runuser    \
    7373            --disable-pylibmount \
     74            --disable-static     \
    7475            --without-python</userinput></screen>
    7576
  • chapter06/xz.xml

    r9d438f4 raad85a6  
    4747    <para>Prepare Xz for compilation with:</para>
    4848
    49 <screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/xz-&xz-version;</userinput></screen>
     49<screen><userinput remap="configure">
     50./configure --prefix=/usr    \
     51            --disable-static \
     52            --docdir=/usr/share/doc/xz-&xz-version;</userinput></screen>
    5053
    5154    <para>Compile the package:</para>
     
    7679
    7780      <seglistitem>
    78         <seg>lzcat (link to xz), lzcmp (link to xzdiff), lzdiff (link to
    79         xzdiff), lzegrep (link to xzgrep), lzfgrep (link to xzgrep),
    80         lzgrep (link to xzgrep), lzless (link to xzless), lzma (link to xz),
    81         lzmadec, lzmainfo, lzmore (link to xzmore),
    82         unlzma (link to xz), unxz, (link to xz), xz, xzcat (link to xz),
    83         xzcmp (link to xzdiff), xzdec, xzdiff, xzegrep (link to xzgrep),
    84         xzfgrep (link to xzgrep), xzgrep, xzless, and xzmore</seg>
    85         <seg>liblzma.{a,so}</seg>
    86         <seg>/usr/include/lzma and /usr/share/doc/xz-&xz-version;</seg>
     81        <seg>
     82          lzcat (link to xz),
     83          lzcmp (link to xzdiff),
     84          lzdiff (link to xzdiff),
     85          lzegrep (link to xzgrep),
     86          lzfgrep (link to xzgrep),
     87          lzgrep (link to xzgrep),
     88          lzless (link to xzless),
     89          lzma (link to xz),
     90          lzmadec,
     91          lzmainfo,
     92          lzmore (link to xzmore),
     93          unlzma (link to xz),
     94          unxz (link to xz),
     95          xz,
     96          xzcat (link to xz),
     97          xzcmp (link to xzdiff),
     98          xzdec,
     99          xzdiff,
     100          xzegrep (link to xzgrep),
     101          xzfgrep (link to xzgrep),
     102          xzgrep,
     103          xzless, and
     104          xzmore</seg>
     105        <seg>
     106          liblzma.so
     107        </seg>
     108        <seg>
     109          /usr/include/lzma and
     110          /usr/share/doc/xz-&xz-version;
     111         </seg>
    87112      </seglistitem>
    88113    </segmentedlist>
Note: See TracChangeset for help on using the changeset viewer.