Building ClamAV: OpenSSL installation missing X509_VERIFY_PARAM function, undefined symbol _X509_VERIFY_PARAM_new in ld
<p>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:</p>

<pre><code>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.
</code></pre>

<p>Here are the steps I took, mostly from the very helpful <a href="http://www.gctv.ne.jp/~yokota/clamav/" rel="nofollow noreferrer">http://www.gctv.ne.jp/~yokota/clamav/</a> (which describes ClamAV installation processes on the various Mac OS X versions):</p>

<ul>
<li>installed the latest possible llvm-gcc
(llvm-gcc4.2-2.3-ppc-darwin8.11.0)</li>
<li>used Macports to install bzip2</li>
<li>installed pcre2-10.22</li>
<li>installed openssl-1.0.2j</li>
</ul>

<p>$PATH is (in new lines to increase readability)</p>

<pre><code>/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
</code></pre>

<p>I read all of the documents and instructions supplied with openssl to get around system specifica, including </p>

<ul>
<li><a href="https://wiki.openssl.org/index.php/Compilation_and_Installation#OS_X" rel="nofollow noreferrer">https://wiki.openssl.org/index.php/Compilation_and_Installation#OS_X</a></li>
<li>Makefile-edits in openssl suggested in the included PROBLEMS-file and
on comments.gmane.org/gmane.comp.encryption.openssl.user/47242</li>
</ul>

<p>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 &amp;&amp; make test and all tests (including x509-stuff) always passed I believe openssl is completely installed and in use, as indicated by</p>

<pre><code>$ openssl version 
OpenSSL 1.0.2j  26 Sep 2016
</code></pre>

<p>and </p>

<pre><code>$ which openssl
/usr/local/ssl/bin/openssl
</code></pre>

<hr>

<p><strong>So it's apparently Clamav</strong> 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? </p>

<p>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:</p>

<pre><code>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` 
</code></pre>

<p>Finally, the <strong>config.log</strong> tells me the following:</p>

<pre><code>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  &gt;&amp;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 */
</code></pre>

<p>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.</p>

<p>So how do I get the missing symbol(s) defined? Can someone please give me a hint? Thanks a lot in advance.</p>