Cisco-Talos / clamav

ClamAV - Documentation is here: https://docs.clamav.net

Home Page:https://www.clamav.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

] Linking C executable check_fpu_endian ld: warning: ignoring duplicate libraries: '-lSystem', '-lm' ld: file cannot be mmap()ed, errno=22 path=../clamav-build/check/lib in '../clamav-build/check/lib' clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [unit_tests/check_fpu_endian] Error 1 make[1]: *** [unit_tests/CMakeFiles/check_fpu_endian.dir/all] Error 2 make: *** [all] Error 2

Rishabhsingh12180 opened this issue · comments

I cloned this repository on my system then generated build files with the help of CMake on MacOS VM setup on VMWare workstation 17.After that when I am building clamav on my VM through make command I am getting above error.Can anyone help me?
my macos vm version is sonoma.
Screenshot 2024-03-11 at 14 26 53

Hi,

Could you tell me what cmake command you ran?

Thanks,
Andy

I ran make command to build clamav.First I cloned repo then created a build directory.Inside that directory I ran below command to generate build files rishabhsingh@Rishabhs-Mac check % cmake -DLIBCHECK_INCLUDE_DIR=/Users/rishabhsingh/check/src -DLIBCHECK_LIBRARY=/Users/rishabhsingh/check/lib -DOPENSSL_ROOT_DIR=/usr/local/openssl -DJSONC_LIBRARIES=/path/to/jsonc/lib/libjsonc.dylib -DJSONC_INCLUDE_DIRS=/path/to/jsonc/include /Users/rishabhsingh/clamav .After that inside clamav directory I ran make command which gave above error

for cmake, I am running 'cmake -G Ninja .. -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl' with no issues.

It looks like the actual error you are getting is 'ld: file cannot be mmap()ed, errno=22'. Error 22 is "Invalid argument passed to ld".

Are you able to run 'make -v', and get the actual command passed to ld? Running that by hand should help narrow down what is going on.

Did you run above command on vm or actual systen

Sorry for the late reply, I ran it on my actual mac system.