] 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
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.