Skip to content

[Feature request] Allow linking a single non-versioned shared object #4468

Closed

Description

@mattip

Over a few PRs to MacPython/openblas-libs, I changed the end result to be a Python wheel. This required packaging a single shared object with no symbolic links. I needed to

  • use a prefix so the shared object is unique and can be globally loaded along side a different OpenBLAS build
  • changed the Makefiles to allow building a single shared object, with no versioning and no symlinks
  • changed the pkg-config file to reflect this

Here is the patch to OpenBLAS 0.3.26 to remove all the symlinking and versioning. Note the prefixing requires this line and this change in order to support prefixes in the pkg-config file. The rest of the patch is "just" removing things.

Would you be open to merging these changes, toggled with a build option, to reduce openblas-lib's maintenance burden?

Activity

  1. martin-frbg commented on Jan 31, 2024

    @martin-frbg
    Collaborator

    this looks a bit like PR #4252 ? (that I haven't had time to address properly yet)

  2. mattip commented on Jan 31, 2024

    @mattip
    ContributorAuthor

    Yup, it seems so. Anything I can do to help move that one along?

  3. martin-frbg commented on Jan 31, 2024

    @martin-frbg
    Collaborator

    I hope to get to this now, with the other issues out of the way

  4. martin-frbg commented on Feb 5, 2024

    @martin-frbg
    Collaborator

    hmm, I'm slightly confused by your patch to openblas.pc.in

    -Libs: -L${libdir} -lopenblas${libsuffix}
    +Libs: -L${libdir} -l${libprefix}openblas${libsuffix}
    

    which I would have expected to be something like ${libprefix}.${libsuffix} ?

  5. mattip commented on Feb 5, 2024

    @mattip
    ContributorAuthor

    The prefix I am thinking of goes before openblas. So in my case, where libprefix is scipy_ and libsuffix is 64_, the shared object generated is libscipy_openblas64_.so.

  6. martin-frbg commented on Feb 6, 2024

    @martin-frbg
    Collaborator

    I'm getting a feeling the makefiles have grown some unhealthy mix of automatic and manual prefix and suffix options lately.

  7. martin-frbg commented on Feb 8, 2024

    @martin-frbg
    Collaborator

    #4485 implements the basic idea but I still need to sort out the dual use of LIBPREFIX which is an internally generated variable already. (This also needs porting to cmake and integrating with the most recent realization from #3998 that symbol rewriting does not work when applied directly to a shared library ,as it is currently done in the cmake build)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions