Prev Up (Under construction)

zlib

General purpose data compression library

Compilation (V1.2.3,V1.2.5,V1.2.7)

  1. Unpack the sources, e.g.:
    gunzip -c zlib-1.2.3.tar.gz | tar -xvf -
    cd zlib-1.2.3
    
  2. configure and run the Makefile:
                                # AIX 6.1, C 9.0; AIX 7.1, C 12.1 
    export CC=cc; export CFLAGS="-O2 -D_THREAD_SAFE -D_LARGE_FILES"; ./configure --static --prefix=/tmp/zlib-1.2.7
                                # AIX 4.1, C 3.6.6
    export CC=cc; export CFLAGS="-O2 -qmaxmem=-1"; ./configure --static --prefix=/tmp/zlib-1.2.5
                                # HP-UX 11.x
    export CC=cc; export CFLAGS="-O2";             ./configure          --prefix=/tmp/zlib-1.2.3
                                # HP-UX 11.x, shared library
    export CC=cc; export CFLAGS="-O2 +z";          ./configure --shared --prefix=/tmp/zlib-1.2.3
                                # HP-UX 10.20
    export CC=cc; export CFLAGS="-O -Ae";          ./configure          --prefix=/tmp/zlib-1.2.3
                                # HP-UX 10.20, shared library
    export CC=cc; export CFLAGS="-O -Ae +z";       ./configure --shared --prefix=/tmp/zlib-1.2.3
                                # HP-UX  9.10, vsnprintf() not supported
    export CC=cc; export CFLAGS="-O -Aa +e  -D_XPG2 -D_INCLUDE_POSIX_SOURCE -D_INCLUDE_HPUX_SOURCE -D_INCLUDE_XOPEN_SOURCE -D_INCLUDE_AES_SOURCE"; ./configure --prefix=/tmp/zlib-1.2.3
    
    make clean
    make
    make install 
    
    Note: The configure script has a bug for --static, the generated Makefile uses the variable SHAREDLIBV, which naturally is undefined in this case. Correct manually.
  3. Copy installation to its final location, e.g.
    cp -p -r -h /tmp/zlib-1.2.3 /opt
    
    For easier version control it is convenient to place links ("stow") like
    ln -s /opt/zlib-1.2.3/lib/libz.a      /opt/lib/libz.a
    
    and refer to these links only.

Tru64

Adapt the prefix in the Makefile, then
make 
make install

Ultrix 4.5

  1. Unpack the sources, e.g.:
    gunzip -c zlib-1.2.3.tar.gz | tar xvf -
    cd zlib-1.2.3
    
  2. configure and run the Makefile:
    export CC=cc ; ./configure --prefix=/local
    make
    make install prefix=
    make clean
    
  3. For easier version control it is convenient to place links ("stow") like
    ln -s /opt/zlib-1.2.3/lib/libz.a      /opt/lib/libz.a
    
    and refer to these links only.
To do:
Checking for snprintf() in stdio.h... No.
  WARNING: snprintf() not found, falling back to sprintf(). zlib
  can build but will be open to possible buffer-overflow security
  vulnerabilities.
Checking for return value of sprintf()... No.
  WARNING: apparently sprintf() does not return a value. zlib
  can build but will be open to possible string-format security
  vulnerabilities.

Configuration



Last updated: Sun, Mar 2, 2014 12:50:32 PM , M.Kraemer

Impressum Data privacy protection