6.11. Zlib-1.2.8

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

Approximate build time: less than 0.1 SBU
Required disk space: 4.1 MB

6.11.1. Installation of Zlib

6.11.2. 32-bit Installation

Prepare Zlib for 32-bit compilation:

CC="gcc -m32" ./configure --prefix=/usr \
--libdir=/usr/lib32

Compile the package:

make

To test the results, issue:

make check

Install the package:

make install

The shared library needs to be moved to /lib32, and as a result the .so file in /usr/lib32 will need to be recreated:

mv -v /usr/lib32/libz.so.* /lib32
ln -sfv ../../lib32/$(readlink /usr/lib32/libz.so) /usr/lib32/libz.so

Clean up the build directory before moving on to the next platform:

make clean

6.11.3. x32 ABI Installation

Prepare Zlib for x32 ABI compilation:

CC="gcc -mx32" ./configure --prefix=/usr \
--libdir=/usr/libx32

Compile the package:

make

To test the results, issue:

make check

Install the package:

make install

The shared library needs to be moved to /libx32, and as a result the .so file in /usr/libx32 will need to be recreated:

mv -v /usr/libx32/libz.so.* /libx32
ln -sfv ../../libx32/$(readlink /usr/libx32/libz.so) /usr/libx32/libz.so

Clean up the build directory before moving on to the next platform:

make clean

6.11.4. 64-bit Installation

Prepare Zlib for 64-bit compilation:

./configure --prefix=/usr

Compile the package:

make

To test the results, issue:

make check

Install the package:

make install

The shared library needs to be moved to /lib, and as a result the .so file in /usr/lib will need to be recreated:

mv -v /usr/lib/libz.so.* /lib
ln -sfv ../../lib/$(readlink /usr/lib/libz.so) /usr/lib/libz.so

6.11.5. Contents of Zlib

Installed libraries: libz.{a,so}

Short Descriptions

libz

Contains compression and decompression functions used by some programs