The system I am using is CentOS 5.4, and I am trying to install a
custom openssl with a custom zlib.

The system architecture is x86_64.

I have tried to compile and install openssl versions: 0.9.8m, 0.9.8n and 1.0.0
I have tried zlib versions 1.2.3, 1.2.4, and 1.2.5.

GCC Version: 4.1.2-46
Kernel: 2.6.18-164.2.1
GlibC:2.5 (CentOS 4.1.2-44)

I am trying to basically install a chrooted version of my lamp stack.

The target directory is /opt/lamp/openssl/openssl-VERSION for openssl
and /opt/lamp/zlib/zlib-VERSION for zlib.

./config \
--prefix=/opt/lamp/openssl/openssl-0.9.8m \
--openssldir=/opt/lamp/openssl/openssl-0.9.8m/etc/pki/tls \
-fPIC \
zlib \
--with-zlib-lib=/opt/lamp/zlib/zlib-1.2.4/lib \
--with-zlib-include=/opt/lamp/zlib/zlib-1.2.4/include \
no-idea \
no-mdc2 \
no-rc5 \
no-ec \
no-ecdh \
no-ecdsa \
shared \
--with-krb5-flavor=MIT \
fipscanisterbuild

If using ./Configure instead of ./config, I have to add linux-x86_64,
but otherwise there are no changes.

For zlib:

#!/bin/bash
CFLAGS="-fPIC"
./configure \
--shared \
--prefix=/opt/lamp/zlib/zlib-1.2.4
make && make install
cp Makefile Makefile.shared
make clean
CFLAGS=""
./configure \
--prefix=/opt/lamp/zlib/zlib-1.2.4
make && make install
cp Makefile Makefile.static

ldd libcrypto.so
libdl.so.2 => /lib64/libdl.so.2 (0x00002b7f7096f000)
libz.so.1 => /usr/lib/libz.so.1 (0x00002b7f70b73000)
libc.so.6 => /lib64/libc.so.6 (0x00002b7f70d8b000)
/lib64/ld-linux-x86-64.so.2 (0x000000335c800000)

ldd libssl.so
libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x00002b60ece7c000)
libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00002b60ed0aa000)
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00002b60ed33f000)
libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x00002b60ed542000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00002b60ed767000)
libcrypto.so.0.9.8 => not found
libdl.so.2 => /lib64/libdl.so.2 (0x00002b60ed97d000)
libz.so.1 => /usr/lib/libz.so.1 (0x00002b60edb81000)
libc.so.6 => /lib64/libc.so.6 (0x00002b60edd99000)
libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x00002b60ee0f1000)
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00002b60ee2f9000)
 /lib64/ld-linux-x86-64.so.2 (0x000000335c800000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00002b60ee4fc000)
libsepol.so.1 => /lib64/libsepol.so.1 (0x00002b60ee714000)


So basically, libcrypto is lost along the way.
I have a hack for this which adds a another lib dir
/opt/lamp/openssl/openssl-0.9.8m/lib to the lib patch.

I have tried to use zlib-dynamic, but this is somewhat unacceptable as
it will load the system library.
I need it to load a specific zlib that I specify.

I tried to load kerberos the same way, but that had similar results.

Using ldconfig or setting ldflags did work, but only for the libcrypto
problem, and use of ldflags or ldconfig makes my stack less portable.

I have tried to remove the -lz directive, but came up with a bunch of
function not found errors.

I have tried on another version of CentOS with no success.
I have also tried Fedora 11/12 and Ubuntu 9.04/9.10.

Any solutions ?
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to