Skip to content

[feature request] Support cc_import of .so with soname #7059

Closed

Description

@yongtang

Description of the problem / feature request:

At the moment cc_import supports linking to a shared library like libmylib.so. However, it does not support .so with soname, e.g., libmylib.so.2. It would be good to support .so with soname.

Feature requests: what underlying problem are you trying to solve with this feature?

In linux .so with soname is very common so to expand the usage of cc_import to soname would be ideal.

Activity

  1. added
    team-Rules-CPP
    untriaged
    on Jan 14, 2019
  2. added
    P2
    and removed
    untriaged
    on Jan 14, 2019
  3. c-mita commented on Nov 23, 2020

    @c-mita
    Member

    As mentioned above, I believe this is resolved. If there's still an issue, please reopen.

  4. dfreese commented on Feb 2, 2022

    @dfreese

    I ran into this as well, however, I was using provided_by_system=True, which means I'm limited to interface_library. That field doesn't allow for a version to be specified.

    Ran into this trying to provide a solution for nvidia-encode.so. The nvidia docker runtime doesn't create the link from nvidia-encode.so to nvidia-encode.so.1. As a result, there doesn't seem to be a great way to specify this in a way that bazel uses the system library when running tests, for example.

    Let me know if this should be brought up as a separate issue (or should be considered an issue).

  5. m3rcuriel commented on Aug 14, 2022

    @m3rcuriel
    Contributor

    I am in a similar problem and don't understand why interface_library shouldn't be able to take versioned .so files. It seems impossible to otherwise specify that libfoo.so.21 should not end up as a runfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2team-Rules-CPPtype: feature request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions