-
-
Notifications
You must be signed in to change notification settings - Fork 279
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
Policy: name native libs after SONAME #157
Comments
It would also be nice if there would be any way to get the minimum required version of a library from the library itself, so that one could write
instead of needing to manually update (and look up...) that each time a library updates. Example of the breakage a simple rebuild can trigger:
|
Re This has currently the problem that the "header" and the binary library are in the same package and installing multiple versions would overwrite the header (conda does not erro if it overwrites files form another package), so doing a build against an env which would contian both version would randomly (last one wins) link against one of the versions. In linux distributions, they would usually end up in different binary packages -> the source package |
For a package which currently makes something uninstallable, try installing pillow and pyqt:
|
* Use versions from conda-forge (in sync with the conda package build) * remove pyqt (which right now is installed from default) as the dependencies of that package clashes with packages in conda-forge. See here: conda-forge/conda-forge.github.io#157 (comment)
The proposal for splitting and renaming |
* Use versions from conda-forge (in sync with the conda package build) * remove pyqt (which right now is installed from default) as the dependencies of that package clashes with packages in conda-forge. See here: conda-forge/conda-forge.github.io#157 (comment)
* Use versions from conda-forge (in sync with the conda package build) * remove pyqt (which right now is installed from default) as the dependencies of that package clashes with packages in conda-forge. See here: conda-forge/conda-forge.github.io#157 (comment)
* Use versions from conda-forge (in sync with the conda package build) * remove pyqt (which right now is installed from default) as the dependencies of that package clashes with packages in conda-forge. See here: conda-forge/conda-forge.github.io#157 (comment)
Yes, yes yes!!! jpeg is driving me batty right now! But ideally it's a policy, so we can get things clean, and not play wack-a-mole trying to catch each lib one by one... Maybe we need an audit to see where this should be done? |
So @mingwandroid raised a different point on this issue in a meeting recently. Figured I would copy him here so he could share his perspective. |
On a case-by-case basis, for specific pain points with libraries that are small enough and that follow semantic versioning I don't object, but .. What @JanSchulz is talking about here is referred to as 'semantic versioning'. Only a small percentage of software projects follow semantic versioning (and attempting to apply this strategy to those that do not is pointless), many of those that use this scheme do it wrong and as soon as you depend on anything that does it wrong you can't do it right yourself either (see Qt as an example of a project that tries hard to do it right; does anyone here believe that you can use Qt 5.6 on an executable that was built against Qt 5.5? IMHO there is not a chance that it will work. I'd be surprised if an application linked against Qt 5.6.0 will run against Qt 5.6.2 without a rebuild). It requires patching a huge amount of software and that requires a good level of knowledge of the build system used in each case. Conda packages contain more than shared libraries so attempting to allow more than one of each to be installed in an environment at the same time will lead to the last one installed writing all those other files. Headers (and on Windows, import libraries) will not match the binaries, files in /etc will not be of the right format wrt the shared library, man pages will not match up. Split packages might help here, but only to the extent that in that case, the files would not have been installed, unless conda learns about the concept of conflicts. I would rather either keep things as they are (as a general principle) or see something less up to chance implemented, such are forming a checksum of the interface definition of each shared library and renaming that library according to the checksum. IMHO it's not worth the effort, That Debian attempt it doesn't convince me that it works well in general. The compatibility problem here is that conda defaults is Fedora and conda-forge is Ubuntu (feel free to pick two different distros), and we're trying to mix software from two different distributions and not really anything to do with SONAMEs. |
@mingwandroid I agree with you in most of your points. Not that I do not believe in the SONAME approach, but I do believe it is not worth using that in conda. We can probably work out a better consistency between Also, we can work out a more consistent pinning with |
Fair enough -- you're right -- this probably can't be done as an always do it policy. However, we could do for "specific pain points with libraries that are small enough", and that would help a lot. I think we need to be thoughtful when upgrading libs that are dependencies of a LOT of other packages and projects (like png, jpeg, ....). QT, on the other hand, is a real challenge, but not nearly as wide a variety of other packages need it -- so if we update QT, we can update the other QT package a lot more easily. (side note -- we really need to handle optional dependencies better -- I never use QT with matplotlib -- I should be able to install MPL without it (easily).
This will require some care, and needs to be done on a case-by-case basis. It seems some libs are designed with this in mind -- png comes to mind -- I see it called libpng16 a lot. (maybe not on Windows -- AARRGG!) so it may work fine in some cases without too much fudging.
That's the one that's biting me right now :-( Anyway, it's not JUST defaults -- conda forge is getting pretty big now. As soon as you upgrade one package and pin it to a newer lib, you break its compatibility with ALL the other packages that are pinned to an older version of that lib. This is a bigger deal with defaults, because we have no control over defaults, but it's still a lot of work. And do we have any tooling to help with that? Maybe this problem can be addressed by being more careful -- though with an entire community of people contributing, that's going to be tough!
What Debian (and all the distros?) do is version the entire system. so when they want to make a incompatible upgrade to a lib, they can put that in the next version, and upgrade everything else along with it at the same time. and Continuum does this with Anaconda, too. So maybe we should do it with conda-forge. OK -- off to try to solve my $%#ing jpeg problem now. |
@ChrisBarker-NOAA what are your So if you are trying to create an env this channel order mat help. It is tested on |
well, I've had a lot of issues trying to upgrade the GNOME project to use newer libs, and conda-forge wherever possible: https://github.com/NOAA-ORR-ERD/PyGnome/blob/master/conda_requirements.txt note that I think I need to pin all those version, rather than >=. But here's what I get with it as it is: clean python2 conda environment: $ conda config --get channels $ conda install --file conda_requirements.txt Hey! that just worked! Maybe there's been a change since a couple days ago -- yippie! |
[This is an issue from multiple other places: https://github.com/conda-forge/libpng-feedstock/pull/4#issuecomment-222751729, https://github.com/conda-forge/libpng-feedstock/issues/3#issuecomment-222777245 and https://github.com//pull/155#issuecomment-222988756]
If the library is well maintained, the SONAME (which usually includes the major version:
libc.so.6
) changes if the lib introduces any incompatible changes (aka a app build against a lower version would break if dynamically linked against the newer one -> API/ABI changes as opposed to API additions).On linux (at least debian), the package which contains the library has to change each time the SONAME changes:
https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#s-sharedlibs-runtime
Currently the native packages all use generic names (aka
libpng
instead oflibpng16
orzlib
instead ofzlib1
). Following the same pattern as debian has two main advantages:< <next major version>
pins,>= <min version>
is enough. If the library breaks, the SONAME changes which means a different package name is used. Currently, any packages which miss the< <new major version>
pin can be installed with an newer version of the library, but would break.libpng 17
which would then containlibpng17.dll
orlibpng17.so.17
-> All packages which link against the old libpng would need to be recompiled to get a higher dependencyLibrary packages should also include a test for the filename so that the build breaks if the soname/filename changes.
The text was updated successfully, but these errors were encountered: