Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

] 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 #1202

Open
Rishabhsingh12180 opened this issue Mar 13, 2024 · 5 comments

Comments

@Rishabhsingh12180
Copy link

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

@ragusaa
Copy link
Contributor

ragusaa commented Mar 13, 2024

Hi,

Could you tell me what cmake command you ran?

Thanks,
Andy

@Rishabhsingh12180
Copy link
Author

Rishabhsingh12180 commented Mar 14, 2024

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

@ragusaa
Copy link
Contributor

ragusaa commented Mar 14, 2024

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.

@Rishabhsingh12180
Copy link
Author

Did you run above command on vm or actual systen

@ragusaa
Copy link
Contributor

ragusaa commented Mar 22, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants