10.28. Zlib-1.2.3 64 Bit

The Zlib package contains compression and decompression routines used by some programs.

10.28.1. Installation of Zlib

This patch will add -fPIC to our build and allow us to build a static and shared library at the same time:

patch -Np1 -i ../zlib-1.2.3-fPIC-1.patch

Prepare Zlib for compilation:

CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" ./configure --prefix=/usr \
   --shared --libdir=/usr/lib64

Compile the package:

make

To test the results, issue: make check.

Install the package:

make install

The previous command installed a .so file in /usr/lib64. We will move it into /lib64 and then relink it to /usr/lib64:

mv -v /usr/lib64/libz.so.* /lib64
ln -svf ../../lib64/libz.so.1 /usr/lib64/libz.so

Now we fix the permissions on the static library:

chmod -v 644 /usr/lib64/libz.a

10.28.2. Contents of Zlib

Installed libraries: libz.[a,so]

Short Descriptions

libz

Contains compression and decompression functions used by some programs