-
-
Notifications
You must be signed in to change notification settings - Fork 188
Future of libcrypt.so.1 #173
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
Comments
#113 has the prior discussion of this. tl;dr is the Linux Standard Base Core Specification purports to require this library. But the language it uses is shall and apparently nobody really cares about LSB compliance anyway. Since Linux distributions are obviously removing this library, it forces our hand to either remove it completely or separate out the part requiring it (the FWIW I've been slowly coming around to the idea that aggressive static linking of extension modules is a mistake, at least for some build configuration. The use cases that python-build-standalone is growing into warrant stronger compatibility with the way CPython is typically built. And that means building extension modules as shared libraries and possibly shipping standalone shared libraries for shared libraries (like OpenSSL) as well. |
Python 3.13 removes |
Yeah, I guess it does go away naturally. Unfortunately we have 2-3 years before 3.13 gains meaningful adoption. We need to ship a change prior to 3.13 or else PBS won't be usable for many end-users. |
A compatible |
You need to draw the line somewhere. Historically |
I agree, but typically the line for a "standalone" executable has been the libraries provided by glibc itself, as glibc is needed to bootstrap the use of dynamic modules and shared libraries at all.
For better or worse, this is how SONAME:s work on linux. Distros can ship new ABI versions as long as the distro has updated all their own packages. |
Relying on existence of What's changed in the past several months is a bunch of distros appear to be chucking glibc's I've also heard that distros don't really care about LSB compliance these days anyway and LSB is effectively in a zombie state. I'm not aware of a viable alternative. This is really a shame because it makes it vastly more difficult to construct portable Linux binaries since there are no ~universally agreed upon standards for what is in Linux user space.
Historically Anyway, I started hacking on patches to make |
I believe there are a handful of operations related tools that might benefit of having it, but the question is really if these builds want to go down that path. In particular I know that saltstack and a few other tools of that nature uses the That said, a lot of tools were already written to catch |
Modern Linux distributions are starting to remove `libcrypt.so.1` from the base disto. See #173 and #113 before it for more context. The `_crypt` extension module depends on `libcrypt.so.1` and our static linking of this extension is causing the full Python distribution to depend on `libcrypt.so.1`, causing our binaries to not load/run on these distributions. This commit adds support for building extension modules as shared libraries (the way CPython does things by default). We update our YAML config to build `_crypt` as a shared library.
As the GitHub issue timeline shows, I think I'm close to a working patch to move |
Modern Linux distributions are starting to remove `libcrypt.so.1` from the base disto. See #173 and #113 before it for more context. The `_crypt` extension module depends on `libcrypt.so.1` and our static linking of this extension is causing the full Python distribution to depend on `libcrypt.so.1`, causing our binaries to not load/run on these distributions. This commit adds support for building extension modules as shared libraries (the way CPython does things by default). We update our YAML config to build `_crypt` as a shared library.
Modern Linux distributions are starting to remove `libcrypt.so.1` from the base disto. See #173 and #113 before it for more context. The `_crypt` extension module depends on `libcrypt.so.1` and our static linking of this extension is causing the full Python distribution to depend on `libcrypt.so.1`, causing our binaries to not load/run on these distributions. This commit adds support for building extension modules as shared libraries (the way CPython does things by default). We update our YAML config to build `_crypt` as a shared library. As part of this we remove a patch to `makesetup` that was removing rules for emitting extension info to the generated `Makefile`. Git commit messages and my mental memory are a bit foggy on the history. But I want to say this patch had its origins in the very early days of this project when I was still trying to figure out how to get extension modules to statically link. The removed code created some contamination of the generated `Makefile` making it harder to grok behavior. I think that the presence of these additional variables and rules is safe and doesn't cause unwanted regressions. We have pretty strong validation of the built distributions - including ELF symbol visibility checks. So I'm optimistic this reintroduction won't cause problems. Closes #173.
Modern Linux distributions are starting to remove `libcrypt.so.1` from the base disto. See #173 and #113 before it for more context. The `_crypt` extension module depends on `libcrypt.so.1` and our static linking of this extension is causing the full Python distribution to depend on `libcrypt.so.1`, causing our binaries to not load/run on these distributions. This commit adds support for building extension modules as shared libraries (the way CPython does things by default). We update our YAML config to build `_crypt` as a shared library. As part of this we remove a patch to `makesetup` that was removing rules for emitting extension info to the generated `Makefile`. Git commit messages and my mental memory are a bit foggy on the history. But I want to say this patch had its origins in the very early days of this project when I was still trying to figure out how to get extension modules to statically link. The removed code created some contamination of the generated `Makefile` making it harder to grok behavior. I think that the presence of these additional variables and rules is safe and doesn't cause unwanted regressions. We have pretty strong validation of the built distributions - including ELF symbol visibility checks. So I'm optimistic this reintroduction won't cause problems. Closes #173.
Modern Linux distributions are starting to remove `libcrypt.so.1` from the base disto. See #173 and #113 before it for more context. The `_crypt` extension module depends on `libcrypt.so.1` and our static linking of this extension is causing the full Python distribution to depend on `libcrypt.so.1`, causing our binaries to not load/run on these distributions. This commit adds support for building extension modules as shared libraries (the way CPython does things by default). We update our YAML config to build `_crypt` as a shared library. As part of this we remove a patch to `makesetup` that was removing rules for emitting extension info to the generated `Makefile`. Git commit messages and my mental memory are a bit foggy on the history. But I want to say this patch had its origins in the very early days of this project when I was still trying to figure out how to get extension modules to statically link. The removed code created some contamination of the generated `Makefile` making it harder to grok behavior. I think that the presence of these additional variables and rules is safe and doesn't cause unwanted regressions. We have pretty strong validation of the built distributions - including ELF symbol visibility checks. So I'm optimistic this reintroduction won't cause problems. Closes #173.
This removes a dependence on the problematic `libcrypt.so.1` on Linux and should allow `science` to run out of the box on more Linux distros. See: + astral-sh/python-build-standalone#173 + https://github.com/indygreg/python-build-standalone/releases/tag/20230726
Was this dependency removed for all released Python versions? When trying to use 3.8, 3.9, and 3.10 from releases 20231002 or 20230826, I experience the same issue with |
Yes, the intent was for all Python versions to only link |
While
libcrypt.so.1
really should be part of a linux installation, it seems like plenty of users don't have it. I wonder if it makes sense to consider dropping that dependency or working around it.It's missing in archlinux, and apparently some WSL2 users also report not having it: astral-sh/rye#258
The text was updated successfully, but these errors were encountered: