-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Can't link a shared library using clang #162
Comments
I can produce you issue. Could you please change the cuda_objects(
name = "mul",
srcs = ["mul.cc"],
hdrs = ["mul.h"],
) #125 introduced the ability to do transitive device link on cuda object files from deps, at that time, it seems to be harmless but I am not quite sure about it. Seems some cases are not well considered in #125 (comment) I also observed similar behavior in the nccl example, but I don't have time to figure it out, so it is recommended to stick to If some unresolvable condition is caused by that PR I think we better revert it at sometime and only rely on the old behavior. |
#Fixed in #167, but you should note that transitive dlink will not work as expected (so you should stick with cuda_objects at the moment). This is nvlink limitation, see #167 (comment) for details. |
I get duplicate symbol errors when trying to link a shared library.
Here's an example
C++ code
BUILD file
Trying to link gives me the error
Doing something similar with alwayslink and cc_binary instead of cc_shared_library gives a similar result.
The text was updated successfully, but these errors were encountered: