Skip to content
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

pin ABI version of dll dependency at build time #1176

Closed
minrk opened this issue Aug 4, 2016 · 6 comments
Closed

pin ABI version of dll dependency at build time #1176

minrk opened this issue Aug 4, 2016 · 6 comments
Labels
locked [bot] locked due to inactivity
Milestone

Comments

@minrk
Copy link
Contributor

minrk commented Aug 4, 2016

I want this for pyzmq, but I think it’s pretty general (I know @SylvainCorlay has encountered it).

When a package links a DLL, it will only work with the ABI version of that dependency that it loaded at build time. Many packages (e.g. pyzmq) are quite flexible in what versions of those DLLs they can build against, and conda recipes tend to reflect this flexibility. However, that makes it possible to do things like install pyzmq-15.3 and zeromq-4.0, which won’t work because pyzmq-15.3 was built against zeromq-4.1 which has a different ABI than zeromq-4.0, and will fail to load.

The pattern that makes the most sense to me is to leave the build dependency open, but then pin the runtime dependency based on the version loaded at build time. I think conda doesn’t actually record ABI versions, only package versions, but I’m guessing that’s an okay approximation in most cases.

Right now, what I’m trying is pinning the upstream dependency explicitly in meta.yml, which ought to work, but is more restrictive than should really be necessary at the recipe level.

Here’s what I’m imagining in meta.yml:

requirements:
  build:
    - liba
    - libb
    - libc
  runtime:
    - liba build.x*
    - libb build.xy*
    - libc ==build.xyz

Where liba build.x would resolve as the major version of liba at build time, libb build.xy as major.minor of libb, build.xyz as full version of libc, etc.

Perhaps simpler to implement would be a separate dependency category, along the lines of:

dependencies:
  runtime_build_version:
    major:
      - liba
    minor:
      - libb

but that’s not as nice or flexible as allowing substitutions into the existing version resolution spec.

In general, I think it would be appropriate for conda-build to record the exact versions of all packages loaded in the build env (including channels) in the package metadata, if it’s not already doing so.

@pelson
Copy link
Contributor

pelson commented Aug 4, 2016

There is a colourful history to this topic (e.g. #747). I know the capability is high on @msarahan's list, but I'm not certain exactly what the solution will look like, or indeed where he is on this.

In general, I think it is fair to say there is absolute consensus on being able to pin dependencies at build time, rather than hard-coding the versions in the recipe (which is how we currently do it in conda-forge).

@msarahan
Copy link
Contributor

msarahan commented Aug 4, 2016

The issue to follow is at #1142, which has links to the current PR, as well as the history. Current status is that I hope to return to it soon, but have been waylaid by more urgent bugfixes. =(

If anyone has time to push that forward with proposals, specs, or code, I'll be very appreciative.

@msarahan
Copy link
Contributor

This will be fixed by #1585 - should be done early in the new year.

@msarahan msarahan added this to the 3.0.0 milestone Dec 22, 2016
@minrk
Copy link
Contributor Author

minrk commented Jan 3, 2017

Exciting, thanks @msarahan!

@msarahan
Copy link
Contributor

#1585 is merged. Closing.

@github-actions
Copy link

Hi there, thank you for your contribution!

This issue has been automatically locked because it has not had recent activity after being closed.

Please open a new issue if needed.

Thanks!

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Apr 15, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity
Projects
None yet
Development

No branches or pull requests

3 participants