Patch 1478 Compile error on AIX 4.3 with zlib and IBM C-Compiler

As reported in bug 1478, I've also encountered the same problem on AIX 5 
with openssl-0.9.8d.

Firstly, it is very important the OpenSSL package use the correct library 
paths when referencing the zlib components, as it is very common for 
multiple versions of the zlib libraries to exist on AIX. For example:
[1] AIX 5 ships the older version 1.2.2 zlib libraries as part of rpm.rte 
package. These are located as /usr/lib/libz.a -> 
/usr/opt/freeware/lib/libz.a
[2] Downloading the zlib 1.2.3 source and compiling using defaults places 
the library in /usr/local/lib.

Knowing this, I believe I've identified some defects in the Makefiles that 
enable me to resolve the problem described in bug 1478 as well as identify 
the correct zlib libraries. The resolution was to perform the following 
changes:

1) extract the source code for openssl-0.9.8d

2) Insert a new line 183 to file openssl-0.9.8d/Makefile.org
      ZLIB_INCLUDE='${ZLIB_INCLUDE}' LIBZLIB='${LIBZLIB}'     \

3) Edit line 1115 of file openssl-0.9.8d/Configure
   from:
           $lflags = "$lflags -lz";
   and change to:
           $lflags = "$lflags -L" . $withargs{"zlib-lib"} . " -lz";

4) Edit line 13 of file openssl-0.9.8d/crypto/comp/Makefile
   from:
      CFLAGS= $(INCLUDES) $(CFLAG)
   and change to:
      CFLAGS= $(INCLUDES) $(ZLIB_INCLUDE) $(CFLAG)

5) Run the Configure as follows:
   ./Configure aix-cc zlib \
       --with-zlib-lib=/usr/local/lib \
       --with-zlib-include=/usr/local/include

6) Make and run the tests as normal.

All seems to be fine so far. Hope this proves useful for a formal patch.

Regards,
Kieron Curtis.

_________________________________________________________________
Could you be the guest MSN Movies presenter? Click Here to Audition 
http://www.lightscameraaudition.co.uk


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to