-
Notifications
You must be signed in to change notification settings - Fork 686
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
Fix issue LLVM linking with libclamav_rust test executable #572
Fix issue LLVM linking with libclamav_rust test executable #572
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense to me, and seems like a reasonable solution. I didn't see any adverse effects in testing.
Actually, I'm not entirely happy with the location where this is stripped. It is stripped before building a specific test executable, (check_fpu_endian), and just happens to propagate down to the It would be better to either do it: @teoberi would you please give one of these options a try to ensure it also resolves the issue and doesn't break anything else in your environment? If you like, I can make the edit directly to your |
I use Slackware64-current (development tree) on all my servers where it has already been switched to LLVM 14.0.6. |
Okay understood. I should've realized that based on our conversations in other issues. Okay I'll tweak it myself and test it as best I can. |
I tested in a virtual machine with Slackware64-current and LLVM 13 the proposed solutions:
B) to the LLVM_LIBS variable just after LLVM_LIBS is created -> it works
I will test this again after solving the problems related to the build with LLVM 14 as a stage in the process of returning to Clamav. |
Awesome thanks @teoberi for testing. |
When LLVM is found with FindLLVM.cmake module, it may set the LLVM_LIBRARIES variable to have `-l` prefix on the libraries. The Rust `build.rs` script does not like this and will end up trying to link with `-l-lLLVM` instead of `-lLLVM`. This commit strips the `-l` prefix from the LLVM_LIBRARIES variable before passing it off to build the libclamav_rust test program.
Fix for issue "Clamav 0.105.0 test libclamav_rust failed #569"