mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-03-05 22:04:48 +00:00
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
This commit is contained in:
parent
ecd016b289
commit
73b2841ee1
@ -36,6 +36,20 @@
|
||||
</listitem>
|
||||
-->
|
||||
|
||||
<listitem>
|
||||
<para>2015-03-15</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>[bdubbs] - Remove non-essential static libraries
|
||||
from the installation. Added a new section in Chapter 6
|
||||
Introduction, suppressed many static libraries in different
|
||||
packages, and removed the remaining in the Cleaning Up section.
|
||||
Fixes
|
||||
<ulink url="&lfs-ticket-root;3751">#3751</ulink>.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>2015-03-11</para>
|
||||
<itemizedlist>
|
||||
|
@ -45,15 +45,12 @@
|
||||
directory:</para>
|
||||
|
||||
<screen><userinput remap="pre">sed -i -e 's|/@pkg_name@|&-@pkg_version@|' include/builddefs.in</userinput></screen>
|
||||
<!--
|
||||
<para>Prevent installation of manual pages that were already installed by
|
||||
Man-Pages package:</para>
|
||||
|
||||
<screen><userinput remap="pre">sed -i -e "/SUBDIRS/s|man2||" man/Makefile</userinput></screen>
|
||||
-->
|
||||
<para>Prepare Attr for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr --bindir=/bin</userinput></screen>
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||
--bindir=/bin \
|
||||
--disable-static</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
|
@ -40,17 +40,14 @@
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Bison</title>
|
||||
|
||||
<para>Inhibit static library installation:</para>
|
||||
|
||||
<screen><userinput remap="pre">sed -i '/lib_LIBRARIES =/d' Makefile.in</userinput></screen>
|
||||
|
||||
<para>Prepare Bison for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/bison-&bison-version;</userinput></screen>
|
||||
<!--
|
||||
<para>The configure system causes Bison to be built without support for
|
||||
internationalization of error messages if a <command>bison</command>
|
||||
program is not already in $PATH. The following addition will correct
|
||||
this:</para>
|
||||
|
||||
<screen><userinput remap="configure">echo '#define YYENABLE_NLS 1' >> lib/config.h</userinput></screen>
|
||||
-->
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
@ -62,6 +62,7 @@ BLKID_LIBS='-L/tools/lib -lblkid' \
|
||||
--enable-keymap \
|
||||
--disable-introspection \
|
||||
--disable-gudev \
|
||||
--disable-static \
|
||||
--disable-gtk-doc-html</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
<para>Prepare Expat for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr --disable-static</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
|
@ -47,7 +47,8 @@
|
||||
|
||||
<para>Prepare Flex for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/flex-&flex-version;</userinput></screen>
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||
--docdir=/usr/share/doc/flex-&flex-version;</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
|
@ -46,7 +46,9 @@
|
||||
|
||||
<para>Prepare GDBM for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr --enable-libgdbm-compat</userinput></screen>
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||
--disable-static \
|
||||
--enable-libgdbm-compat</userinput></screen>
|
||||
|
||||
<variablelist>
|
||||
<title>The meaning of the configure option:</title>
|
||||
|
@ -45,7 +45,9 @@
|
||||
|
||||
<para>Prepare Gettext for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/gettext-&gettext-version;</userinput></screen>
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||
--disable-static \
|
||||
--docdir=/usr/share/doc/gettext-&gettext-version;</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
|
@ -52,8 +52,9 @@
|
||||
|
||||
<para>Prepare GMP for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||
--enable-cxx \
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||
--enable-cxx \
|
||||
--disable-static \
|
||||
--docdir=/usr/share/doc/gmp-&gmp-version;</userinput></screen>
|
||||
|
||||
<variablelist>
|
||||
|
@ -55,4 +55,29 @@
|
||||
<note><para>The SBU values and required disk space includes
|
||||
test suite data for all applicable packages in Chapter 6.</para></note>
|
||||
|
||||
<sect2>
|
||||
<title>About libraries</title>
|
||||
|
||||
<para>In general, the LFS editors discourage building and installing static
|
||||
libraries. The original purpose for most static libraries has been made
|
||||
obsolete in a modern Linux system. In addition linking a static library
|
||||
into a program can be detrimental. If an update to the library is needed
|
||||
to remove a security problem, all programs that use the static library will
|
||||
need to be relinked to the new library. Since the use of static libraries
|
||||
is not always obvious, deciding which programs (and the procedures needed to
|
||||
do the linking) may not even be known.</para>
|
||||
|
||||
<para>In the prcedures in Chapter 6, we remove or disable installation of
|
||||
most static libraries. In a few cases, especially glibc and gcc, the use
|
||||
of static libraries remains essential to the general package building
|
||||
process. Usually this is done by passing a
|
||||
<option>--disable-static</option> option to <command>configure</command>.
|
||||
In other cases, alternate means are needed.</para>
|
||||
|
||||
<para>For a more complete discussion of libraries, see the discussion
|
||||
<ulink url="&blfs-root;/view/&short-version;/introduction/libraries.html">
|
||||
Libraries: Static or shared?</ulink> in the BLFS book.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
|
@ -43,6 +43,10 @@
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Libcap</title>
|
||||
|
||||
<para>Prevent a static library from being installed:</para>
|
||||
|
||||
<screen><userinput remap="pre">sed -i '/install.*STALIBNAME/d' libcap/Makefile</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
<screen><userinput remap="make">make</userinput></screen>
|
||||
|
@ -44,7 +44,9 @@
|
||||
|
||||
<para>Prepare MPC for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/mpc-&mpc-version;</userinput></screen>
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||
--disable-static \
|
||||
--docdir=/usr/share/doc/mpc-&mpc-version;</userinput></screen>
|
||||
|
||||
<para>Compile the package and generate the HTML documentation:</para>
|
||||
|
||||
|
@ -49,6 +49,7 @@
|
||||
<para>Prepare MPFR for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||
--disable-static \
|
||||
--enable-thread-safe \
|
||||
--docdir=/usr/share/doc/mpfr-&mpfr-version;</userinput></screen>
|
||||
|
||||
|
@ -41,15 +41,9 @@
|
||||
<sect2 role="installation">
|
||||
<title>Installation of Ncurses</title>
|
||||
|
||||
<!-- FIXME: Uncomment if using a dated ncurses release instead of a numbered
|
||||
one.
|
||||
<para>Don't install a static library that is not handled by configure:</para>
|
||||
|
||||
<para>Since the release of Ncurses-&ncurses-version;, some bugs have been fixed
|
||||
and features added. The most important news are .......
|
||||
To get these fixes and features, apply the rollup patch:</para>
|
||||
|
||||
<screen><userinput>bzcat ../&ncurses-rollup-patch; | patch -Np1</userinput></screen>
|
||||
-->
|
||||
<screen><userinput remap="pre">sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in</userinput></screen>
|
||||
|
||||
<para>Prepare Ncurses for compilation:</para>
|
||||
|
||||
@ -57,6 +51,7 @@
|
||||
--mandir=/usr/share/man \
|
||||
--with-shared \
|
||||
--without-debug \
|
||||
--without-normal \
|
||||
--enable-pc-files \
|
||||
--enable-widec</userinput></screen>
|
||||
|
||||
@ -85,6 +80,14 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>--without-normal</parameter></term>
|
||||
<listitem>
|
||||
<para>This switch disables building and installing most static libraries.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
@ -119,11 +122,8 @@
|
||||
<screen><userinput remap="install">for lib in ncurses form panel menu ; do
|
||||
rm -vf /usr/lib/lib${lib}.so
|
||||
echo "INPUT(-l${lib}w)" > /usr/lib/lib${lib}.so
|
||||
ln -sfv lib${lib}w.a /usr/lib/lib${lib}.a
|
||||
ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc
|
||||
done
|
||||
|
||||
ln -sfv libncurses++w.a /usr/lib/libncurses++.a</userinput></screen>
|
||||
done</userinput></screen>
|
||||
|
||||
<para>Finally, make sure that old applications that look for
|
||||
<filename class="libraryfile">-lcurses</filename> at build time are still
|
||||
@ -131,9 +131,7 @@ ln -sfv libncurses++w.a /usr/lib/libncurses++.a</userinput></screen>
|
||||
|
||||
<screen><userinput remap="install">rm -vf /usr/lib/libcursesw.so
|
||||
echo "INPUT(-lncursesw)" > /usr/lib/libcursesw.so
|
||||
ln -sfv libncurses.so /usr/lib/libcurses.so
|
||||
ln -sfv libncursesw.a /usr/lib/libcursesw.a
|
||||
ln -sfv libncurses.a /usr/lib/libcurses.a</userinput></screen>
|
||||
ln -sfv libncurses.so /usr/lib/libcurses.so</userinput></screen>
|
||||
|
||||
<para>If desired, install the Ncurses documentation:</para>
|
||||
|
||||
@ -168,14 +166,31 @@ cp -av lib/lib*.so.5* /usr/lib</userinput></screen>
|
||||
<segtitle>Installed directories</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>captoinfo (link to tic), clear, infocmp, infotocap (link to tic),
|
||||
ncursesw5-config, reset (link to tset), tabs, tic, toe, tput, and tset</seg>
|
||||
<seg>libcursesw.{a,so} (symlink and linker script to libncursesw.{a,so}),
|
||||
libformw.{a,so}, libmenuw.{a,so}, libncurses++w.a, libncursesw.{a,so},
|
||||
libpanelw.{a,so}, and their non-wide-character counterparts without "w"
|
||||
in the library names.</seg>
|
||||
<seg>/usr/share/tabset, /usr/share/terminfo, and
|
||||
/usr/share/doc/ncurses-&ncurses-version;</seg>
|
||||
<seg>
|
||||
captoinfo (link to tic),
|
||||
clear,
|
||||
infocmp,
|
||||
infotocap (link to tic),
|
||||
ncursesw5-config,
|
||||
reset (link to tset),
|
||||
tabs,
|
||||
tic,
|
||||
toe,
|
||||
tput, and
|
||||
tset
|
||||
</seg>
|
||||
<seg>
|
||||
libcursesw.so (symlink and linker script to libncursesw.so),
|
||||
libformw.so,
|
||||
libmenuw.so,
|
||||
libncursesw.so,
|
||||
libpanelw.so, and their non-wide-character counterparts without "w"
|
||||
in the library names.</seg>
|
||||
<seg>
|
||||
/usr/share/tabset,
|
||||
/usr/share/terminfo, and
|
||||
/usr/share/doc/ncurses-&ncurses-version;
|
||||
</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
|
@ -56,7 +56,9 @@ sed -i '/{OLDSUFF}/c:' support/shlib-install</userinput></screen>
|
||||
|
||||
<para>Prepare Readline for compilation:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/readline-&readline-version;</userinput></screen>
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr \
|
||||
--disable-static \
|
||||
--docdir=/usr/share/doc/readline-&readline-version;</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
|
@ -35,12 +35,22 @@
|
||||
instructions for this (see <ulink url="&blfs-root;"/>).</para>
|
||||
</note>
|
||||
|
||||
<screen role="nodump"><userinput>rm -rf /tools</userinput></screen>
|
||||
|
||||
<para>If the virtual kernel file systems have been unmounted, either manually
|
||||
or through a reboot, ensure that the virtual kernel file systems are mounted
|
||||
when reentering the chroot. This process was explained in <xref
|
||||
linkend="ch-system-bindmount"/> and <xref
|
||||
linkend="ch-system-kernfsmount"/>.</para>
|
||||
|
||||
<para>Finally, thre were several static libraries that were not supressed earlier
|
||||
in the chapter in order to satisfy the regression tests in several packages. These
|
||||
libraries are from binutils, bzip2, e2fsprogs, flex, libtool, and zlib. If desired,
|
||||
remove them now:</para>
|
||||
|
||||
<screen><userinput>rm /usr/lib/lib{bfd,opcodes}.a
|
||||
rm /usr/lib/libbz2.a
|
||||
rm /usr/lib/lib{com_err,e2p,ext2fs,ss}.a
|
||||
rm /usr/lib/lib{fl,fl_pic}.a
|
||||
rm /usr/lib/libltdl.a
|
||||
rm /usr/lib/libz.a</userinput></screen>
|
||||
|
||||
</sect1>
|
||||
|
@ -71,6 +71,7 @@
|
||||
--disable-setpriv \
|
||||
--disable-runuser \
|
||||
--disable-pylibmount \
|
||||
--disable-static \
|
||||
--without-python \
|
||||
--without-systemd \
|
||||
--without-systemdsystemunitdir</userinput></screen>
|
||||
|
@ -46,7 +46,10 @@
|
||||
|
||||
<para>Prepare Xz for compilation with:</para>
|
||||
|
||||
<screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/xz-&xz-version;</userinput></screen>
|
||||
<screen><userinput remap="configure">
|
||||
./configure --prefix=/usr \
|
||||
--disable-static \
|
||||
--docdir=/usr/share/doc/xz-&xz-version;</userinput></screen>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
||||
@ -75,15 +78,37 @@ ln -svf ../../lib/$(readlink /usr/lib/liblzma.so) /usr/lib/liblzma.so</userinput
|
||||
<segtitle>Installed directories</segtitle>
|
||||
|
||||
<seglistitem>
|
||||
<seg>lzcat (link to xz), lzcmp (link to xzdiff), lzdiff (link to
|
||||
xzdiff), lzegrep (link to xzgrep), lzfgrep (link to xzgrep),
|
||||
lzgrep (link to xzgrep), lzless (link to xzless), lzma (link to xz),
|
||||
lzmadec, lzmainfo, lzmore (link to xzmore),
|
||||
unlzma (link to xz), unxz, (link to xz), xz, xzcat (link to xz),
|
||||
xzcmp (link to xzdiff), xzdec, xzdiff, xzegrep (link to xzgrep),
|
||||
xzfgrep (link to xzgrep), xzgrep, xzless, and xzmore</seg>
|
||||
<seg>liblzma.{a,so}</seg>
|
||||
<seg>/usr/include/lzma and /usr/share/doc/xz-&xz-version;</seg>
|
||||
<seg>
|
||||
lzcat (link to xz),
|
||||
lzcmp (link to xzdiff),
|
||||
lzdiff (link to xzdiff),
|
||||
lzegrep (link to xzgrep),
|
||||
lzfgrep (link to xzgrep),
|
||||
lzgrep (link to xzgrep),
|
||||
lzless (link to xzless),
|
||||
lzma (link to xz),
|
||||
lzmadec,
|
||||
lzmainfo,
|
||||
lzmore (link to xzmore),
|
||||
unlzma (link to xz),
|
||||
unxz (link to xz),
|
||||
xz,
|
||||
xzcat (link to xz),
|
||||
xzcmp (link to xzdiff),
|
||||
xzdec,
|
||||
xzdiff,
|
||||
xzegrep (link to xzgrep),
|
||||
xzfgrep (link to xzgrep),
|
||||
xzgrep,
|
||||
xzless, and
|
||||
xzmore</seg>
|
||||
<seg>
|
||||
liblzma.so
|
||||
</seg>
|
||||
<seg>
|
||||
/usr/include/lzma and
|
||||
/usr/share/doc/xz-&xz-version;
|
||||
</seg>
|
||||
</seglistitem>
|
||||
</segmentedlist>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!ENTITY version "SVN-20150311">
|
||||
<!ENTITY version "SVN-20150315">
|
||||
<!ENTITY short-version "svn"> <!-- Used below in &blfs-book;. Change to x.y for release
|
||||
but not -rc releases -->
|
||||
<!ENTITY releasedate "March 11, 2015">
|
||||
<!ENTITY releasedate "March 15, 2015">
|
||||
<!ENTITY copyrightdate "1999-2015"><!-- jhalfs needs a literal dash, not – -->
|
||||
<!ENTITY milestone "7.8">
|
||||
<!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->
|
||||
|
@ -16,8 +16,8 @@
|
||||
<surname>Beekmans</surname>
|
||||
</author>
|
||||
<author>
|
||||
<firstname>Edited by Matthew Burgess</firstname>
|
||||
<surname>and Bruce Dubbs</surname>
|
||||
<firstname>Managing Editor is Bruce</firstname>
|
||||
<surname>Dubbs</surname>
|
||||
</author>
|
||||
</authorgroup>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user