-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Proposal: split the package into dev and binary #7
Comments
Ah, first problem: the
Update On windows it looks like
-> It seems that packages from So this won't overwrite and we have one less problem. For the change of CC: @gillins @jakirkham (jpeg maintainer) |
Any opinions here? |
I wish I could line comment.
Are these the same? In my mind, there should only be libpng-dev, and its version should capture the SO version. It should, as you say, imply a particular libpngSO.. There are a lot of good ideas here. I think you should raise many of them on the conda and conda-build issue trackers. |
I'm sorry @JanSchulz I have not had the time to give this the attention it deserves. Maybe it will be more effective to discuss it again. Perhaps in a topic meeting dedicated to this? |
Mostly the idea is to either use I'm currently thinking about submitting two recipes for |
Maybe this would be a good CFEP. It's basically there AFAICT. Some formatting would need to be done, but it would give this idea greater visibility. |
@jankatins now that conda supports |
[This came out of the last conda-forge hangout + original proposal; this proposal is only for native packages, not python/... ones]
Problem
The problem is that packages end up being incompatible between versions ("SONAME change"). This is currently not the "real" problem with
libpng
(but withjpeg
-> 8 vs 9). To guard against this (future potential) problem, the dependency to this package is pinned tolibpng 1.6*
, so that packages linking against this packages can't install a futurelibpng 1.7
. The problem with that is that in some cases (aka thejpeg
package) different packages in the archive (in this casesmatplotlib
in conda-forge andpyqt
in defaults) depend on different versions of the library and can't therefore be installed together.The solution is to make multiple versions of a package installable next to each other. This is possible because the actual binary library
libpng16.{so|dll}
has the version in the name and therefore two versions can be installed next to each other. Unfortunately, the current package also contains the header files (png.h
and also the*lib
files on windows) and these are unversioned. Therefore, to not overwrite files from another packages, the header files need to be separated from the binary file.proposal
(roughly modeled after the way debian does it):
libpng16-dev
andlibpng16
which are named after the complete SONAME of the*.so/*.dll
file in the package (name+version). The recipes are basically a copy of the current recipe with one packages deleting everything but the one binary*so/*dll
file (libpng16
) and the other deleting only the binary (libpng16-dev
).libpng-dev
needs to runtime depend on the same version as thelibpng16
package to pull in the right so/dll at compile time -> at compile time the same file content as the currentlibpng
package is present on the file system -> this needs coordinated uploads forlibpng16
andlibpng16-dev
libpng16-dev >=1.6.21
(the current minimum compatible version) and the runtime dependency to ``libpng16 >=1.6.21. This only needs
greater than` dependencies as well behaving libraries should change the SONAME on incompatible ABI/API changes and so the package would need to depend on `libpng17{,-dev}`The result of these is that the current
libpng
andlibpng16
will be coinstallable but overwrite the actual binary lib (_so/_dll), but this can't be worked around without changing the SONAME/Filename on disk (not a good idea...) or having the packages conflict with each other (which conda currently can't do?!). The idea is to do the split and then do a rebuild of all the conda-forge packages to get the new version until no package in conda-forge depends onlibpng
anymore.Bad things which can still happen:
libpng
gets removed from conda-forge, then a package which gets installed fromdefaults
alone will pull inlibpng
again but this package will overwrite thelibpng16.so/dll
file and so anincompatible version
would be present. For that I would suggest that an emptylibpng
(with a specific higher version, which thelibpng
package in defaults would not reach) would be kept in the archive andlibpng16
would depend on that version untildefaults
gets updated to this new split libpng package. On the other hand, this can lead to the situation that a package from thedefaults
channel would depend onlibpng
without a*
pin or aless than
restriction (haven't investigated how the default packages declare their dependency on libpng) and would end up without alibpng16.so/dll
:-(*so/*dll
nondeterministic as the last package installed would "win" the link. This needs conflicts in thelibpng16-dev
package (and stuff like virtual packages ->libpng16-dev would provide
libpng-devand conflict with
libpng-dev-> only one package providing
libpng-dev` can be installed). But unless someone screws up a recipe and the CI services/conda-build install both versions I don't think it will matter."Future directions" :-)
jpeg
and the other native packages.jpeg
is actually easier because AFAIK only conda-forge has the incompatiblejpeg9
version and defaults is onjpeg8
-> no compatibility is needed, we just need to remove the old conda-forge jpeg packagelibpng16-dev
andlibpng16
should be build from the same source and the version can be set in one recipe. Until then it needs coordinated uploads.libpng-dev/libpng16-dev
(-> without a specific version; without the version in the name only if the API is kept and only the ABI is changed -> the recipe would be call "libpng" for all libpng versions) -> whatever version is present would end as the runtime version dependency and all is fine :-)*so/*dll
with an older version"-problem much easier: We could then declare a conflict inlibpng16
againstlibpng
and force that package out.The text was updated successfully, but these errors were encountered: