Skip to content

native_test and native_binary break shared libraries with remote execution #437

Open
@cameron-martin

Description

@cameron-martin

In many implementation of remote execution services, the symlink that is created to the executable in native_test is not actually a symlink, and is effectively a copy. For resolving dynamic libraries, bazel uses rpaths relative to $ORIGIN. $ORIGIN refers to the resolved location of the symlink, and so these relative paths work fine when the executable is a symlink. However, when this file is actually a copy these relative rpaths no longer work. Note that the same thing happens when using the experimental hermetic linux sandbox, since this uses hardlinks and copying instead of symlinks.

I have created a reproducer, using the hermetic linux sandbox.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3We're not considering to work on this, but happy to review a PR. (No assignee)type: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions