Changeset 73b2841


Ignore:
Timestamp:
03/15/2015 11:29:31 PM (9 years ago)
Author:
Bruce Dubbs <bdubbs@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
8f7d07eb
Parents:
ecd016b
Message:

Remove non-essential static libraries from the installation. Added a new
section in Chapter 6 Introduction, supressed many static libraries in different
packages, and removed the remaining in the Cleaning Up section.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@10880 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Files:
20 edited

Legend:

Unmodified
Added
Removed
  • chapter01/changelog.xml

    recd016b r73b2841  
    3636    </listitem>
    3737-->
     38
     39    <listitem>
     40      <para>2015-03-15</para>
     41      <itemizedlist>
     42        <listitem>
     43          <para>[bdubbs] - Remove non-essential static libraries
     44          from the installation. Added a new section in Chapter 6
     45          Introduction, suppressed many static libraries in different
     46          packages, and removed the remaining in the Cleaning Up section.
     47          Fixes
     48          <ulink url="&lfs-ticket-root;3751">#3751</ulink>.</para>
     49        </listitem>
     50      </itemizedlist>
     51    </listitem>
    3852
    3953    <listitem>
  • chapter06/attr.xml

    recd016b r73b2841  
    4646
    4747<screen><userinput remap="pre">sed -i -e 's|/@pkg_name@|&amp;-@pkg_version@|' include/builddefs.in</userinput></screen>
    48 <!--
    49     <para>Prevent installation of manual pages that were already installed by
    50     Man-Pages package:</para>
    5148
    52 <screen><userinput remap="pre">sed -i -e "/SUBDIRS/s|man2||" man/Makefile</userinput></screen>
    53 -->
    5449    <para>Prepare Attr for compilation:</para>
    5550
    56 <screen><userinput remap="configure">./configure --prefix=/usr --bindir=/bin</userinput></screen>
     51<screen><userinput remap="configure">./configure --prefix=/usr \
     52            --bindir=/bin \
     53            --disable-static</userinput></screen>
    5754
    5855    <para>Compile the package:</para>
  • chapter06/bison.xml

    recd016b r73b2841  
    4141    <title>Installation of Bison</title>
    4242
     43    <para>Inhibit static library installation:</para>
     44
     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/eudev.xml

    recd016b r73b2841  
    6363            --disable-introspection \
    6464            --disable-gudev         \
     65            --disable-static        \
    6566            --disable-gtk-doc-html</userinput></screen>
    6667
  • chapter06/expat.xml

    recd016b r73b2841  
    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

    recd016b r73b2841  
    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

    recd016b r73b2841  
    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

    recd016b r73b2841  
    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/gmp.xml

    recd016b r73b2841  
    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

    recd016b r73b2841  
    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/libcap.xml

    recd016b r73b2841  
    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

    recd016b r73b2841  
    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

    recd016b r73b2841  
    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

    recd016b r73b2841  
    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

    recd016b r73b2841  
    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

    recd016b r73b2841  
    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
     52rm /usr/lib/lib{fl,fl_pic}.a
     53rm /usr/lib/libltdl.a
     54rm /usr/lib/libz.a</userinput></screen>
     55
    4656</sect1>
  • chapter06/util-linux.xml

    recd016b r73b2841  
    7272            --disable-runuser    \
    7373            --disable-pylibmount \
     74            --disable-static     \
    7475            --without-python     \
    7576            --without-systemd    \
  • chapter06/xz.xml

    recd016b r73b2841  
    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>
  • general.ent

    recd016b r73b2841  
    1 <!ENTITY version         "SVN-20150311">
     1<!ENTITY version         "SVN-20150315">
    22<!ENTITY short-version   "svn">  <!-- Used below in &blfs-book;. Change to x.y for release
    33                                      but not -rc releases -->
    4 <!ENTITY releasedate     "March 11, 2015">
     4<!ENTITY releasedate     "March 15, 2015">
    55<!ENTITY copyrightdate   "1999-2015"><!-- jhalfs needs a literal dash, not &ndash; -->
    66<!ENTITY milestone       "7.8">
  • prologue/bookinfo.xml

    recd016b r73b2841  
    1717    </author>
    1818    <author>
    19       <firstname>Edited by Matthew Burgess</firstname>
    20       <surname>and Bruce Dubbs</surname>
     19      <firstname>Managing Editor is Bruce</firstname>
     20      <surname>Dubbs</surname>
    2121    </author>
    2222  </authorgroup>
Note: See TracChangeset for help on using the changeset viewer.