-
Notifications
You must be signed in to change notification settings - Fork 533
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
[BUG] We shouldn't expose our dependent library symbols across libcuml++.so #2138
Comments
@teju85 dmlc/xgboost#5590 may be relevant to this discussion, where XGBoost devs hid all C++ symbols from |
@hcho3 unfortunately, we have to expose C++ symbols since our cython layer depends on those! |
@teju85 Got it. It should be however possible to selectively hide some symbols by using compiler attributes. In addition, we can hide C++ symbols that come from dependencies. |
Agreed. That's essentially the hope behind filing this issue. |
dmlc/xgboost#5590 used a white-list approach: hide all symbols, except a few symbols that were marked with a special macro. Either way, we are essentially mimicking what Windows does to all shared libs. On Windows platform, functions must be marked |
Good point. For now, if we can hide symbols from:
then that should be sufficient, for starters. Would you like to take this up, @hcho3 ? |
Is this issue blocking RAFT adoption? |
No, shouldn't be a blocking issue, but certainly very useful if this got done soon. |
Got it. I'll take a look at this issue once I make progress on speeding up Treelite serialization. |
Great! Thanks for volunteering. Agreed, this can certainly wait after the treelite-speedups work is over. |
Feel free to assign this issue to me. |
I believe we already do this for libdmlc and libprotobuf since we had issues with that? See https://github.com/rapidsai/cuml/blob/branch-0.14/cpp/CMakeLists.txt around line 318. Wish there were a more cmake-native way of doing it though. |
So, we should probably extend this for treelite, faiss and spdlog also? |
This issue has been labeled |
This issue has been labeled |
Describe the bug
While discussing RAFT integration, @dantegd described the reason for (re)cloning of dependencies of cuml here. Ideally, all symbols from these libraries that we depend upon should not have been exposed across
libcuml++.so
interface!Expected behavior
If a user only has
libcuml++.so
and all headers insidecpp/include
installed already, then they shouldn't need anything else (perhaps excepting cuda libraries and rmm), if they want to build python layer or just use the C++ library directly.Advantages
Disadvantages
The text was updated successfully, but these errors were encountered: