-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[ci] cmake: remove linking to sanitizer library #4176
Conversation
The "Python-package / mpi source (macOS-latest, Python 3.9)" failure should not be caused by this PR. |
hmmm ok yeah I suspect you're right. When commenting on CI jobs, it's usually desirable to leave a link to the logs so maintainers can go look: https://github.com/microsoft/LightGBM/pull/4176/checks?check_run_id=2342784529.
Can you please push an empty commit to this branch to re-trigger CI? So it will rebuild but we won't lose the logs. |
@jameslamb Didn't realise that I can put a link commenting about CI. Empty commit pushed now. |
I'm removing my request-for-review on this one, I don't think I'm qualified to approve it. Thanks very much for the help, @cyfdecyf ! If you have time, could you please update this to the latest |
Hey @hcho3 @trivialfis ! Could you please take a look at #4176 (comment)? |
I think the changes make sense. In older gcc versions linking those libraries was required. But the requirement was removed in newer versions. In fact, with the latest gcc distribution, those libraries are hidden deeply as internal shared objects so those CMake scripts will stop working. In XGBoost the |
Adding compiler flag will automatically link to the required libraries. Besides, clang static links to sanitizer libraries by default. Thus linking to dynamic library must be removed in order to use clang.
4631522
to
90b5165
Compare
@jameslamb OK. I just did a rebase to latest master commit and force-pushed. |
@trivialfis Thanks a lot for your comment! @cyfdecyf Could you please share versions of compilers you tested your changes from this PR with? We need to support quite wide range of versions of gcc and Clang. But gcc 4.8.4 is must-have because with this version we create public artifacts. |
@StrikerRUS Versions of compiler tested (all from Ubuntu 18.04):
|
@cyfdecyf Thanks for the clarification!
Are you speaking about the current
Yes, sure! Public artifacts are built with optimization flags and without any sanitizers.
Initially I thought about testing with sanitizers the same version of compiler with which public releases are made. To make sure that version of compiler doesn't find any issues. Now I believe your proposal to prefer testing with sanitizers only the latest compiler version makes sense. Let me think about it a little bit more time. |
It's the problem of GCC 4.8.5 itself. If we don't limit to only ASan during cmake invocation when using GCC 4.8.5, building will result compiling error because |
OK, thanks a lot for your explanations @cyfdecyf ! Now I think running sanitizers only with the latest versions of compilers is a good idea! |
This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this. |
Adding compiler flag will automatically link to the required libraries.
Besides, clang static links to sanitizer libraries by default. Thus linking to dynamic library must be removed in order to use clang.
For reference:
-lasan
option has been discouraged. It directs to mailing list answer by ASan developerlibasan
withoutliblsan
liblsan
will be linked