source: chapter06/zlib.xml@ d38b5dd

6.0
Last change on this file since d38b5dd was 752f4e5, checked in by Manuel Canales Esparcia <manuel@…>, 20 years ago

Tags corrections, Chapter 6.

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

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