I'm trying to build APR-util 1.5.6 for Apache 2.2.32.
I first build OpenSSL 1.0.2k using the following steps:
./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl
make
make test
make install
I then ran these commands:
export LD_LIBRARY_PATH=/usr/local/lib
export LIBS=-ldl
I attempted to build APR-util using these commands:
./configure --with-apr=/usr/local/apr/bin/apr-1-config --with-crypto --with-openssl=/usr/local/ssl
make
Configure completes successfully, but make fails with the following error:
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=link gcc -g -O2 -pthread -L/usr/local/ssl/lib -release 1 -module -rpath /usr/local/apr/lib/apr-util-1 -o crypto/apr_crypto_openssl.la crypto/apr_crypto_openssl.lo -L/usr/local/ssl/lib -lssl -lcrypto
/usr/bin/ld: /usr/local/ssl/lib/libcrypto.a(mem.o): relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/local/ssl/lib/libcrypto.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [crypto/apr_crypto_openssl.la] Error 1
Please advise. Thanks.