I'm trying to build ClamAV 99.2 on a Mac PPC Powerbook with OS X 10.4.11 Tiger. The ClamAV configure script always stops with the following lines, regardless the various flags and config-parameters I tried:
checking for EVP_EncryptInit in -lcrypto... yes
checking for X509_VERIFY_PARAM_new in -lssl... no
configure: error: Your OpenSSL installation is missing the X509_VERIFY_PARAM function.
Please upgrade to a more recent version of OpenSSL.
Here are the steps I took, mostly from the very helpful http://www.gctv.ne.jp/~yokota/clamav/ (which describes ClamAV installation processes on the various Mac OS X versions):
- installed the latest possible llvm-gcc (llvm-gcc4.2-2.3-ppc-darwin8.11.0)
- used Macports to install bzip2
- installed pcre2-10.22
- installed openssl-1.0.2j
$PATH is (in new lines to increase readability)
/usr/local/ssl/bin:
/usr/local/llvm-gcc4.2-2.3-ppc-darwin8.11.0/bin:
/opt/local/bin:
/opt/local/sbin:
/bin:
/sbin:
/usr/bin:
/usr/sbin
I read all of the documents and instructions supplied with openssl to get around system specifica, including
- https://wiki.openssl.org/index.php/Compilation_and_Installation#OS_X
- Makefile-edits in openssl suggested in the included PROBLEMS-file and on comments.gmane.org/gmane.comp.encryption.openssl.user/47242
Basically, openssl installed both with and without hacks, both with and without setting special configure-parameters like no-shared no-asm no-ssl2 no-ssl3. And since I did make && make test and all tests (including x509-stuff) always passed I believe openssl is completely installed and in use, as indicated by
$ openssl version
OpenSSL 1.0.2j 26 Sep 2016
and
$ which openssl
/usr/local/ssl/bin/openssl
So it's apparently Clamav that's either looking in the wrong place, asking the wrong question or being dependent on something that I do not see. Or could there even be a dependency in the system on the old original openssl? If so, how do I get around?
Configuring ClamAV has been done with various combinations of parts of the following commands, and with all of it in the end, with no effort:
CFLAGS="-O3"
CXXFLAGS="${CFLAGS}"
CPPFLAGS="-I/usr/local/include -I/usr/include -I/usr/local/pcre2/include -I/usr/local/ssl/include -DSSL3_FLAGS_ALLOW_UNSAFE_LEGACY_RENEGOTIATION=0x0010"
LDFLAGS="-L/opt/local/lib -L/usr/local/lib -L/usr/lib -L/usr/local/ssl/lib"
OPENSSL_INCLUDE_DIR=/usr/local/ssl/include/openssl
DEP_OPENSSL_INCLUDE=/usr/local/ssl/include/openssl
OPENSSL_LIB_DIR=/usr/local/ssl/lib
OPENSSL_ROOT_DIR=/usr/local/ssl
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
C_INCLUDE_PATH=/usr/local/ssl/include/openssl
CC=/usr/local/llvm-gcc4.2-2.3-ppc-darwin8.11.0/bin/powerpc-apple-darwin8-gcc-4.2.1
./configure --with-openssl=/usr/local/ssl \
--with-ssl=/usr/local/ssl --with-pcre=/usr/local/pcre2 --enable-llvm \
--prefix=/usr/local/clamXav --build=powerpc-apple-darwin`uname -r`
Finally, the config.log tells me the following:
configure:18017: checking for X509_VERIFY_PARAM_new in -lssl
configure:18042: /usr/local/llvm-gcc4.2-2.3-ppc-darwin8.11.0/bin/powerpc-apple-darwin8-gcc-4.2.1 -o conftest -I/usr/local/ssl/include -I/usr/local/include -I/usr/include -I/usr/local/pcre2/include -I/usr/local/ssl/include -L/usr/local/ssl/lib -lssl -lcrypto -lz conftest.c -lssl -lcrypto -lz >&5
/usr/bin/ld: Undefined symbols:
_X509_VERIFY_PARAM_new
collect2: ld returned 1 exit status
configure:18042: $? = 1
configure: failed program was:
| /* confdefs.h */
There is a related question at unix.stackexchange.com/questions/274126/openssl-installation-is-missing-the-x509-verify-param-function but the OP never supplied information he was asked for plus the operating system differs, that's why I ask here.
So how do I get the missing symbol(s) defined? Can someone please give me a hint? Thanks a lot in advance.