-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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 dynamic library lookup with remotely executed tools #16215
Conversation
8da05de
to
b2adef0
Compare
@EdSchouten This is essentially your #14600 with an Integration test and support for commas. Could you verify that I got this right based on the changes in #16214? @oquenchil Could you review after #16214? |
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.
Thanks for addressing this!
dd4d64b
to
f4aeef0
Compare
d6f84a8
to
9931d8d
Compare
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.
LGTM
@oquenchil @sgowroji This should be merged separately after #16214 so that the former can be cherry-picked into 5.3.1. |
9931d8d
to
ae2bfba
Compare
@fmeum Thank you for very quick changes! Can you please fix the build kite failures. |
90ea36e
to
470dd06
Compare
@sgowroji Pretty sure those were flakes. I restarted the pipeline. |
@meteorcloudy I'll add this to the list of issues for the 6.0 milestone to be considered as a requirement for 6.0 . I personally don't think this should block 6.0 (it's been delayed enough), but it's useful to keep track of the "nice to haves" for that release. |
@fmeum The change from our side is not straightforward. So our change which is required for the fix is instant(does not require a release to be picked up). To sum it up:
I am pretty sure there is a way around this, it is not just straightforward. |
The solution which I currently have in mind, would require at least 1-2 weeks, depending on the internal Bazel release time. |
@buildbreaker2021 In case that would help, I'm happy to make my PR public domain (or whatever is needed) and have you integrate it in your fix CL so that you can merge both simultaneously without going through the import step. |
I will ping the PR once we are ready for the merge - import step is fine from my side if you are fine with it. |
When a cc_binary tool is executed directly (e.g. in a genrule) with remote execution, its dynamic dependencies are only available from the solib directory in the runfiles directory. This commit adds an additional rpath entry for this directory. Since target names may contain commas and the newly added rpaths contain target names, the `-Xlinker` compiler is now used everywhere instead of the `-Wl` flag, which doesn't support commas in linker arguments. Stacked on bazelbuild#16214 Closes bazelbuild#16215. PiperOrigin-RevId: 474792702 Change-Id: I2bfa1fd77be83d7bfe54ba591af5cb0ad0e630fc
Hey @fmeum , During further testing I discovered that my fix(even though it fixed current issue) breaks something else. To unblock you and to keep the things moving I suggest the following solution:
|
This reverts commit aa2bc09.
8056943
to
9039872
Compare
@buildbreaker2021 I pushed a new commit that gates the change behind a flag that defaults to |
9039872
to
b21839c
Compare
@buildbreaker2021 I forgot to carry the new flag over in |
A quick update. After seeing @fmeum 's latest commit I realized that going in a flag direction would be quite tedious, since on top of the flag we would need to add the logic which would split implementation in two branches etc. |
I'm cleaning up the |
This was merged before the baseline cut, so it's already in 6.0.0. |
Nice! |
When a cc_binary tool is executed directly (e.g. in a genrule) with
remote execution, its dynamic dependencies are only available from the
solib directory in the runfiles directory. This commit adds an
additional rpath entry for this directory.
Since target names may contain commas and the newly added rpaths contain
target names, the
-Xlinker
compiler is now used everywhere instead ofthe
-Wl
flag, which doesn't support commas in linker arguments.