1

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

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.

upunkt
  • 23
  • 6
  • I had a similar problem building Git and cURL for a PowerMac. I believe OpenSSL uses `-force_cpusubtype_ALL`, and it causes symbols to go missing due to wrong cpu subtypes. You won't really notice the difference between arch's of `ppc`, `ppc7400` and `ppc64`, but that was the problem for me. Since OpenSSL is using `-force_cpusubtype_ALL`, add it to all of your `CFLAGS` and `CXXFLAGS`. Or, remove `-force_cpusubtype_ALL` from OpenSSL build flags. Also see [Are there any hints with building Git with HTTP and HTTPS helpers?](https://curl.haxx.se/mail/lib-2015-08/0156.html) – jww Dec 13 '16 at 13:02
  • @jww Thanks for your reply. I tried with `-force_cpusubtype_ALL` in CFLAGS, CXXFLAGS for the built of Openssl and ClamAV and even in LDFLAGS, like someone on your mentioned thread suggested, to no effort unfortunately. I noticed that I got permission issues which is strange but could be worked around by using sudo also for `make && make test`for the openssl-built. My machine is a ppc7450, btw. Searching the log for this prints no results. How do I notice that I would need `-force_cpusubtype_ALL`? What else could go wrong? – upunkt Dec 13 '16 at 18:55

0 Answers0