Runtime dependencies for binaries in external repositories not in the sandbox in Remote Execution
Description of the bug:
Hi,
We have the following use case. A cc_binary defined in external workspace @foo, that has a dep on a cc_library @bar//:baz from the current workspace @bar. When building, the cc_binary gets an RPATH like this:
$ORIGIN/../../_solib_x86_64/...
This is correct and makes the cc_binary work fine when running it locally via bazel run or directly outside Bazel.
However, this does not work when running in Remote Execution. Inspecting the remote sandbox, we notice that the ../../_solib_x86_64 folder does not exist. It does exist when running locally.
Is this expected? How can we fix it?
Thanks!
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
No response
Which operating system are you running Bazel on?
Ubuntu 18.04
What is the output of bazel info release?
release 5.3.1
If bazel info release returns development version or (@non-git), tell us how you built Bazel.
No response
What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
Could you check whether this is fixed by https://github.com/bazelbuild/bazel/pull/16215?
Thanks for the quick answer @fmeum ! We are using bazelisk pinning a release version of Bazel. Do you have any tips on how we could test #16215 easily?
@sgowroji You added the more data needed tag - please let me know if I can provide any more information.
Wanted to see the above comment helped ? Please wait for @fmeum update on it. Thanks!
@carlosgalvezp You can either check out the branch and build Bazel from source via bazel build //src:bazel-dev or wait for the PR to get merged and then specify the commit on master as your USE_BAZEL_VERSION.
@fmeum Thanks, seems like it's easier for us to wait. Do you have an estimate for when the PR could be merged?
You can follow #16215 for updates, looks like merging the PR requires some more complicated procedure within Google.
Hi!
I can mention that we have now bumped to the official 6.0.0 release and the problem still persists. I thought #16215 should have included the fix?
@carlosgalvezp It does include the fix, so if this isn't working, something else is amiss. Could you provide a reproducer? Then I can take a look and investigate why it is still failing.
Thanks for the info! Absolutely, will try to create a minimal example and come back :)
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale.
@carlosgalvezp Is this still happening with Bazel 7.1.0rc2?
Hi @fmeum . I took over this task from Carlos. I tried Bazel 7.2.1 and I can confirm that the issue still persists, unfortunately. Do you still need the example to reproduce the issue?
@attiladoor Yes, that would be helpful