Changeset ec43904


Ignore:
Timestamp:
07/10/2012 05:58:22 PM (12 years ago)
Author:
Ragnar Thomsen <rthomsen@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
33e6618a
Parents:
2f4014b
Message:

Libraries+LVM page corrections. KDE-workspace+admin dep.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@10408 af4574ff-66df-0310-9fd7-8a98e5e911e0

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • introduction/important/libraries.xml

    r2f4014b rec43904  
    1414  </sect1info>
    1515
    16   <title>Libraries: static or shared</title>
     16  <title>Libraries: Static or shared?</title>
    1717
    1818  <!-- section g : 'Others' in longindex.html -->
     
    2222
    2323  <sect2 role="package">
    24     <title>Libraries: static or shared</title>
     24    <title>Libraries: Static or shared?</title>
    2525
    26     <para>The original libraries were simply an archive of routines, from which
     26    <para>The original libraries were simply an archive of routines from which
    2727    the required routines were extracted and linked into the executable program.
    2828    These are described as static libraries (libfoo.a).  On some old operating
    2929    systems they are the only type available.</para>
    3030
    31     <para>On almost all Linux platforms we also have shared libraries (libfoo.so)
    32     - one copy of the library is loaded into vitual memory, and shared by all the
    33     programs which call any of its functions. This is space efficient.</para>
     31    <para>On almost all Linux platforms we also have shared libraries
     32    (libfoo.so) - one copy of the library is loaded into virtual memory, and
     33    shared by all the programs which call any of its functions. This is space
     34    efficient.</para>
    3435
    3536    <para>In the past, essential programs such as a shell were often linked
    3637    statically so that some form of minimal recovery system would exist even if
    37     shared libraries, such as libc.so, became damaged (e,g, moved to
     38    shared libraries, such as libc.so, became damaged (e.g. moved to
    3839    <filename class="directory">lost+found</filename> after fsck following an
    39     unclean shutdown). Nowadays, most people use an alternative system install,
    40     or a Live CD, if they have to recover. Journalling filesystems also reduce
     40    unclean shutdown). Nowadays, most people use an alternative system install
     41    or a Live CD if they have to recover. Journaling filesystems also reduce
    4142    the likelihood of this sort of problem.</para>
    4243
     
    5354    library version is automatic once the newer library is installed and the
    5455    program is (re)started (provided the library major version is unchanged,
    55     e.g. going from from libfoo.so.2.0 to libfoo.so.2.1 : going to libfoo.so.3
    56     will require recompilation - use <command>ldd</command> to find what uses
    57     the old version). If a program is linked to a static library, the program
    58     always has to be recompiled. If you know which programs linked to a
    59     particular static library, this is merely an annoyance. But usually you will
    60     <emphasis>not</emphasis> know which programs to recompile.</para>
     56    e.g. going from libfoo.so.2.0 to libfoo.so.2.1. Going to libfoo.so.3
     57    will require recompilation - <command>ldd</command> can be used to find
     58    which programs use the old version). If a program is linked to a static
     59    library, the program always has to be recompiled. If you know which
     60    programs are linked to a particular static library, this is merely an
     61    annoyance. But usually you will <emphasis>not</emphasis> know which
     62    programs to recompile.</para>
    6163
    62     <para>Most libraries are shared, but if you do something unusual such as
    63     moving a shared library to <filename class="directory">/lib</filename> and
    64     accidentally break the <literal>.so</literal> symlink in
    65     <filename class="directory">/usr/lib</filename> but keep the static library
    66     there, the static library will be silently linked into the programs which
    67     need it.</para>
     64    <para>Most libraries are shared, but if you do something unusual, such as
     65    moving a shared library to <filename class="directory">/lib</filename>
     66    accidentally breaking the <literal>.so</literal> symlink in
     67    <filename class="directory">/usr/lib</filename> while keeping the static
     68    library in <filename class="directory">/lib</filename>, the static library
     69    will be silently linked into the programs which need it.</para>
    6870
    69     <para>One way to identify when a static library is used is to deal with it
     71    <para>One way to identify when a static library is used, is to deal with it
    7072    at the end of the installation of every package.  Write a script to find all
    71     the static libraries in /usr/lib or wherever you are installing to, and
    72     either move them to another directory so that they are no longer found by
    73     the linker, or rename them so that libfoo.a becomes e.g. libfoo.a.hidden.
    74     You can then temporarily restore a static library if it is ever needed, and
    75     make a note which package needs it.  You may choose to exclude some of the
    76     static libraries from glibc if you do this (<filename>libc_nonshared.a,
    77     libg.a, libieee.a, libm.a, libpthread_nonshared.a, librpcsvc.a,
    78     libsupc++.a</filename> to simplify compilation.</para>
     73    the static libraries in <filename class="directory">/usr/lib</filename> or
     74    wherever you are installing to, and either move them to another directory so
     75    that they are no longer found by the linker, or rename them so that libfoo.a
     76    becomes e.g. libfoo.a.hidden. The static library can then be temporarily
     77    restored if it is ever needed, and the package needing it can be
     78    identified. You may choose to exclude some of the static libraries from
     79    glibc if you do this (<filename>libc_nonshared.a, libg.a, libieee.a, libm.a,
     80    libpthread_nonshared.a, librpcsvc.a, libsupc++.a</filename>) to simplify
     81    compilation.</para>
    7982
    8083<!-- versions hardcoded in this para, it's a comment on those versions  -->
    81     <para>If you do that, you may discover that more packages than you were
    82     expecting use a static library. That was the case with
    83     <application>nettle-2.4</application> in its default static-only configuration:
    84     required by <application>GnuTLS-3.0.19</application> but also linked into
    85     package(s) which used that, such as
     84    <para>If you use this approach, you may discover that more packages than
     85    you were expecting use a static library. That was the case with
     86    <application>nettle-2.4</application> in its default static-only
     87    configuration: It was required by <application>GnuTLS-3.0.19</application>,
     88    but also linked into package(s) which used
     89    <application>GnuTLS</application>, such as
    8690    <application>glib-networking-2.32.3</application>.</para>
    8791
    8892    <para>Many packages put some of their common functions into a static
    89     library which is only used by the programs within the package and
    90     crucially is <emphasis>not</emphasis> installed as a standalone library.
    91     These internal libraries are not a problem - if the package has to be
    92     rebuilt to fix a bug or vulnerability, nothing else is linked to them.
    93     </para>
     93    library which is only used by the programs within the package and,
     94    crucially, the library is <emphasis>not</emphasis> installed as a
     95    standalone library. These internal libraries are not a problem - if the
     96    package has to be rebuilt to fix a bug or vulnerability, nothing else is
     97    linked to them.</para>
    9498
    95     <para>When we speak of System libraries, we mean the shared versions. Some
    96     packages such as <xref linkend="firefox"/> and <xref linkend="gs"/> include
    97     many other libraries. When they link to them, they link statically so this
    98     also makes the programs bigger. The version they ship is often older than
    99     the version used in the system, so it may contain bugs - sometimes
    100     developers go to the trouble of fixing bugs in their included libraries,
    101     other times they do not.</para>
     99    <para>When BLFS mentions system libraries, it means shared versions of
     100    libraries. Some packages such as <xref linkend="firefox"/> and
     101    <xref linkend="gs"/> include many other libraries. When they link to them,
     102    they link statically so this also makes the programs bigger. The version
     103    they ship is often older than the version used in the system, so it may
     104    contain bugs - sometimes developers go to the trouble of fixing bugs in
     105    their included libraries, other times they do not.</para>
    102106
    103107    <para>Sometimes, deciding to use system libraries is an easy decision. Other
    104108    times it may require you to alter the system version (e.g. for
    105109    <xref linkend="libpng"/> if used for <xref linkend="firefox"/>).
    106     Occasionally a package has an old shipped library, can no longer link to the
    107     current version, but can link to a less-old version : the book will usually
    108     just use the shipped version. Sometimes the included library is no longer
    109     developed separately, or its upstream is now the same as the package&apos;s
    110     upstream and you have no other packages which will use it. In those cases,
    111     you might decide to use the included static library even if you usually
    112     prefer to use system libraries.</para>
     110    Occasionally, a package ships an old library and can no longer link to
     111    the current version, but can link to an older version. In this case, BLFS
     112    will usually just use the shipped version. Sometimes the included library
     113    is no longer developed separately, or its upstream is now the same as the
     114    package&apos;s upstream and you have no other packages which will use it.
     115    In those cases, you might decide to use the included static library even if
     116    you usually prefer to use system libraries.</para>
    113117
    114118    <para condition="html" role="usernotes">User Notes:
  • kde4/add/kde4admin.xml

    r2f4014b rec43904  
    8080
    8181    <bridgehead renderas="sect4">Optional</bridgehead>
    82     <para role="optional">
    83     <xref linkend="python2"/>,
    84     <!--<xref linkend="pykde4"/>, -->
    85     <ulink url="http://www.riverbankcomputing.co.uk/software/pyqt/intro">PyQt4</ulink>,
     82    <para role="optional">
     83    <ulink url="&kde-download-http;&kde-version;/src/">PyKDE4</ulink>,
    8684    <ulink url="http://cyberelk.net/tim/software/pycups/">PyCups</ulink> and
    8785    <ulink url="http://cyberelk.net/tim/software/system-config-printer/">system-config-printer</ulink>   
  • kde4/add/kde4plasmaaddons.xml

    r2f4014b rec43904  
    8080    <bridgehead renderas="sect4">Optional</bridgehead>
    8181    <para role="optional">
    82     <xref linkend="libkexiv2"/>, 
     82    <xref linkend="libkexiv2"/>,
    8383    <ulink url="http://edu.kde.org/marble/">Marble</ulink> (for the desktop globe wallpaper) and
    8484    <ulink url="http://eigen.tuxfamily.org/">Eigen</ulink> (for the Mandelbrot wallpaper plugin)
  • kde4/core/kde4workspace.xml

    r2f4014b rec43904  
    9090    <xref linkend="libusb"/>,
    9191    <xref linkend="NetworkManager"/>,
    92     <xref linkend="lm_sensors"/>,
     92    <xref linkend="lm_sensors"/>,
     93    <ulink url="&kde-download-http;&kde-version;/src/">PyKDE4</ulink>,
    9394    <ulink url="http://code.google.com/p/google-gadgets-for-linux/">GoogleGadgets</ulink>,
    9495    <ulink url="ftp://ftp.kde.org/pub/kde/stable/prison/1.0/src/">Prison</ulink>,
  • postlfs/filesystems/lvm2.xml

    r2f4014b rec43904  
    136136
    137137      <seglistitem>
    138         <seg>dmsetup, fsadm, lvm, lvmconf, lvndump, vgimportclone.  There
    139         are also numerous symbolic links to lvm to impement specific
     138        <seg>dmsetup, fsadm, lvm, lvmconf, lvmdump, vgimportclone.  There
     139        are also numerous symbolic links to lvm to implement specific
    140140        functionality.</seg>
    141141        <seg>libdevmapper.so</seg>
     
    185185        <listitem>
    186186          <para>is a script that modifies the locking configuration in
    187           an lvm configuration file.</para>
     187          a lvm configuration file.</para>
    188188          <indexterm zone="lvm2 lvmconf">
    189189            <primary sortas="b-lvmconf">lvmconf</primary>
  • postlfs/virtualization/virtualization.xml

    r2f4014b rec43904  
    1717
    1818  <para>Virtualization allows running a complete operating system, or virtual
    19   machine (VM) within another operting environment as a task.  There are
     19  machine (VM), within another operating environment as a task.  There are
    2020  several commercial and open source environments that either emulate another
    2121  processor or utilize the hardware virtualization features of the host
Note: See TracChangeset for help on using the changeset viewer.