zlib.xml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
  3. <!ENTITY % general-entities SYSTEM "../general.ent">
  4. <!ENTITY % patches-entities SYSTEM "../patches.ent">
  5. %general-entities;
  6. %patches-entities;
  7. ]>
  8. <sect1 id="ch-system-zlib" role="wrap">
  9. <title>Zlib-&zlib-version;</title>
  10. <?dbhtml filename="zlib.html"?>
  11. <indexterm zone="ch-system-zlib"><primary sortas="a-Zlib">Zlib</primary></indexterm>
  12. <sect2 role="package"><title/>
  13. <para>The Zlib package contains compression and decompression routines used by
  14. some programs.</para>
  15. <segmentedlist>
  16. <segtitle>&buildtime;</segtitle>
  17. <segtitle>&diskspace;</segtitle>
  18. <seglistitem><seg>0.1 SBU</seg><seg>2.7 MB</seg></seglistitem>
  19. </segmentedlist>
  20. <segmentedlist>
  21. <segtitle>&dependencies;</segtitle>
  22. <seglistitem><seg>Binutils, Coreutils, GCC, Glibc, Make, and Sed</seg></seglistitem>
  23. </segmentedlist>
  24. </sect2>
  25. <sect2 role="installation">
  26. <title>Installation of Zlib</title>
  27. <para>Zlib has a security vulnerability currently being addressed upstream. The
  28. following patch fixes the problem:</para>
  29. <screen><userinput>patch -Np1 -i ../&zlib-security_fix-patch;</userinput></screen>
  30. <note><para>Zlib is known to build its shared library incorrectly if
  31. <envar>CFLAGS</envar> is specified in the environment. If using a
  32. specified <envar>CFLAGS</envar>
  33. variable, be sure to add the <parameter>-fPIC</parameter> directive to
  34. the <envar>CFLAGS</envar> variable for the duration of the
  35. configure command below, then remove it afterwards.</para></note>
  36. <para>Prepare Zlib for compilation:</para>
  37. <screen><userinput>./configure --prefix=/usr --shared --libdir=/lib</userinput></screen>
  38. <para>Compile the package:</para>
  39. <screen><userinput>make</userinput></screen>
  40. <para>To test the results, issue:
  41. <userinput>make check</userinput>.</para>
  42. <para>Install the shared library:</para>
  43. <screen><userinput>make install</userinput></screen>
  44. <para>The previous command installed a <filename
  45. class="extension">.so</filename> file in <filename
  46. class="directory">/lib</filename>. We will remove it and relink it into
  47. <filename class="directory">/usr/lib</filename>:</para>
  48. <screen><userinput>rm /lib/libz.so
  49. ln -sf ../../lib/libz.so.&zlib-version; /usr/lib/libz.so</userinput></screen>
  50. <para>Build the static library:</para>
  51. <screen><userinput>make clean
  52. ./configure --prefix=/usr
  53. make</userinput></screen>
  54. <para>To test the results again, issue:
  55. <userinput>make check</userinput>.</para>
  56. <para>Install the static library:</para>
  57. <screen><userinput>make install</userinput></screen>
  58. <para>Fix the permissions on the static library:</para>
  59. <screen><userinput>chmod 644 /usr/lib/libz.a</userinput></screen>
  60. </sect2>
  61. <sect2 id="contents-zlib" role="content"><title>Contents of Zlib</title>
  62. <segmentedlist>
  63. <segtitle>Installed libraries</segtitle>
  64. <seglistitem><seg>libz.[a,so]</seg></seglistitem>
  65. </segmentedlist>
  66. <variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
  67. <?dbfo list-presentation="list"?>
  68. <?dbhtml list-presentation="table"?>
  69. <varlistentry id="libz">
  70. <term><filename class="libraryfile">libz</filename></term>
  71. <listitem>
  72. <para>Contains compression and decompression
  73. functions used by some programs</para>
  74. <indexterm zone="ch-system-zlib libz"><primary sortas="c-libz">libz</primary></indexterm>
  75. </listitem>
  76. </varlistentry>
  77. </variablelist>
  78. </sect2>
  79. </sect1>