Build fail at ClamAV104 with Cmake22

Please help me, thank you!
1)environment:gcc,g++ GNU 7.1.0, SunOS solaris 5.11 11.3 i86pc i386 i86pc

2)The following is error Info.
Consolidate compiler generated dependencies of target clamconf
[ 93%] Linking C executable clamconf
ld: warning: file /lib/libc.so: linked to /usr/lib/libc.so: attempted multiple inclusion of file
Undefined first referenced
symbol in file
send …/common/libcommon.a(output.c.o) (symbol belongs to im plicit dependency /lib/libsocket.so.1)
ld: fatal: symbol referencing errors
collect2: error: ld returned 1 exit status
gmake[2]: *** [clamconf/clamconf] エラー 1
gmake[1]: *** [clamconf/CMakeFiles/clamconf.dir/all] エラー 2
gmake: *** [all] エラー 2

3)Gmake Configure:
root@solaris:/usr/local/clamav-0.104.1/build# /usr/local/cmake-3.22.0/bin/cmake … -D ENABLE_TESTS=OFF -D ENABLE_LIBCLAMAV_ONLY=OFF -D ENABLE_APP=ON
– The C compiler identification is GNU 7.1.0
– The CXX compiler identification is GNU 7.1.0
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: /usr/bin/gcc - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: /usr/bin/c++ - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
– Found Git: /opt/csw/bin/git (found version “2.3.1”)
– Looking for pthread.h
– Looking for pthread.h - found
– Performing Test CMAKE_HAVE_LIBC_PTHREAD
– Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
– Found Threads: TRUE
– Found OpenSSL: /usr/lib/libcrypto.so (found version “1.0.1p”)
– Found ZLIB: /usr/lib/libz.so (found version “1.2.8”)
– Found BZip2: /usr/lib/libbz2.so (found version “1.0.6”)
– Looking for BZ2_bzCompressInit
– Looking for BZ2_bzCompressInit - found
– Found LibXml2: /usr/lib/libxml2.so (found version “2.9.2”)
– Found PCRE2: /usr/local/lib/libpcre2-8.so
– Performing Test Iconv_IS_BUILT_IN
– Performing Test Iconv_IS_BUILT_IN - Success
– Found Iconv: /usr/lib/libc.so
– Found JSONC: /usr/lib/libjson-c.so
– Found CURL: /usr/lib/libcurl.so (found version “7.40.0”)
– Found CURSES: /usr/lib/libcurses.so
– Found Milter: /usr/lib/libmilter.so
– Performing Test CXX_FLAG__std_c_14
– Performing Test CXX_FLAG__std_c_14 - Failed
– Performing Test CXX_FLAG__std_c_11
– Performing Test CXX_FLAG__std_c_11 - Success
– Looking for arpa/inet.h
– Looking for arpa/inet.h - found
– Looking for fcntl.h
– Looking for fcntl.h - found
– Looking for grp.h
– Looking for grp.h - found
– Looking for limits.h
– Looking for limits.h - found
– Looking for malloc.h
– Looking for malloc.h - found
– Looking for netdb.h
– Looking for netdb.h - found
– Looking for netinet/in.h
– Looking for netinet/in.h - found
– Looking for poll.h
– Looking for poll.h - found
– Looking for pwd.h
– Looking for pwd.h - found
– Looking for stdbool.h
– Looking for stdbool.h - found
– Looking for stdlib.h
– Looking for stdlib.h - found
– Looking for string.h
– Looking for string.h - found
– Looking for strings.h
– Looking for strings.h - found
– Looking for sys/cdefs.h
– Looking for sys/cdefs.h - not found
– Looking for sys/dl.h
– Looking for sys/dl.h - not found
– Looking for sys/fileio.h
– Looking for sys/fileio.h - not found
– Looking for sys/mman.h
– Looking for sys/mman.h - found
– Looking for sys/param.h
– Looking for sys/param.h - found
– Looking for sys/queue.h
– Looking for sys/queue.h - found
– Looking for sys/select.h
– Looking for sys/select.h - found
– Looking for sys/socket.h
– Looking for sys/socket.h - found
– Looking for sys/stat.h
– Looking for sys/stat.h - found
– Looking for sys/time.h
– Looking for sys/time.h - found
– Looking for sys/times.h
– Looking for sys/times.h - found
– Looking for sys/uio.h
– Looking for sys/uio.h - found
– Looking for syslog.h
– Looking for syslog.h - found
– Looking for termios.h
– Looking for termios.h - found
– Looking for time.h
– Looking for time.h - found
– Looking for unistd.h
– Looking for unistd.h - found
– Looking for sys/fanotify.h
– Looking for sys/fanotify.h - not found
– Looking for resolv.h
– Looking for resolv.h - found
– Looking for dirent.h
– Looking for dirent.h - found
– Looking for dlfcn.h
– Looking for dlfcn.h - found
– Looking for inttypes.h
– Looking for inttypes.h - found
– Looking for sys/inttypes.h
– Looking for sys/inttypes.h - found
– Looking for sys/int_types.h
– Looking for sys/int_types.h - found
– Looking for stdint.h
– Looking for stdint.h - found
– Looking for sys/types.h
– Looking for sys/types.h - found
– Looking for stddef.h
– Looking for stddef.h - found
– Check size of ssize_t
– Check size of ssize_t - done
– Check size of off_t
– Check size of off_t - done
– Check size of int
– Check size of int - done
– Check size of short
– Check size of short - done
– Check size of long
– Check size of long - done
– Check size of long long
– Check size of long long - done
– Performing Test HAVE_RESTRICT
– Performing Test HAVE_RESTRICT - Success
– Performing Test HAVE_ATTRIB_PACKED
– Performing Test HAVE_ATTRIB_PACKED - Success
– Performing Test HAVE_ATTRIB_ALIGNED
– Performing Test HAVE_ATTRIB_ALIGNED - Success
– Performing Test HAVE_SYSTEM_LFS_FTS
– Performing Test HAVE_SYSTEM_LFS_FTS - Failed
– Looking for recvmsg
– Looking for recvmsg - not found
– Looking for sendmsg
– Looking for sendmsg - not found
– Performing Test HAVE_CONTROL_IN_MSGHDR
– Performing Test HAVE_CONTROL_IN_MSGHDR - Success
– Performing Test HAVE_STRUCT_TM_TM_GMTOFF
– Performing Test HAVE_STRUCT_TM_TM_GMTOFF - Failed
– Check size of int *
– Check size of int * - done
– Check size of time_t
– Check size of time_t - done
– Looking for _Exit
– Looking for _Exit - found
– Looking for accept4
– Looking for accept4 - not found
– Looking for sysctlbyname
– Looking for sysctlbyname - not found
– Looking for getaddrinfo
– Looking for getaddrinfo - not found
– Looking for mkstemp
– Looking for mkstemp - not found
– Looking for poll
– Looking for poll - found
– Looking for setgroups
– Looking for setgroups - found
– Looking for setsid
– Looking for setsid - found
– Looking for initgroups
– Looking for initgroups - found
– Performing Test C_FLAG__Wall
– Performing Test C_FLAG__Wall - Success
– Performing Test C_FLAG__Wextra
– Performing Test C_FLAG__Wextra - Success
– Performing Test C_FLAG__Wformat_security
– Performing Test C_FLAG__Wformat_security - Success
– Performing Test CXX_FLAG__Wall
– Performing Test CXX_FLAG__Wall - Success
– Performing Test CXX_FLAG__Wformat_security
– Performing Test CXX_FLAG__Wformat_security - Success
– Performing Test HAVE_MMAP
– Performing Test HAVE_MMAP - Success
– Performing Test HAVE_MMAP_MAP_ANONYMOUS
– Performing Test HAVE_MMAP_MAP_ANONYMOUS - Success
– Performing Test HAVE_SYSCONF_SC_PAGESIZE
– Performing Test HAVE_SYSCONF_SC_PAGESIZE - Success
– Configuration Options Summary –
Package Version: ClamAV 0.104.1
libclamav version: 10:0:1
libfreshclam version: 2:2:0
Install prefix: /usr/local
Install database dir: /usr/local/share/clamav
Install config dir: /usr/local/etc
Host system: SunOS-5.11
Target system: SunOS-5.11
Compiler:
Build type: RelWithDebInfo
C compiler: /usr/bin/gcc
C++ compiler: /usr/bin/c++
CFLAGS: -O2 -g
CXXFLAGS: -O2 -g
WARNCFLAGS: -Wall -Wextra -Wformat-security
Build Options:
Build apps: ON
Shared library: ON
Static library: OFF
Enable UnRAR: ON
Examples: OFF
Tests: OFF
Build man pages: ON
Build doxygen HTML: OFF
Build Extras:
Build milter: ON (toggle with -DENABLE_MILTER=ON/OFF)
– Engine Options –
Bytecode Runtime:
interpreter
– libclamav Dependencies –
Compression support:
bzip2 /usr/include
/usr/lib/libbz2.so
zlib /usr/include
/usr/lib/libz.so
XML support:
libxml2 /usr/include/libxml2;/usr/include/libxml2
/usr/lib/libxml2.so
RegEx support:
libpcre2 /usr/local/include
/usr/local/lib/libpcre2-8.so
Crypto support:
openssl /usr/include
/usr/lib/libssl.so;/usr/lib/libcrypto.so
JSON support:
json-c /usr/include/json-c
/usr/lib/libjson-c.so
Threading support:
pthread
Locale support:
iconv /usr/include
/usr/lib/libc.so
– libfreshclam Extra Dependencies –
HTTP support:
curl /usr/include
/usr/lib/libcurl.so
– Application Extra Dependencies –
GUI support:
pdcurses /usr/include
/usr/lib/libcurses.so
Milter Support:
libmilter /usr/include
/usr/lib/libmilter.so

– Warning: libjson-c is known to share symbol names with other JSON libraries which may result in crashes for applications that use libclamav. Consider providing a static json-c library that was compiled with: CFLAGS="-fPIC". Default build settings for j
– Configuring done
– Generat