-
Notifications
You must be signed in to change notification settings - Fork 443
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
#4722: Remove Shared build workaround #4725
#4722: Remove Shared build workaround #4725
Conversation
In Jenkins, looks like the OpenMPTarget-Clang build failed due to the compiler crashing. It's seemingly in the front-end, so nothing to do with this as far as I can tell. Same failure appears on https://cloud.cees.ornl.gov/jenkins-ci/blue/organizations/jenkins/Kokkos/detail/Kokkos/7811/pipeline for PR #4724 |
I just tested that this doesn't break shared library builds on Intel 18 either - tests link and pass |
# Workaround for building position independent code. | ||
IF(BUILD_SHARED_LIBS) | ||
SET(CMAKE_POSITION_INDEPENDENT_CODE ON) | ||
ENDIF() |
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 code was introduced in #2288. We need to make sure removing these lines do not break support for shared libraries.
@junghans @masterleinad
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.
#4722 (comment) I tested on gcc and Intel with shared libraries
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.
If it works now, I'm very happy without this workaround. It would be interesting what "fixed" it, though.
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.
Likely some subsequent change in how Kokkos defines its targets in CMake, so that the need for PIC actually gets picked up like it's supposed to. It would take combing through the combined history of Kokkos's build files and releases of CMake itself to pinpoint it, though.
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.
The workaround just implements the CMake default for shared libs, so from my side it is ok to drop that.
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.
It seems that there is some testing on the Trilinos side if I read #4722 correctly.
I tested Kokkos with the reproducer @ndellingwood posted with the fix I proposed here, with both Intel and GCC. |
Failure (Clang crash in OpenMPTarget build) is clearly unrelated and under investigation elsewhere. |
Fixes #4722