-
Notifications
You must be signed in to change notification settings - Fork 908
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
Remove public gtest dependency from libcudf conda package #15534
Remove public gtest dependency from libcudf conda package #15534
Conversation
I merged the upstream to get CI unblocked. |
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.
While I think this change is already safe across the rest of RAPIDS (rapidsai/build-planning#32), I suspect we need to do a bit more work in cudf. Specifically, I think we have to address #13381. Currently libcudftestutil.a exports a public dependency on GTest. Granting that it is already a static library, that still means that consumers of it will see APIs that have use gtest. What happens if someone tries to link against libcudftestutil.a, but has compiled their code using a different version of gtest? Won't that result in incompatible binaries?
In practice the only use case I'm aware of is cuspatial, which uses rapids-cmake and we control, so it's probably not a serious issue, but unless I'm misunderstanding it is a real potential issue that is worth trying to resolve before merging this.
This is a great point. Using a static GTest with libcudf would mean that conda consumers would be forced to never have GTest in the conda env. I agree with you that this is not a desired outcome, and it looks like we can't move over to a static GTest for libcudf without first splitting the testing component into a separate conda package. I am going to close this PR in that case, as that is out of scope of this change |
Re-opnening this PR since we realized that by always building our own GTest, we don't need to worry about linking to a static system GTest which wasn't built with fPIC. |
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.
Re-reviewed on request. Looks good.
522e45c
to
0e45394
Compare
/merge |
@@ -16,86 +16,6 @@ | |||
|
|||
#pragma once | |||
|
|||
#ifdef GTEST_INCLUDE_GTEST_GTEST_H_ |
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 is not needed now that we use a GTest version dowloaded via rapids-cmake. In addition the logic was incorrectly triggering on the devcontainer builds due to a system installed GTest causing us to break the internals of GTest
Description
Reworks the cudftestutil and dependency chain to remove the public gtest dependency in libcudf conda package.
The libcudftestutil was previously made static due to issues using a static system GTest that wasn't build with
fPIC
. Using a GTest fromrapids-cmake
which is built withfPIC
enabled, removes this restriction and allows us to remove the public depedency.Some notes:
rapids-cmake
libcudftestutils
publically depend on GTestlibcudftestutils
header will require downstream users to bring in GTest.Fixes #13381
Contributes to rapidsai/build-planning#32
Checklist