zlib-inst.xml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
  2. <sect2>
  3. <title>Installation of Zlib</title>
  4. <para>Zlib has a potential buffer overflow in its
  5. <emphasis>gzprintf()</emphasis> function, that, though difficult to take
  6. advantage of, should be taken care of by applying this patch:</para>
  7. <para><screen><userinput>patch -Np1 -i ../&zlib-patch;</userinput></screen></para>
  8. <para>Now prepare Zlib for compilation:</para>
  9. <para><screen><userinput>./configure --prefix=/usr --shared</userinput></screen></para>
  10. <para>Note: Zlib is known to build its shared library incorrectly if a CFLAGS
  11. is specified in the environment. If you are using your own CFLAGS variables,
  12. ensure you add the <emphasis role="strong">-fPIC</emphasis> directive during
  13. this stage, and remove it afterwards.</para>
  14. <para>Compile the package:</para>
  15. <para><screen><userinput>make</userinput></screen></para>
  16. <para>Install the shared libraries:</para>
  17. <para><screen><userinput>make install</userinput></screen></para>
  18. <para>Now also build the non-shared libraries:</para>
  19. <para><screen><userinput>make clean
  20. ./configure --prefix=/usr
  21. make</userinput></screen></para>
  22. <para>This package has a test suite available which can perform a number of
  23. checks to ensure it built correctly. Should you choose to run it, the
  24. following command will do so:</para>
  25. <para><screen><userinput>make test</userinput></screen></para>
  26. <para>And install the package:</para>
  27. <para><screen><userinput>make install</userinput></screen></para>
  28. <para>The shared Zlib library should be installed in the
  29. <filename>/lib</filename> directory. That way, in the event
  30. that you must boot without the <filename>/usr</filename>
  31. directory, vital system programs will still have access to
  32. the library:</para>
  33. <para><screen><userinput>mv /usr/lib/libz.so.* /lib</userinput></screen></para>
  34. <para>The <filename>/usr/lib/libz.so</filename> symlink is
  35. linked to a file which no longer exists, because we moved
  36. it. Create a symbolic link to the new location of the
  37. library:</para>
  38. <para><screen><userinput>ln -sf ../../lib/libz.so.1 /usr/lib/libz.so</userinput></screen></para>
  39. <para>Zlib does not install its manual page. Issue the
  40. following command to install this documentation:</para>
  41. <para><screen><userinput>cp zlib.3 /usr/share/man/man3</userinput></screen></para>
  42. </sect2>