# Build fail at ClamAV104 with Cmake22

**URL:** https://discourse.cmake.org/t/build-fail-at-clamav104-with-cmake22/4554
**Category:** Usage
**Created:** [November 26, 2021, 12:02pm UTC](https://discourse.cmake.org/t/build-fail-at-clamav104-with-cmake22/4554 "2021-11-26T12:02:51Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Yongliang](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/y/5e9695/32.png) [@Yongliang](https://discourse.cmake.org/u/Yongliang)
#### Post date: [November 26, 2021, 12:02pm UTC](https://discourse.cmake.org/t/build-fail-at-clamav104-with-cmake22/4554/1 "2021-11-26T12:02:52Z")

</div>

Please help me, thank you!  
１）environment：gcc,g++ GNU 7.1.0, SunOS solaris 5.11 11.3 i86pc i386 i86pc

２）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

３）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
