source: BOOK/final-system/common/zlib.xml @ 3373dd11

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since 3373dd11 was 3373dd11, checked in by Jim Gifford <clfs@…>, 18 years ago

r668@server (orig r666): manuel | 2005-11-08 15:25:13 -0800
Removing SBUs and DUs. Chapter final-system, round 6.

  • Property mode set to 100644
File size: 3.5 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4  <!ENTITY % general-entities SYSTEM "../../general.ent">
5  <!ENTITY % patches-entities SYSTEM "../../patches.ent">
6  %general-entities;
7  %patches-entities;
8]>
9
10<sect1 id="ch-system-zlib" role="wrap">
11  <?dbhtml filename="zlib.html"?>
12
13  <title>Zlib-&zlib-version;</title>
14
15  <indexterm zone="ch-system-zlib">
16    <primary sortas="a-Zlib">Zlib</primary>
17  </indexterm>
18
19  <sect2 role="package">
20    <title/>
21
22    <para>The Zlib package contains compression and decompression routines
23    used by some programs.</para>
24
25    <segmentedlist>
26      <segtitle>&dependencies;</segtitle>
27
28      <seglistitem>
29        <seg>Binutils, Coreutils, GCC, Glibc, Make, and Sed</seg>
30      </seglistitem>
31    </segmentedlist>
32
33  </sect2>
34
35  <sect2 role="installation">
36    <title>Installation of Zlib</title>
37
38    <note os="a">
39      <para>Zlib is known to build its shared library incorrectly if
40      <envar>CFLAGS</envar> is specified in the environment. If using a
41      specified <envar>CFLAGS</envar> variable, be sure to add the
42      <option>-fPIC</option> directive to the <envar>CFLAGS</envar>
43      variable for the duration of the configure command below, then
44      remove it afterwards.</para>
45    </note>
46
47    <para os="b">Prepare Zlib for compilation:</para>
48
49<screen><userinput>./configure --prefix=/usr --shared --libdir=/lib</userinput></screen>
50
51    <para os="c">Compile the package:</para>
52
53<screen os="d"><userinput>make</userinput></screen>
54
55    <para os="e">To test the results, issue:
56    <userinput>make check</userinput>.</para>
57
58    <para os="f">Install the shared library:</para>
59
60<screen os="g"><userinput>make install</userinput></screen>
61
62    <para os="h">The previous command installed a <filename
63    class="extension">.so</filename> file in <filename
64    class="directory">/lib</filename>. We will remove it and relink it into
65    <filename class="directory">/usr/lib</filename>:</para>
66
67<screen os="i"><userinput>rm /lib/libz.so
68ln -sf ../../lib/libz.so.&zlib-version; /usr/lib/libz.so</userinput></screen>
69
70    <para os="j">Build the static library:</para>
71
72<screen><userinput>make clean
73./configure --prefix=/usr
74make</userinput></screen>
75
76    <para os="k">To test the results again, issue:
77    <userinput>make check</userinput>.</para>
78
79    <para os="l">Install the static library:</para>
80
81<screen os="m"><userinput>make install</userinput></screen>
82
83    <para os="n">Fix the permissions on the static library:</para>
84
85<screen os="o"><userinput>chmod 644 /usr/lib/libz.a</userinput></screen>
86
87  </sect2>
88
89  <sect2 id="contents-zlib" role="content">
90    <title>Contents of Zlib</title>
91
92    <segmentedlist>
93      <segtitle>Installed libraries</segtitle>
94
95      <seglistitem>
96        <seg>libz.[a,so]</seg>
97      </seglistitem>
98    </segmentedlist>
99
100    <variablelist>
101      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
102      <?dbfo list-presentation="list"?>
103      <?dbhtml list-presentation="table"?>
104
105      <varlistentry id="libz">
106        <term><filename class="libraryfile">libz</filename></term>
107        <listitem>
108          <para>Contains compression and decompression
109          functions used by some programs</para>
110          <indexterm zone="ch-system-zlib libz">
111            <primary sortas="c-libz">libz</primary>
112          </indexterm>
113        </listitem>
114      </varlistentry>
115
116    </variablelist>
117
118  </sect2>
119
120</sect1>
Note: See TracBrowser for help on using the repository browser.