Gary, 
I've installed the libz to 1.2.8 ( via opencsw packages ) but when I check for the libz I get:
-bash-3.2# ldd /usr/local/clamav/bin/freshclam | grep libz
        libz.so.1 =>     /opt/csw/lib/libz.so.1
        libz.so.1 =>     /usr/lib/libz.so.1
        libz.so.1 (SUNW_1.1) =>  (version not found)
        libz.so.1 =>     /opt/csw/lib/sparcv8plus+vis/libz.so.1
-bash-3.2# 

The config option I've used are:
  $ ./configure --enable-milter --prefix=/usr/local/clamav --sysconfdir=/etc --with-openssl=/opt/csw/ --with-pcre=/usr/local --with-zlib=/opt/csw --with-libcurl=/opt/csw/ 

And here the summary from configure:
configure: Summary of detected features follows
              OS          : solaris2.10
              pthreads    : yes (-lpthread)
configure: Summary of miscellaneous features
              check       : no (auto)
              fanotify    : no (disabled)
              fdpassing   : n/a
              IPv6        : yes
              openssl     : /opt/csw/
              libcurl     : /opt/csw/
configure: Summary of optional tools
              clamdtop    : no (missing ncurses / pdcurses) (disabled)
              milter      : yes (-lmilter  -lsocket -lresolv -lpthread)
              clamsubmit  : no (missing libjson-c-dev. Use the website to submit FPs/FNs.) (disabled)
              clamonacc   : no (auto)
configure: Summary of engine performance features
              release mode: yes
              llvm        : no (disabled)
              mempool     : yes
configure: Summary of engine detection features
              iconv       : no
              bzip2       : ok
              zlib        : yes (zlib found at /opt/csw/)
              unrar       : yes
              preclass    : no (missing libjson-c-dev) (disabled)
              pcre        : /usr/local
              libmspack   : yes (Internal)
              libxml2     : yes, from /usr
              yara        : yes
              fts         : yes (internal, libc's is not LFS compatible)

-bash-3.2# ls -l /opt/csw/lib/libz.so.1*
lrwxrwxrwx   1 root     root          13 Aug 14  2018 /opt/csw/lib/libz.so.1 -> libz.so.1.2.8
-rwxr-xr-x   1 root     bin       134060 Sep 23  2013 /opt/csw/lib/libz.so.1.2.8

I don't understand why it's linking both libz ( from the /opt/csw and from /usr/lib which is the solaris default libz )



On Sun, Mar 22, 2020 at 3:58 AM Gary R. Schmidt <grschmidt@acm.org> wrote:

Solaris 10 has libz 1.2.3 - you might want to build the latest version
(1.2.8?) and use that, I have vague memories that some newer source (not
just clamav) just doesn't work with the older versions.

        Cheers,
                Gary    B-)