source: chapter06/zlib.xml@ 0c81bec

Last change on this file since 0c81bec was 6a0e6f3, checked in by Matthew Burgess <matthew@…>, 20 years ago
  • Remove the spurious <info> tags that I thought were necessary but evidently aren't

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

  • Property mode set to 100644
File size: 3.7 KB
RevLine 
[673b0d8]1<?xml version="1.0" encoding="ISO-8859-1"?>
[1fe35e1]2<!DOCTYPE section [
[673b0d8]3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
[1fe35e1]6<section xmlns="http://docbook.org/docbook-ng"
7 xml:id="ch-system-zlib" xreflabel="Zlib" role="wrap">
[6a0e6f3]8<title>Zlib-&zlib-version;</title>
[673b0d8]9<?dbhtml filename="zlib.html"?>
[24380c7]10
[673b0d8]11<indexterm zone="ch-system-zlib"><primary sortas="a-Zlib">Zlib</primary></indexterm>
12
[6a0e6f3]13<section role="package"><title/>
[673b0d8]14<para>The Zlib package contains compression and un-compression routines used by
[5888299]15some programs.</para>
16
[a001133]17<segmentedlist>
18<segtitle>&buildtime;</segtitle>
19<segtitle>&diskspace;</segtitle>
20<seglistitem><seg>0.1 SBU</seg><seg>1.5 MB</seg></seglistitem>
21</segmentedlist>
[673b0d8]22
[a001133]23<segmentedlist>
24<segtitle>Zlib installation depends on</segtitle>
25<seglistitem><seg>Binutils, Coreutils, GCC, Glibc, Make, Sed</seg></seglistitem>
26</segmentedlist>
[1fe35e1]27</section>
[24380c7]28
[1fe35e1]29<section role="installation">
[6a0e6f3]30<title>Installation of Zlib</title>
[73aedd1d]31
[bcd0ce7]32<note><para>Zlib is known to build its shared library incorrectly if CFLAGS is
33specified in the environment. If you are using your own CFLAGS variable, be
[8ad7980]34sure to add the <parameter>-fPIC</parameter> directive to your CFLAGS for the
[4248b0e]35duration of the below <command>configure</command> command, then remove it
[bcd0ce7]36afterwards.</para></note>
[73aedd1d]37
[4248b0e]38<para>Prepare Zlib for compilation:</para>
39
40<screen><userinput>./configure --prefix=/usr --shared</userinput></screen>
41
[73aedd1d]42<para>Compile the package:</para>
43
44<screen><userinput>make</userinput></screen>
45
[673b0d8]46<para>To test the results, issue:
[8a5f906]47<userinput>make check</userinput>.</para>
[dfddb12]48
49<para>Install the shared library:</para>
[73aedd1d]50
51<screen><userinput>make install</userinput></screen>
52
[dfddb12]53<para>Now also build the non-shared (static) library:</para>
[8ad7980]54
[73aedd1d]55<screen><userinput>make clean
56./configure --prefix=/usr
57make</userinput></screen>
58
[673b0d8]59<para>To again test the results, issue:
[8a5f906]60<userinput>make check</userinput>.</para>
[73aedd1d]61
[84e4cae]62<para>Install the static library:</para>
[73aedd1d]63
64<screen><userinput>make install</userinput></screen>
65
[84e4cae]66<para>And fix the permissions on the static library:</para>
67
68<screen><userinput>chmod 644 /usr/lib/libz.a</userinput></screen>
69
[dfddb12]70<para>It is good policy and common practice to place important libraries into
71the <filename class="directory">/lib</filename> directory. This matters most
72in scenarios where <filename class="directory">/usr</filename> is on a
[db9d773c]73separate partition. Essentially, the run-time components of any libraries that
74are used by programs in <filename class="directory">/bin</filename> or
[dfddb12]75<filename class="directory">/sbin</filename> should reside in
76<filename class="directory">/lib</filename> so that they are on the root
77partition and available in the event of
78<filename class="directory">/usr</filename> being inaccessible.</para>
79
[db9d773c]80<para>For the above reason we move the run-time components of the shared Zlib
81into <filename class="directory">/lib</filename>:</para>
[73aedd1d]82
83<screen><userinput>mv /usr/lib/libz.so.* /lib</userinput></screen>
84
[8ad7980]85<para>Now we need to fix the <filename class="symlink">/usr/lib/libz.so</filename> symlink
[db9d773c]86because we just moved the file it points to:</para>
[73aedd1d]87
88<screen><userinput>ln -sf ../../lib/libz.so.1 /usr/lib/libz.so</userinput></screen>
89
[1fe35e1]90</section>
[24380c7]91
[5888299]92
[6a0e6f3]93<section xml:id="contents-zlib" role="content"><title>Contents of Zlib</title>
[673b0d8]94
[c6cb3aa]95<segmentedlist>
96<segtitle>Installed libraries</segtitle>
97<seglistitem><seg>libz[a,so]</seg></seglistitem>
98</segmentedlist>
[24380c7]99
[c6cb3aa]100<variablelist><title>Short description</title>
[673b0d8]101
[1fe35e1]102<varlistentry xml:id="libz">
[8ad7980]103<term><filename class="libraryfile">libz*</filename></term>
[c6cb3aa]104<listitem>
[673b0d8]105<indexterm zone="ch-system-zlib libz"><primary sortas="c-libz*">libz*</primary></indexterm>
[c6cb3aa]106<para>contains compression and un-compression
[673b0d8]107functions used by some programs.</para>
[c6cb3aa]108</listitem>
109</varlistentry>
110</variablelist>
[673b0d8]111
[1fe35e1]112</section>
[673b0d8]113
[1fe35e1]114</section>
Note: See TracBrowser for help on using the repository browser.