-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Fix precompiled lib symlinks missing in runfiles of cc_shared_library #19378
Conversation
26d882f was intended to remove unnecessary files from runfiles However it also removes (some?) required symlinks from runfiles. E.g. libtensorflow_cc.so.2.13.0 is present in the runfiles but `libtensorflow_cc.so.2` is not leading to failures as programs are linked to the latter. Use the same logic used in other places preferring `resolved_symlink_dynamic_library` over `dynamic_library`.
It looks like I'd argue that is an oversight in the test as right now the test would pass when NO files were being created at all which likely isn't the intention. |
Yes, please modify the test to account for these new files. Just run:
The test to modify is here |
Allow the new files `libdirect_so_file.so` & `renamed_so_file_copy.so` in runfiles. Add a test for expected files in runfiles as the other test (part) may pass when runfiles is empty
I ran the test on my machine and printed the expected and actual files, i.e.
bazel-out/k8-fastbuild/bin/src/main/starlark/tests/builtins_bzl/cc/cc_shared_library/test_cc_shared_library/libdirect_so_file.so not found in expected basenames:
Given this I'd expect the first failure in Anyway what this PR changes is replacing
by
I adapted the test accordingly and enhanced it to not only check for superflous files but also for missing files. I see Line 149 in 8023538
srcs : https://github.com/tensorflow/tensorflow/blob/be88ba0aefb1b778c2c0d0d896a342a70579740c/tensorflow/tensorflow.bzl#L2415-L2420
So I'd say this is indeed a valid fix and the enhanced test covers it. But as I don't know the intention behind using those mangled paths in |
Hi @Flamefire, it seems there is a failure on buildkite, could you please take a look and fix the error: https://buildkite.com/bazel/google-bazel-presubmit/builds/71675#018ab151-4f5a-4b35-9f1e-521a873e023b |
@Pavank1992 From the linked log I cannot see why that test on that system failed. |
26d882f was intended to remove unnecessary files from runfiles However it also removes (some?) required symlinks from runfiles. E.g. libtensorflow_cc.so.2.13.0 is present in the runfiles but
libtensorflow_cc.so.2
is not leading to failures as programs are linked to the latter. See tensorflow/tensorflow#60326Use the same logic used in other places preferring
resolved_symlink_dynamic_library
overdynamic_library
.